Skip to content
Snippets Groups Projects
Verified Commit 4c30a2b9 authored by Neda Moeini's avatar Neda Moeini Committed by Karel van Klink
Browse files

Update create edge port workflow after refactoring the model

parent 52c83fc9
No related branches found
Tags 2.12
1 merge request!286Add Edge Port, GÉANT IP and IAS products
...@@ -104,7 +104,7 @@ def initialize_subscription( ...@@ -104,7 +104,7 @@ def initialize_subscription(
service_type: EdgePortType, service_type: EdgePortType,
speed: PhysicalPortCapacity, speed: PhysicalPortCapacity,
encapsulation: EncapsulationType, encapsulation: EncapsulationType,
edge_port_name: str, name: str,
minimum_links: int, minimum_links: int,
geant_ga_id: str | None, geant_ga_id: str | None,
mac_address: str | None, mac_address: str | None,
...@@ -116,18 +116,18 @@ def initialize_subscription( ...@@ -116,18 +116,18 @@ def initialize_subscription(
) -> State: ) -> State:
"""Initialise the subscription object in the service database.""" """Initialise the subscription object in the service database."""
router = Router.from_subscription(node).router 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_type = service_type
subscription.edge_port.edge_port_enable_lacp = enable_lacp subscription.edge_port.enable_lacp = enable_lacp
subscription.edge_port.edge_port_member_speed = speed subscription.edge_port.member_speed = speed
subscription.edge_port.edge_port_encapsulation = encapsulation subscription.edge_port.encapsulation = encapsulation
subscription.edge_port.edge_port_name = edge_port_name subscription.edge_port.edge_port_name = name
subscription.edge_port.edge_port_minimum_links = minimum_links subscription.edge_port.minimum_links = minimum_links
subscription.edge_port.edge_port_ignore_if_down = ignore_if_down subscription.edge_port.ignore_if_down = ignore_if_down
subscription.edge_port.edge_port_geant_ga_id = geant_ga_id subscription.edge_port.geant_ga_id = geant_ga_id
subscription.edge_port.edge_port_mac_address = mac_address subscription.edge_port.mac_address = mac_address
partner_name = get_partner_by_id(partner).name 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 ""}") f"{partner_name}, {geant_ga_id or ""}")
subscription.edge_port.edge_port_description = description subscription.edge_port.edge_port_description = description
for member in ae_members: for member in ae_members:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment