Skip to content
Snippets Groups Projects

Juniper Edge Port modification

Merged Karel van Klink requested to merge fix/juniper-edge-port into develop
20 files
+ 333
197
Compare changes
  • Side-by-side
  • Inline
Files
20
@@ -9,7 +9,7 @@ from orchestrator.forms import FormPage
@@ -9,7 +9,7 @@ from orchestrator.forms import FormPage
from orchestrator.targets import Target
from orchestrator.targets import Target
from orchestrator.types import SubscriptionLifecycle
from orchestrator.types import SubscriptionLifecycle
from orchestrator.utils.errors import ProcessFailureError
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.steps import resync, set_status, store_process_subscription
from orchestrator.workflows.utils import wrap_create_initial_input_form
from orchestrator.workflows.utils import wrap_create_initial_input_form
from pydantic import AfterValidator, ConfigDict, model_validator
from pydantic import AfterValidator, ConfigDict, model_validator
@@ -292,16 +292,18 @@ def create_edge_port() -> StepList:
@@ -292,16 +292,18 @@ def create_edge_port() -> StepList:
* Deploy configuration on the new edge port, first as a dry run
* Deploy configuration on the new edge port, first as a dry run
* allocate LAG and LAG members in the Netbox.
* allocate LAG and LAG members in the Netbox.
"""
"""
 
router_is_nokia = conditional(lambda state: state["subscription"]["edge_port"]["node"]["vendor"] == Vendor.NOKIA)
 
return (
return (
begin
begin
>> create_subscription
>> create_subscription
>> store_process_subscription(Target.CREATE)
>> store_process_subscription(Target.CREATE)
>> initialize_subscription
>> initialize_subscription
>> start_moodi()
>> start_moodi()
>> reserve_interfaces_in_netbox
>> router_is_nokia(reserve_interfaces_in_netbox)
>> lso_interaction(create_edge_port_dry)
>> lso_interaction(create_edge_port_dry)
>> lso_interaction(create_edge_port_real)
>> lso_interaction(create_edge_port_real)
>> allocate_interfaces_in_netbox
>> router_is_nokia(allocate_interfaces_in_netbox)
>> set_status(SubscriptionLifecycle.ACTIVE)
>> set_status(SubscriptionLifecycle.ACTIVE)
>> resync
>> resync
>> stop_moodi()
>> stop_moodi()
Loading