diff --git a/gso/products/__init__.py b/gso/products/__init__.py index 95bc3d0949bd4bf239587fda1594a2243caafb6d..143e3633422e76b7bdca593cbd3f0c7bf4e7cdf6 100644 --- a/gso/products/__init__.py +++ b/gso/products/__init__.py @@ -147,6 +147,7 @@ class ProductType(strEnum): COMMERCIAL_PEER = CommercialPeer.__name__ IMPORTED_COMMERCIAL_PEER = ImportedCommercialPeer.__name__ + SUBSCRIPTION_MODEL_REGISTRY.update( { ProductName.IP_TRUNK.value: Iptrunk, diff --git a/gso/products/product_blocks/commercial_peer.py b/gso/products/product_blocks/commercial_peer.py index 9cb8878bb11f5609a6fdb7c1c4a255eb22696406..ee6cc6fcfb2568ba5076387226bb34d72ec15f78 100644 --- a/gso/products/product_blocks/commercial_peer.py +++ b/gso/products/product_blocks/commercial_peer.py @@ -53,7 +53,7 @@ class CommercialPeerBlockInactive( ): """A Commercial Peer that's not yet provisioned. See ``CommercialPeerBlock``.""" - peering_connection: list[PeeringConnectionInactive] # type: ignore[assignment] + peering_connection: list[PeeringConnectionInactive] prefix_limit: NonNegativeInt | None = None @@ -65,7 +65,12 @@ class CommercialPeerBlockProvisioning(CommercialPeerBlockInactive, lifecycle=[Su class CommercialPeerBlock(CommercialPeerBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): - """An Internet Exchange Port that's active.""" + """An Internet Exchange Port that's active. + + Attributes: + peering_connection: The Peering connection block + prefix_limit: The prefix limit + """ peering_connection: list[PeeringConnection] # type: ignore[assignment] prefix_limit: NonNegativeInt | None = None diff --git a/gso/products/product_blocks/ix_port.py b/gso/products/product_blocks/ix_port.py index 3ae86a1b8de836c44e44f092ea41e593cdb18afd..bf3f8b71abd4b42ae710e1502ebef7db08c48faf 100644 --- a/gso/products/product_blocks/ix_port.py +++ b/gso/products/product_blocks/ix_port.py @@ -16,7 +16,7 @@ class L3InterfacePortBlockInactive( ): """A Layer 3 Interface Port Block that's not yet provisioned. See ``L3InterfacePortBlock``.""" - is_tagged: bool + is_tagged: bool | None = None vlan_id: VLAN_ID | None = None ipv4_address: IPv4AddressType | None = None ipv4_mask: IPv4Netmask | None = None @@ -76,10 +76,14 @@ class IXPortBlockInactive( class IXPortBlockProvisioning(IXPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): """An IX Port that's being provisioned. See ``IXPortBlock``.""" - l3_interface: L3InterfacePortBlockProvisioning + l3_interface: L3InterfacePortBlockProvisioning # type: ignore[assignment] class IXPortBlock(IXPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): - """An Internet Exchange Port that's active.""" + """An Internet Exchange Port that's active. + + Attributes: + l3_interface: The Layer 3 interface block associated with this IX port. + """ - l3_interface: L3InterfacePortBlock + l3_interface: L3InterfacePortBlock # type: ignore[assignment] diff --git a/gso/products/product_blocks/private_peer_port.py b/gso/products/product_blocks/private_peer_port.py index e88974582cab0c5335d7cf99eb50bc00790c8af7..dde021ed814813a80d802cfbfed9a3e9dce302f5 100644 --- a/gso/products/product_blocks/private_peer_port.py +++ b/gso/products/product_blocks/private_peer_port.py @@ -21,10 +21,14 @@ class PrivatePeerPortBlockInactive( class PrivatePeerPortBlockProvisioning(PrivatePeerPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): """An Private Peer Port that's being provisioned. See ``PrivatePeerPortBlock``.""" - l3_interface: L3InterfacePortBlockProvisioning + l3_interface: L3InterfacePortBlockProvisioning # type: ignore[assignment] class PrivatePeerPortBlock(PrivatePeerPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): - """A Private Provider Port that's active.""" + """A Private Provider Port that's active. - l3_interface: L3InterfacePortBlock + Attributes: + l3_interface: The Layer 3 interface block associated with this private peer port. + """ + + l3_interface: L3InterfacePortBlock # type: ignore[assignment] diff --git a/gso/products/product_blocks/transit_provider_port.py b/gso/products/product_blocks/transit_provider_port.py index 15696e215d6f9f224322b8f50a78db48267abbc4..f2a33eb1e6a19af4a010cd0ba5cc0ab2c1c977f1 100644 --- a/gso/products/product_blocks/transit_provider_port.py +++ b/gso/products/product_blocks/transit_provider_port.py @@ -23,10 +23,14 @@ class TransitProviderPortBlockProvisioning( ): """A Transit Provider Port that's being provisioned. See ``TransitProviderPortBlock``.""" - l3_interface: L3InterfacePortBlockProvisioning + l3_interface: L3InterfacePortBlockProvisioning # type: ignore[assignment] class TransitProviderPortBlock(TransitProviderPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): - """A Transit Provider Port that's active.""" + """A Transit Provider Port that's active. - l3_interface: L3InterfacePortBlock + Attributes: + l3_interface: The Layer 3 interface block associated with this transit provider port. + """ + + l3_interface: L3InterfacePortBlock # type: ignore[assignment]