Skip to content
Snippets Groups Projects
Commit a3c41fc3 authored by Neda Moeini's avatar Neda Moeini
Browse files

Remove conditional steps from promote P to PE workflow.

parent 3913cfff
No related branches found
No related tags found
1 merge request!260Updated `promote_p_to_pe`
Pipeline #88676 failed
......@@ -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
......@@ -569,14 +569,9 @@ def delete_default_routes_real(
)
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment