From 285e9068ebe408638176edec9762946794c1f592 Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Fri, 6 Oct 2023 10:45:41 +0200 Subject: [PATCH] make iptrunk product block use the PhyPortCapacity enum --- gso/products/product_blocks/iptrunk.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gso/products/product_blocks/iptrunk.py b/gso/products/product_blocks/iptrunk.py index 3eb992d1..3efd0824 100644 --- a/gso/products/product_blocks/iptrunk.py +++ b/gso/products/product_blocks/iptrunk.py @@ -8,6 +8,7 @@ from orchestrator.forms.validators import UniqueConstrainedList from orchestrator.types import SubscriptionLifecycle, strEnum from pydantic import Field +from gso.products.product_blocks import PhyPortCapacity from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning @@ -58,7 +59,7 @@ class IptrunkBlockInactive( geant_s_sid: str | None = None iptrunk_description: str | None = None iptrunk_type: IptrunkType | None = None - iptrunk_speed: str | None = None + iptrunk_speed: PhyPortCapacity | None = None iptrunk_minimum_links: int | None = None iptrunk_isis_metric: int | None = None iptrunk_ipv4_network: ipaddress.IPv4Network | None = None @@ -73,7 +74,7 @@ class IptrunkBlockProvisioning(IptrunkBlockInactive, lifecycle=[SubscriptionLife geant_s_sid: str | None = None iptrunk_description: str | None = None iptrunk_type: IptrunkType | None = None - iptrunk_speed: str | None = None + iptrunk_speed: PhyPortCapacity | None = None iptrunk_minimum_links: int | None = None iptrunk_isis_metric: int | None = None iptrunk_ipv4_network: ipaddress.IPv4Network | None = None @@ -92,7 +93,7 @@ class IptrunkBlock(IptrunkBlockProvisioning, lifecycle=[SubscriptionLifecycle.AC #: The type of trunk, can be either dark fibre or leased capacity. iptrunk_type: IptrunkType #: The speed of the trunk, measured per interface associated with it. - iptrunk_speed: str # FIXME: should be of PhyPortCapacity type + iptrunk_speed: PhyPortCapacity #: The minimum amount of links the trunk should consist of. iptrunk_minimum_links: int #: The :term:`IS-IS` metric of this link -- GitLab