Skip to content

Activate router

Activate router takes a provisioning router to the active lifecycle state.

When the SharePoint checklist of a router is completed, this workflow is run to take the subscription from PROVISIONING to ACTIVE. The operator is asked to give a URL to the completed checklist.

verify_complete_checklist()

Show a form for the operator to input a link to the completed checklist.

Source code in gso/workflows/router/activate_router.py
@inputstep("Verify checklist completion", assignee=Assignee.SYSTEM)
def verify_complete_checklist() -> FormGenerator:
    """Show a form for the operator to input a link to the completed checklist."""

    class VerifyCompleteForm(SubmitFormPage):
        info_label: Label = "Verify that the checklist has been completed. Then continue this workflow."
        checklist_url: str = ""

    user_input = yield VerifyCompleteForm

    return {"checklist_url": user_input.model_dump()["checklist_url"]}

activate_router()

Move a router from a PROVISIONING state to an ACTIVE state.

  • Send email notifications to different teams.
  • Wait for approval to be given.
  • Update the subscription lifecycle state to ACTIVE.
Source code in gso/workflows/router/activate_router.py
@workflow(
    "Activate a router",
    initial_input_form=wrap_modify_initial_input_form(_initial_input_form),
    target=Target.MODIFY,
)
def activate_router() -> StepList:
    """Move a router from a ``PROVISIONING`` state to an ``ACTIVE`` state.

    * Send email notifications to different teams.
    * Wait for approval to be given.
    * Update the subscription lifecycle state to ``ACTIVE``.
    """
    return (
        begin
        >> store_process_subscription(Target.MODIFY)
        >> unsync
        >> verify_complete_checklist
        >> set_status(SubscriptionLifecycle.ACTIVE)
        >> resync
        >> done
    )