From 4c30a2b93ff0fbe6b30f97c66fd48767cd055686 Mon Sep 17 00:00:00 2001
From: Neda Moeini <neda.moeini@geant.org>
Date: Thu, 17 Oct 2024 10:33:19 +0200
Subject: [PATCH] Update create edge port workflow after refactoring the model

---
 gso/workflows/edge_port/create_edge_port.py | 22 ++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gso/workflows/edge_port/create_edge_port.py b/gso/workflows/edge_port/create_edge_port.py
index 6e88ad53..1580de71 100644
--- a/gso/workflows/edge_port/create_edge_port.py
+++ b/gso/workflows/edge_port/create_edge_port.py
@@ -104,7 +104,7 @@ def initialize_subscription(
     service_type: EdgePortType,
     speed: PhysicalPortCapacity,
     encapsulation: EncapsulationType,
-    edge_port_name: str,
+    name: str,
     minimum_links: int,
     geant_ga_id: str | None,
     mac_address: str | None,
@@ -116,18 +116,18 @@ def initialize_subscription(
 ) -> State:
     """Initialise the subscription object in the service database."""
     router = Router.from_subscription(node).router
-    subscription.edge_port.edge_port_node = router
+    subscription.edge_port.node = router
     subscription.edge_port.edge_port_type = service_type
-    subscription.edge_port.edge_port_enable_lacp = enable_lacp
-    subscription.edge_port.edge_port_member_speed = speed
-    subscription.edge_port.edge_port_encapsulation = encapsulation
-    subscription.edge_port.edge_port_name = edge_port_name
-    subscription.edge_port.edge_port_minimum_links = minimum_links
-    subscription.edge_port.edge_port_ignore_if_down = ignore_if_down
-    subscription.edge_port.edge_port_geant_ga_id = geant_ga_id
-    subscription.edge_port.edge_port_mac_address = mac_address
+    subscription.edge_port.enable_lacp = enable_lacp
+    subscription.edge_port.member_speed = speed
+    subscription.edge_port.encapsulation = encapsulation
+    subscription.edge_port.edge_port_name = name
+    subscription.edge_port.minimum_links = minimum_links
+    subscription.edge_port.ignore_if_down = ignore_if_down
+    subscription.edge_port.geant_ga_id = geant_ga_id
+    subscription.edge_port.mac_address = mac_address
     partner_name = get_partner_by_id(partner).name
-    subscription.description = (f"Edge Port {edge_port_name} on {router.router_fqdn}, "
+    subscription.description = (f"Edge Port {name} on {router.router_fqdn}, "
                                 f"{partner_name}, {geant_ga_id or ""}")
     subscription.edge_port.edge_port_description = description
     for member in ae_members:
-- 
GitLab