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

Exclude Netbox interaction for Juniper in `modify_edge_port`

parent a57e34dc
No related branches found
No related tags found
1 merge request!415Juniper Edge Port modification
Pipeline #93852 passed
......@@ -25,6 +25,7 @@ from gso.utils.helpers import (
available_interfaces_choices_including_current_members,
validate_edge_port_number_of_members_based_on_lacp,
)
from gso.utils.shared_enums import Vendor
from gso.utils.types.interfaces import LAGMember, PhysicalPortCapacity
from gso.utils.types.tt_number import TTNumber
from gso.utils.types.unique_field import validate_field_is_unique
......@@ -272,16 +273,17 @@ def modify_edge_port() -> StepList:
* Modify configuration on the new edge port, first as a dry run
* Change LAG and LAG members in the Netbox.
"""
router_is_nokia = conditional(lambda state: state["subscription"]["edge_port"]["node"]["vendor"] == Vendor.NOKIA)
capacity_has_changed = conditional(lambda state: state["capacity_has_changed"])
return (
begin
>> store_process_subscription(Target.MODIFY)
>> unsync
>> modify_edge_port_subscription
>> capacity_has_changed(update_interfaces_in_netbox)
>> capacity_has_changed(router_is_nokia(update_interfaces_in_netbox))
>> capacity_has_changed(lso_interaction(update_edge_port_dry))
>> capacity_has_changed(lso_interaction(update_edge_port_real))
>> capacity_has_changed(allocate_interfaces_in_netbox)
>> capacity_has_changed(router_is_nokia(allocate_interfaces_in_netbox))
>> resync
>> done
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment