Skip to content
Snippets Groups Projects

new IP trunk migration

Merged Karel van Klink requested to merge feature/ip-trunk-migration into develop
5 files
+ 54
30
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -4,6 +4,7 @@ from typing import Optional
from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle, strEnum
from pydantic import ConstrainedInt
from gso.products.product_blocks.site import SiteBlock, SiteBlockInactive, SiteBlockProvisioning
@@ -28,13 +29,25 @@ class RouterRole(strEnum):
"""AMT router."""
class PortNumber(ConstrainedInt):
"""Constrained integer for valid port numbers.
The range from 49152 to 65535 is marked as ephemeral, and can therefore not be selected for permanent allocation.
"""
gt = 0
"""The lower bound of the valid port number range."""
le = 49151
"""As mentioned earlier, the ephemeral port range should not be chosen, and is therefore not available."""
class RouterBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="RouterBlock"
):
"""A router that's being currently inactive. See {class}`RouterBlock`."""
router_fqdn: Optional[str] = None
router_ts_port: Optional[int] = None
router_ts_port: Optional[PortNumber] = None
router_access_via_ts: Optional[bool] = None
router_lo_ipv4_address: Optional[ipaddress.IPv4Address] = None
router_lo_ipv6_address: Optional[ipaddress.IPv6Address] = None
@@ -52,7 +65,7 @@ class RouterBlockProvisioning(RouterBlockInactive, lifecycle=[SubscriptionLifecy
"""A router that's being provisioned. See {class}`RouterBlock`."""
router_fqdn: str
router_ts_port: int
router_ts_port: PortNumber
router_access_via_ts: Optional[bool] = None
router_lo_ipv4_address: Optional[ipaddress.IPv4Address] = None
router_lo_ipv6_address: Optional[ipaddress.IPv6Address] = None
@@ -71,9 +84,8 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI
router_fqdn: str
"""{term}`FQDN` of a router."""
router_ts_port: int
"""The port of the terminal server that this router is connected to. Used for the same reason as mentioned
previously."""
router_ts_port: PortNumber
"""The port of the terminal server that this router is connected to. Used to provide out of band access."""
router_access_via_ts: bool
"""Whether this router should be accessed through the terminal server, or through its loopback address."""
router_lo_ipv4_address: ipaddress.IPv4Address
Loading