Skip to content
Snippets Groups Projects
Commit a57e34dc authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Exlude Netbox interactions for Juniper routers

parent 20d59f3b
Branches
Tags
1 merge request!415Juniper Edge Port modification
Pipeline #93851 passed
......@@ -9,7 +9,7 @@ from orchestrator.forms import FormPage
from orchestrator.targets import Target
from orchestrator.types import SubscriptionLifecycle
from orchestrator.utils.errors import ProcessFailureError
from orchestrator.workflow import StepList, begin, done
from orchestrator.workflow import StepList, begin, conditional, done
from orchestrator.workflows.steps import resync, set_status, store_process_subscription
from orchestrator.workflows.utils import wrap_create_initial_input_form
from pydantic import AfterValidator, ConfigDict, model_validator
......@@ -292,16 +292,18 @@ def create_edge_port() -> StepList:
* Deploy configuration on the new edge port, first as a dry run
* allocate LAG and LAG members in the Netbox.
"""
router_is_nokia = conditional(lambda state: state["subscription"]["edge_port"]["node"]["vendor"] == Vendor.NOKIA)
return (
begin
>> create_subscription
>> store_process_subscription(Target.CREATE)
>> initialize_subscription
>> start_moodi()
>> reserve_interfaces_in_netbox
>> router_is_nokia(reserve_interfaces_in_netbox)
>> lso_interaction(create_edge_port_dry)
>> lso_interaction(create_edge_port_real)
>> allocate_interfaces_in_netbox
>> router_is_nokia(allocate_interfaces_in_netbox)
>> set_status(SubscriptionLifecycle.ACTIVE)
>> resync
>> stop_moodi()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment