Skip to content
Snippets Groups Projects

Add Edge Port, GÉANT IP and IAS products

Merged Karel van Klink requested to merge feature/add-geant-ip into develop
All threads resolved!
9 files
+ 311
39
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -29,12 +29,12 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
subscription = GeantIP.from_subscription(subscription_id)
class AccessPortSelection(BaseModel):
geant_ip_ep: active_edge_port_selector(partner_id=subscription.customer_id) # type: ignore[valid-type]
geant_ip_ep: active_edge_port_selector(partner_id=subscription.customer_id) | str # type: ignore[valid-type]
nren_ap_type: APType
def validate_edge_ports_are_unique(access_ports: list[AccessPortSelection]) -> list[AccessPortSelection]:
"""Verify if interfaces are unique."""
edge_ports = [port.geant_ip_ep.name for port in access_ports]
edge_ports = [str(port.geant_ip_ep) for port in access_ports]
if len(edge_ports) != len(set(edge_ports)):
msg = "Edge Ports must be unique."
raise ValueError(msg)
Loading