diff --git a/gso/products/product_blocks/l3_core_vrf.py b/gso/products/product_blocks/l3_core_vrf.py deleted file mode 100644 index eb352402abb38590521210e1fb3b2d54842d2cd3..0000000000000000000000000000000000000000 --- a/gso/products/product_blocks/l3_core_vrf.py +++ /dev/null @@ -1,46 +0,0 @@ -"""Product blocks for Layer 3 Core VRF products.""" - -from orchestrator.domain.base import ProductBlockModel -from orchestrator.types import SubscriptionLifecycle -from pydantic import Field - -from gso.products.product_blocks.nren_l3_core_service import ( - NRENAccessPort, - NRENAccessPortInactive, - NRENAccessPortProvisioning, -) - - -class L3CoreVRFBlockInactive( - ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="L3CoreVRFBlock" -): - """An inactive Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.""" - - vrf_ap_list: list[NRENAccessPortInactive] = Field(default_factory=list) - vrf_name: str - route_distinguisher: str - route_target: str - - -class L3CoreVRFBlockProvisioning( - L3CoreVRFBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] -): - """A provisioning Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.""" - - vrf_ap_list: list[NRENAccessPortProvisioning] # type: ignore[assignment] - vrf_name: str - route_distinguisher: str - route_target: str - - -class L3CoreVRFBlock(L3CoreVRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): - """Represents an active Layer 3 Core VRF service subscription block.""" - - #: List of Access Points associated with this VRF. - nren_ap_list: list[NRENAccessPort] # type: ignore[assignment] - #: Unique name identifying this VRF. - vrf_name: str - #: Route Distinguisher (RD) ensuring unique route identification within this VRF. - route_distinguisher: str - #: Route Target (RT) defining routing policies for importing/exporting routes. - route_target: str diff --git a/gso/products/product_blocks/vrf.py b/gso/products/product_blocks/vrf.py new file mode 100644 index 0000000000000000000000000000000000000000..0c4bd10be1082e890d7b418a365932cfc9c267c4 --- /dev/null +++ b/gso/products/product_blocks/vrf.py @@ -0,0 +1,40 @@ +"""Product blocks for VRF.""" + +from orchestrator.domain.base import ProductBlockModel +from orchestrator.types import SubscriptionLifecycle + +from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning + + +class VRFBlockInactive( + ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="VRFBlock" +): + """An inactive :term:`VRF` subscription. See :class:`VRFBlock`.""" + + vrf_router_list: list[RouterBlockInactive] + vrf_name: str + route_distinguisher: str + route_target: str + + +class VRFBlockProvisioning(VRFBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] +): + """A provisioning :term:`VRF` subscription. See :class:`VRFBlock`.""" + + vrf_router_list: list[RouterBlockProvisioning] + vrf_name: str + route_distinguisher: str + route_target: str + + +class VRFBlock(VRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): + """Represents an active :term:`VRF` subscription block.""" + + #: List of VRF routers + vrf_router_list: list[RouterBlock] + #: Unique name identifying this VRF. + vrf_name: str + #: Route Distinguisher (RD) ensuring unique route identification within this VRF. + route_distinguisher: str + #: Route Target (RT) defining routing policies for importing/exporting routes. + route_target: str