Activate IP trunk takes a provisioning trunk to the active lifecycle state.
When the SharePoint checklist of a trunk 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/iptrunk/activate_iptrunk.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_iptrunk()
Move an IP Trunk 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/iptrunk/activate_iptrunk.py
| @workflow(
"Activate an IP Trunk",
initial_input_form=wrap_modify_initial_input_form(_initial_input_form),
target=Target.MODIFY,
)
def activate_iptrunk() -> StepList:
"""Move an IP Trunk 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
)
|