Skip to content
Snippets Groups Projects

Added switch, LAN switch interconnect and pop VLAN products.

Merged Neda Moeini requested to merge feature/NAT-461-switches-domain-model into develop
All threads resolved!
Files
7
"""LAN Switch Interconnect product block that has all parameters of a subscription throughout its lifecycle."""
from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle, strEnum
from gso.products.product_blocks.iptrunk import LAGMemberList
from gso.products.product_blocks.router import RouterBlock, RouterBlockInactive, RouterBlockProvisioning
from gso.products.product_blocks.switch import SwitchBlock, SwitchBlockInactive, SwitchBlockProvisioning
class LanSwitchInterconnectAddressSpace(strEnum):
"""Types of LAN Switch Interconnect. Can be private or public."""
PRIVATE = "Private"
PUBLIC = "Public"
class LanSwitchInterconnectInterfaceBlockInactive(
ProductBlockModel,
lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectInterfaceBlock",
):
"""An inactive LAN Switch Interconnect interface."""
interface_name: str | None = None
interface_description: str | None = None
class LanSwitchInterconnectInterfaceBlockProvisioning(
LanSwitchInterconnectInterfaceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
):
"""A LAN Switch Interconnect interface that is being provisioned."""
interface_name: str
interface_description: str
class LanSwitchInterconnectInterfaceBlock(
LanSwitchInterconnectInterfaceBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]
):
"""An active Switch Interconnect interface."""
interface_name: str
interface_description: str
class LanSwitchInterconnectRouterSideBlockInactive(
ProductBlockModel,
lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectRouterSideBlock",
):
"""An inactive LAN Switch Interconnect router side."""
node: RouterBlockInactive
ae_iface: str | None = None
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlockInactive]
class LanSwitchInterconnectRouterSideBlockProvisioning(
LanSwitchInterconnectRouterSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
):
"""An LAN Switch Interconnect router side that is being provisioned."""
node: RouterBlockProvisioning
ae_iface: str | None = None
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlockProvisioning]
class LanSwitchInterconnectRouterSideBlock(
LanSwitchInterconnectRouterSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]
):
"""An active LAN Switch Interconnect router side."""
node: RouterBlock
ae_iface: str
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlock]
class LanSwitchInterconnectSwitchSideBlockInactive(
ProductBlockModel,
lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectSwitchSideBlock",
):
"""An inactive LAN Switch Interconnect switch side."""
node: SwitchBlockInactive
ae_iface: str | None = None
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlockInactive]
class LanSwitchInterconnectSwitchSideBlockProvisioning(
LanSwitchInterconnectSwitchSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
):
"""An LAN Switch Interconnect switch side that is being provisioned."""
node: SwitchBlockProvisioning
ae_iface: str | None = None
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlockProvisioning]
class LanSwitchInterconnectSwitchSideBlock(
LanSwitchInterconnectSwitchSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]
):
"""An active LAN Switch Interconnect switch side."""
node: SwitchBlock
ae_iface: str
ae_members: LAGMemberList[LanSwitchInterconnectInterfaceBlock]
class LanSwitchInterconnectBlockInactive(
ProductBlockModel,
lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectBlock",
):
"""A LAN Switch Interconnect that's currently inactive, see :class:`LanSwitchInterconnectBlock`."""
lan_switch_interconnect_description: str | None = None
address_space: LanSwitchInterconnectAddressSpace | None = None
minimum_links: int | None = None
router_side: LanSwitchInterconnectRouterSideBlockInactive
switch_side: LanSwitchInterconnectSwitchSideBlockInactive
class LanSwitchInterconnectBlockProvisioning(
LanSwitchInterconnectBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
):
"""A LAN Switch Interconnect that's currently being provisioned, see :class:`LanSwitchInterconnectBlock`."""
lan_switch_interconnect_description: str | None = None
address_space: LanSwitchInterconnectAddressSpace | None = None
minimum_links: int | None = None
router_side: LanSwitchInterconnectRouterSideBlockProvisioning
switch_side: LanSwitchInterconnectSwitchSideBlockProvisioning
class LanSwitchInterconnectBlock(LanSwitchInterconnectBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A LAN Switch Interconnect that's currently deployed in the network."""
#: A human-readable description of this LAN Switch Interconnect.
lan_switch_interconnect_description: str
#: The address space of the VLAN Switch Interconnect. It can be private or public.
address_space: LanSwitchInterconnectAddressSpace
#: The minimum amount of links the LAN Switch Interconnect should consist of.
minimum_links: int
#: The router side of the LAN Switch Interconnect.
router_side: LanSwitchInterconnectRouterSideBlock
#: The switch side of the LAN Switch Interconnect.
switch_side: LanSwitchInterconnectSwitchSideBlock
Loading