Skip to content
Snippets Groups Projects

Feature/manage sid and gids

Merged Neda Moeini requested to merge feature/manage-sid-and-gids into develop
All threads resolved!
2 files
+ 4
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -22,6 +22,7 @@ from gso.products.product_types.router import Router
from gso.services.lso_client import LSOState, lso_interaction
from gso.services.netbox_client import NetboxClient
from gso.services.partners import get_partner_by_id
from gso.services.subscriptions import make_unique_ga_id
from gso.utils.helpers import (
active_pe_router_selector,
available_interfaces_choices,
@@ -52,7 +53,6 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
minimum_links: int
mac_address: str | None = None
ignore_if_down: bool = False
ga_id: str | None = None
@model_validator(mode="after")
def validate_number_of_members(self) -> Self:
@@ -104,7 +104,6 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
"minimum_links",
"mac_address",
"ignore_if_down",
"ga_id",
"enable_lacp",
"edge_port_name",
"edge_port_description",
@@ -134,7 +133,6 @@ def initialize_subscription(
encapsulation: EncapsulationType,
name: str,
minimum_links: int,
ga_id: str | None,
mac_address: str | None,
partner: str,
enable_lacp: bool, # noqa: FBT001
@@ -152,6 +150,7 @@ def initialize_subscription(
subscription.edge_port.edge_port_name = name
subscription.edge_port.minimum_links = minimum_links
subscription.edge_port.ignore_if_down = ignore_if_down
ga_id = make_unique_ga_id()
subscription.edge_port.ga_id = ga_id
subscription.edge_port.mac_address = mac_address
partner_name = get_partner_by_id(partner).name
Loading