From 15383b4cbe6fe4d9e480ae8473829fb9f9a64d4e Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <ak@geant.org>
Date: Thu, 1 May 2025 08:07:51 +0100
Subject: [PATCH] Exclude Netbox interaction for Juniper in `modify_edge_port`

---
 gso/workflows/edge_port/modify_edge_port.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gso/workflows/edge_port/modify_edge_port.py b/gso/workflows/edge_port/modify_edge_port.py
index 8a82d1467..03755ea86 100644
--- a/gso/workflows/edge_port/modify_edge_port.py
+++ b/gso/workflows/edge_port/modify_edge_port.py
@@ -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
     )
-- 
GitLab