Skip to content
Snippets Groups Projects

Updated `promote_p_to_pe`

Merged Aleksandr Kurbatov requested to merge fix/promote-p-to-pe into develop
All threads resolved!
1 file
+ 1
6
Compare changes
  • Side-by-side
  • Inline
@@ -10,7 +10,7 @@ from orchestrator.targets import Target
from orchestrator.types import FormGenerator, State, UUIDstr
from orchestrator.utils.errors import ProcessFailureError
from orchestrator.utils.json import json_dumps
from orchestrator.workflow import StepList, begin, conditional, done, inputstep, step, workflow
from orchestrator.workflow import StepList, begin, done, inputstep, step, workflow
from orchestrator.workflows.steps import resync, store_process_subscription, unsync
from orchestrator.workflows.utils import wrap_modify_initial_input_form
from pydantic import ConfigDict, model_validator
@@ -189,7+189,7 @@
) -> None:
"""Update the SDP mesh for L2 circuits(epipes) config on PE NOKIA routers."""
extra_vars = {
"dry_run": False,
"subscription": subscription,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - "
f"Update the SDP mesh for l2circuits(epipes) config on PE NOKIA routers",
@@ -569,7+569,7 @@
)
def promote_p_to_pe() -> StepList:
"""Promote a P router to a PE router."""
router_is_juniper = conditional(lambda state: state["subscription"]["router"]["vendor"] == Vendor.JUNIPER)
router_is_pe = conditional(lambda state: state["subscription"]["router"]["router_role"] == RouterRole.PE)
return (
begin
>> store_process_subscription(Target.MODIFY)
>> router_is_juniper(done)
>> router_is_pe(done)
>> unsync
>> lso_interaction(set_isis_overload)
>> lso_interaction(deploy_pe_base_config_dry)
Loading