Skip to content
Snippets Groups Projects
Commit 940aa3a5 authored by Neda Moeini's avatar Neda Moeini
Browse files

Improved VRF product block domain model.

parent 432a89fc
No related branches found
No related tags found
1 merge request!314Feature/vrf
"""Product blocks for Layer 3 Core VRF products.""" """Product blocks for VRF."""
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
from pydantic import Field
from gso.products.product_blocks.nren_l3_core_service import ( from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning
NRENAccessPort,
NRENAccessPortInactive,
NRENAccessPortProvisioning,
)
class L3CoreVRFBlockInactive( class VRFBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="L3CoreVRFBlock" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="VRFBlock"
): ):
"""An inactive Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.""" """An inactive :term:`VRF` subscription. See :class:`VRFBlock`."""
vrf_ap_list: list[NRENAccessPortInactive] = Field(default_factory=list) vrf_router_list: list[RouterBlockInactive]
vrf_name: str vrf_name: str
route_distinguisher: str route_distinguisher: str
route_target: str route_target: str
class L3CoreVRFBlockProvisioning( class VRFBlockProvisioning(VRFBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
L3CoreVRFBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
): ):
"""A provisioning Layer 3 Core VRF service subscription. See :class:`L3CoreVRFBlock`.""" """A provisioning :term:`VRF` subscription. See :class:`VRFBlock`."""
vrf_ap_list: list[NRENAccessPortProvisioning] # type: ignore[assignment] vrf_router_list: list[RouterBlockProvisioning]
vrf_name: str vrf_name: str
route_distinguisher: str route_distinguisher: str
route_target: str route_target: str
class L3CoreVRFBlock(L3CoreVRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class VRFBlock(VRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""Represents an active Layer 3 Core VRF service subscription block.""" """Represents an active :term:`VRF` subscription block."""
#: List of Access Points associated with this VRF. #: List of VRF routers
nren_ap_list: list[NRENAccessPort] # type: ignore[assignment] vrf_router_list: list[RouterBlock]
#: Unique name identifying this VRF. #: Unique name identifying this VRF.
vrf_name: str vrf_name: str
#: Route Distinguisher (RD) ensuring unique route identification within this VRF. #: Route Distinguisher (RD) ensuring unique route identification within this VRF.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment