예제 #1
0
def release_perimeta_kit(form):
    log_perimeta_kit_release(form)
    bookings = get_kit_bookings()
    bookings['perimeta']['available'] = True
    bookings['perimeta']['pointing_at'] = form.pointing.data
    bookings['perimeta']['tooltip'] = generate_perimeta_release_tooltip(form)
    store_kit_bookings(bookings)
예제 #2
0
def book_perimeta_kit(form):
    log_perimeta_kit_booking(form)
    bookings = get_kit_bookings()
    # clearwater specific
    bookings['perimeta']['available'] = False
    bookings['perimeta']['pointing_at'] = form.pointing.data
    bookings['perimeta']['tooltip'] = generate_perimeta_book_tooltip(form)
    store_kit_bookings(bookings)
예제 #3
0
def release_ccf_kit(form):
    log_kit_release(form, product='ccf')
    bookings = get_kit_bookings()
    for deployment in form.deployments:
        for node in deployment['nodes']:
            if node.data:
                bookings['ccf'][deployment['name']]['nodes'][node.name]['available'] = True
        update_deployment_availability('ccf', deployment, bookings)
    store_kit_bookings(bookings)
예제 #4
0
def book_ccf_kit(form):
    log_ccf_kit_booking(form)
    bookings = get_kit_bookings()
    # clearwater specific
    for deployment in form.deployments:

        for node in deployment['nodes']:
            if node.data:
                bookings['ccf'][deployment['name']]['nodes'][
                    node.name]['available'] = False
                bookings['ccf'][deployment['name']]['nodes'][
                    node.name]['tooltip'] = generate_tooltip(form)

            update_deployment_availability('ccf', deployment, bookings)
    store_kit_bookings(bookings)
예제 #5
0
def kit_status():
    clearwater_form = ClearwaterKitBookingForm()
    perimeta_form = PerimetaKitBookingForm()
    volte_form = VolteKitBookingForm()
    ccf_form = CCFKitBookingForm()
    bookings = get_kit_bookings()
    cc_deployment_names = sorted(bookings["clearwater"].keys())
    vt_deployment_names = sorted(bookings["volte"].keys())
    ccf_deployment_names = sorted(bookings["ccf"].keys())
    return lifeguard_render(
        "kit_management.html",
        title="Kit Management",
        clearwater_form=clearwater_form,
        perimeta_form=perimeta_form,
        volte_form=volte_form,
        ccf_form=ccf_form,
        bookings=bookings,
        vt_deployment_names=vt_deployment_names,
        cc_deployment_names=cc_deployment_names,
        ccf_deployment_names=ccf_deployment_names,
    )