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.types import SubscriptionLifecycle
from pydantic import Field
from gso.products.product_blocks.nren_l3_core_service import (
NRENAccessPort,
NRENAccessPortInactive,
NRENAccessPortProvisioning,
)
from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning
class L3CoreVRFBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="L3CoreVRFBlock"
class VRFBlockInactive(
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
route_distinguisher: str
route_target: str
class L3CoreVRFBlockProvisioning(
L3CoreVRFBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
class VRFBlockProvisioning(VRFBlockInactive, 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
route_distinguisher: str
route_target: str
class L3CoreVRFBlock(L3CoreVRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""Represents an active Layer 3 Core VRF service subscription block."""
class VRFBlock(VRFBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""Represents an active :term:`VRF` subscription block."""
#: List of Access Points associated with this VRF.
nren_ap_list: list[NRENAccessPort] # type: ignore[assignment]
#: 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.
......
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