From a3c41fc31ebaaf5e106324fa451c2e66a8876342 Mon Sep 17 00:00:00 2001 From: Neda Moeini <neda.moeini@geant.org> Date: Thu, 22 Aug 2024 10:35:21 +0000 Subject: [PATCH] Remove conditional steps from promote P to PE workflow. --- gso/workflows/router/promote_p_to_pe.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gso/workflows/router/promote_p_to_pe.py b/gso/workflows/router/promote_p_to_pe.py index 379565a7..74f478c0 100644 --- a/gso/workflows/router/promote_p_to_pe.py +++ b/gso/workflows/router/promote_p_to_pe.py @@ -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) -- GitLab