Skip to content

Redeploy edge port

Redeploy workflow for an Edge Port.

initial_input_form_generator(subscription_id)

Redeploy Edge Port on a router.

Source code in gso/workflows/edge_port/redeploy_edge_port.py
def initial_input_form_generator(subscription_id: UUID) -> FormGenerator:
    """Redeploy Edge Port on a router."""
    subscription = EdgePort.from_subscription(subscription_id)
    partner_name = get_partner_by_id(subscription.customer_id).name

    class RedeployEdgePortForm(SubmitFormPage):
        model_config = ConfigDict(title=f"Redeploy {subscription.description}.")
        tt_number: TTNumber

        divider: Divider
        edge_port_name: read_only_field(subscription.edge_port.edge_port_name)  # type: ignore[valid-type]
        edge_port_type: read_only_field(subscription.edge_port.edge_port_type)  # type: ignore[valid-type]
        edge_port_node: read_only_field(subscription.edge_port.node.router_fqdn)  # type: ignore[valid-type]
        ga_id: read_only_field(subscription.edge_port.ga_id)  # type: ignore[valid-type]

    user_input = yield RedeployEdgePortForm
    return user_input.model_dump() | {"subscription": subscription, "partner_name": partner_name}

redeploy_edge_port()

Redeploy an Edge Port.

Source code in gso/workflows/edge_port/redeploy_edge_port.py
@redeploy_workflow("Redeploy Edge Port", initial_input_form_generator)
def redeploy_edge_port() -> StepList:
    """Redeploy an Edge Port."""
    return begin >> lso_interaction(create_edge_port_dry) >> lso_interaction(create_edge_port_real)