Skip to content
Snippets Groups Projects

deploy_twamp: subscription -> json

Merged Aleksandr Kurbatov requested to merge fix/deploy_twamp into develop
All threads resolved!
"""Workflow for adding TWAMP to an existing IP trunk."""
import json
from orchestrator.forms import FormPage
from orchestrator.forms.validators import Label
from orchestrator.targets import Target
from orchestrator.types import FormGenerator, State, UUIDstr
from orchestrator.utils.json import json_dumps
from orchestrator.workflow import StepList, done, init, step, workflow
from orchestrator.workflows.steps import resync, store_process_subscription, unsync
from orchestrator.workflows.utils import wrap_modify_initial_input_form
@@ -38,7 +41,7 @@ def _initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
def deploy_twamp_dry(subscription: Iptrunk, process_id: UUIDstr, callback_route: str, tt_number: str) -> State:
"""Perform a dry run of deploying the TWAMP session."""
extra_vars = {
"subscription": subscription,
"subscription": json.loads(json_dumps(subscription)),
"process_id": process_id,
"dry_run": True,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Deploy TWAMP",
@@ -58,7 +61,7 @@ def deploy_twamp_dry(subscription: Iptrunk, process_id: UUIDstr, callback_route:
def deploy_twamp_real(subscription: Iptrunk, process_id: UUIDstr, callback_route: str, tt_number: str) -> State:
"""Deploy the TWAMP session."""
extra_vars = {
"subscription": subscription,
"subscription": json.loads(json_dumps(subscription)),
"process_id": process_id,
"dry_run": False,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Deploy TWAMP",
Loading