Skip to content
Snippets Groups Projects
Verified Commit 2bcd57ab authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Reformat all docstrings from Sphinx to Google style

parent 1266d3fd
No related branches found
No related tags found
No related merge requests found
Showing
with 126 additions and 126 deletions
...@@ -43,10 +43,9 @@ def ensure_openid_config_loaded(func: Callable) -> Callable: ...@@ -43,10 +43,9 @@ def ensure_openid_config_loaded(func: Callable) -> Callable:
class OIDCAuthentication(OIDCAuth): class OIDCAuthentication(OIDCAuth):
"""OIDCUser class extends the :term:`HTTPBearer` class to do extra verification. """OIDCUser class extends the ``HTTPBearer`` class to do extra verification.
The class will act as follows: The class will act as follows: Validate the Credentials at the AAI proxy by calling the UserInfo endpoint.
1. Validate the Credentials at :term: `AAI` proxy by calling the UserInfo endpoint
""" """
@staticmethod @staticmethod
...@@ -58,10 +57,12 @@ class OIDCAuthentication(OIDCAuth): ...@@ -58,10 +57,12 @@ class OIDCAuthentication(OIDCAuth):
async def userinfo(self, async_request: AsyncClient, token: str) -> OIDCUserModel: async def userinfo(self, async_request: AsyncClient, token: str) -> OIDCUserModel:
"""Get the userinfo from the openid server. """Get the userinfo from the openid server.
:param AsyncClient async_request: The async request Args:
:param str token: the access_token async_request: The async request.
:return: OIDCUserModel: OIDC user model from openid server token: The access token.
Returns:
OIDCUserModel: OIDC user model from openid server.
""" """
assert self.openid_config is not None, "OpenID config is not loaded" # noqa: S101 assert self.openid_config is not None, "OpenID config is not loaded" # noqa: S101
...@@ -104,9 +105,12 @@ class OIDCAuthentication(OIDCAuth): ...@@ -104,9 +105,12 @@ class OIDCAuthentication(OIDCAuth):
async def introspect_token(self, async_request: AsyncClient, token: str) -> dict: async def introspect_token(self, async_request: AsyncClient, token: str) -> dict:
"""Introspect the access token to see if it is a valid token. """Introspect the access token to see if it is a valid token.
:param async_request: The async request Args:
:param token: the access_token async_request: The async request
:return: dict from openid server token: the access_token
Returns:
dict from openid server
""" """
assert self.openid_config is not None, "OpenID config is not loaded" # noqa: S101 assert self.openid_config is not None, "OpenID config is not loaded" # noqa: S101
......
...@@ -64,11 +64,11 @@ class CreatePartner(BaseModel): ...@@ -64,11 +64,11 @@ class CreatePartner(BaseModel):
class SiteImportModel(BaseSiteValidatorModel): class SiteImportModel(BaseSiteValidatorModel):
"""The required input for importing an existing :class:`gso.products.product_types.site`.""" """The required input for importing an existing ``gso.products.product_types.site``."""
class RouterImportModel(BaseModel): class RouterImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.product.product_types.router`.""" """Required fields for importing an existing ``gso.product.product_types.router``."""
partner: str partner: str
router_site: str router_site: str
...@@ -82,7 +82,7 @@ class RouterImportModel(BaseModel): ...@@ -82,7 +82,7 @@ class RouterImportModel(BaseModel):
class SwitchImportModel(BaseModel): class SwitchImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.product.product_types.switch`.""" """Required fields for importing an existing ``gso.product.product_types.switch``."""
fqdn: str fqdn: str
ts_port: PortNumber ts_port: PortNumber
...@@ -92,7 +92,7 @@ class SwitchImportModel(BaseModel): ...@@ -92,7 +92,7 @@ class SwitchImportModel(BaseModel):
class SuperPopSwitchImportModel(BaseModel): class SuperPopSwitchImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.product.product_types.super_pop_switch`.""" """Required fields for importing an existing ``gso.product.product_types.super_pop_switch``."""
partner: str partner: str
super_pop_switch_site: str super_pop_switch_site: str
...@@ -102,7 +102,7 @@ class SuperPopSwitchImportModel(BaseModel): ...@@ -102,7 +102,7 @@ class SuperPopSwitchImportModel(BaseModel):
class OfficeRouterImportModel(BaseModel): class OfficeRouterImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.product.product_types.office_router`.""" """Required fields for importing an existing ``gso.product.product_types.office_router``."""
partner: str partner: str
office_router_site: str office_router_site: str
...@@ -113,7 +113,7 @@ class OfficeRouterImportModel(BaseModel): ...@@ -113,7 +113,7 @@ class OfficeRouterImportModel(BaseModel):
class IptrunkImportModel(BaseModel): class IptrunkImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.products.product_types.iptrunk`.""" """Required fields for importing an existing ``gso.products.product_types.iptrunk``."""
partner: str partner: str
geant_s_sid: str | None geant_s_sid: str | None
...@@ -178,7 +178,7 @@ class IptrunkImportModel(BaseModel): ...@@ -178,7 +178,7 @@ class IptrunkImportModel(BaseModel):
class OpenGearImportModel(BaseModel): class OpenGearImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.products.product_types.opengear`.""" """Required fields for importing an existing ``gso.products.product_types.opengear``."""
partner: str partner: str
opengear_site: str opengear_site: str
...@@ -189,7 +189,7 @@ class OpenGearImportModel(BaseModel): ...@@ -189,7 +189,7 @@ class OpenGearImportModel(BaseModel):
class EdgePortImportModel(BaseModel): class EdgePortImportModel(BaseModel):
"""Required fields for importing an existing :class:`gso.products.product_types.edge_port`.""" """Required fields for importing an existing ``gso.products.product_types.edge_port``."""
node: str node: str
service_type: EdgePortType service_type: EdgePortType
......
...@@ -30,7 +30,6 @@ def run_migrations_offline() -> None: ...@@ -30,7 +30,6 @@ def run_migrations_offline() -> None:
Calls to context.execute() here emit the given string to the Calls to context.execute() here emit the given string to the
script output. script output.
""" """
url = config.get_main_option("sqlalchemy.url") url = config.get_main_option("sqlalchemy.url")
context.configure( context.configure(
...@@ -46,7 +45,6 @@ def run_migrations_online() -> None: ...@@ -46,7 +45,6 @@ def run_migrations_online() -> None:
In this scenario we need to create an Engine In this scenario we need to create an Engine
and associate a connection with the context. and associate a connection with the context.
""" """
# this callback is used to prevent an auto-migration from being generated # this callback is used to prevent an auto-migration from being generated
......
""":term:`BGP` session product block.""" """BGP session product block."""
import strawberry import strawberry
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
...@@ -11,7 +11,7 @@ from gso.utils.types.ip_address import IPAddress ...@@ -11,7 +11,7 @@ from gso.utils.types.ip_address import IPAddress
@strawberry.enum @strawberry.enum
class IPFamily(strEnum): class IPFamily(strEnum):
"""Possible IP families of a :term:`BGP` peering.""" """Possible IP families of a BGP peering."""
V4UNICAST = "ipv4" V4UNICAST = "ipv4"
V6UNICAST = "ipv6" V6UNICAST = "ipv6"
...@@ -21,14 +21,14 @@ class IPFamily(strEnum): ...@@ -21,14 +21,14 @@ class IPFamily(strEnum):
@strawberry.enum @strawberry.enum
class IPTypes(strEnum): class IPTypes(strEnum):
"""Possible IP types of a :term:`BGP` peering.""" """Possible IP types of a BGP peering."""
IPV4 = "ipv4" IPV4 = "ipv4"
IPV6 = "ipv6" IPV6 = "ipv6"
class BGPSessionInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="BGPSession"): class BGPSessionInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="BGPSession"):
"""A :term:`BGP` session that is currently inactive. See :class:`BGPSession`.""" """A BGP session that is currently inactive. See ``BGPSession``."""
peer_address: IPAddress | None = None peer_address: IPAddress | None = None
families: list[IPFamily] = Field(default_factory=list) families: list[IPFamily] = Field(default_factory=list)
...@@ -45,7 +45,7 @@ class BGPSessionInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INI ...@@ -45,7 +45,7 @@ class BGPSessionInactive(ProductBlockModel, lifecycle=[SubscriptionLifecycle.INI
class BGPSessionProvisioning(BGPSessionInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class BGPSessionProvisioning(BGPSessionInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A :term:`BGP` session that is currently being provisioned. See :class:`BGPSession`.""" """A BGP session that is currently being provisioned. See ``BGPSession``."""
peer_address: IPAddress peer_address: IPAddress
families: list[IPFamily] families: list[IPFamily]
...@@ -62,7 +62,7 @@ class BGPSessionProvisioning(BGPSessionInactive, lifecycle=[SubscriptionLifecycl ...@@ -62,7 +62,7 @@ class BGPSessionProvisioning(BGPSessionInactive, lifecycle=[SubscriptionLifecycl
class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A :term:`BGP` session that is currently deployed in the network.""" """A BGP session that is currently deployed in the network."""
#: The peering address of the session. #: The peering address of the session.
peer_address: IPAddress peer_address: IPAddress
...@@ -70,7 +70,7 @@ class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE ...@@ -70,7 +70,7 @@ class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE
families: list[IPFamily] families: list[IPFamily]
#: Whether any custom policies exist for this session. #: Whether any custom policies exist for this session.
has_custom_policies: bool has_custom_policies: bool
#: The authentication key of the :term:`BGP` session. #: The authentication key of the BGP session.
authentication_key: str | None authentication_key: str | None
#: Whether multi-path is enabled. #: Whether multi-path is enabled.
multipath_enabled: bool multipath_enabled: bool
...@@ -82,7 +82,7 @@ class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE ...@@ -82,7 +82,7 @@ class BGPSession(BGPSessionProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE
is_passive: bool is_passive: bool
#: Whether Remote Triggered Blackhole is enabled #: Whether Remote Triggered Blackhole is enabled
rtbh_enabled: bool rtbh_enabled: bool
#: Settings for :term:`BFD`. #: Settings for BFD.
bfd_enabled: bool bfd_enabled: bool
#: The IP type of the session. #: The IP type of the session.
ip_type: IPTypes ip_type: IPTypes
......
...@@ -60,7 +60,7 @@ class EdgePortAEMemberBlock(EdgePortAEMemberBlockProvisioning, lifecycle=[Subscr ...@@ -60,7 +60,7 @@ class EdgePortAEMemberBlock(EdgePortAEMemberBlockProvisioning, lifecycle=[Subscr
class EdgePortBlockInactive( class EdgePortBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="EdgePortBlock" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="EdgePortBlock"
): ):
"""An edge port that's currently inactive. See :class:`EdgePortBlock`.""" """An edge port that's currently inactive. See ``EdgePortBlock``."""
node: RouterBlockInactive | None = None node: RouterBlockInactive | None = None
edge_port_name: str | None = None edge_port_name: str | None = None
...@@ -77,7 +77,7 @@ class EdgePortBlockInactive( ...@@ -77,7 +77,7 @@ class EdgePortBlockInactive(
class EdgePortBlockProvisioning(EdgePortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class EdgePortBlockProvisioning(EdgePortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""An edge port that's being provisioned. See :class:`EdgePortBlock`.""" """An edge port that's being provisioned. See ``EdgePortBlock``."""
node: RouterBlockProvisioning node: RouterBlockProvisioning
edge_port_name: str edge_port_name: str
...@@ -98,11 +98,11 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle. ...@@ -98,11 +98,11 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle.
#: The router that this edge port is connected to. #: The router that this edge port is connected to.
node: RouterBlock node: RouterBlock
#: The name of the edge port, in our case, corresponds to the name of the :term:`LAG` interface. #: The name of the edge port, in our case, corresponds to the name of the LAG interface.
edge_port_name: str edge_port_name: str
#: A description of the edge port. #: A description of the edge port.
edge_port_description: str | None = None edge_port_description: str | None = None
#: Indicates whether :term:`LACP` is enabled for this edge port. #: Indicates whether LACP is enabled for this edge port.
enable_lacp: bool enable_lacp: bool
#: The type of encapsulation used on this edge port, by default DOT1Q. #: The type of encapsulation used on this edge port, by default DOT1Q.
encapsulation: EncapsulationType = EncapsulationType.DOT1Q encapsulation: EncapsulationType = EncapsulationType.DOT1Q
...@@ -118,5 +118,5 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle. ...@@ -118,5 +118,5 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle.
ignore_if_down: bool = False ignore_if_down: bool = False
#: The GEANT GA ID associated with this edge port, if any. #: The GEANT GA ID associated with this edge port, if any.
geant_ga_id: str | None = None geant_ga_id: str | None = None
#: A list of :term:`LAG` members associated with this edge port. #: A list of LAG members associated with this edge port.
edge_port_ae_members: LAGMemberList[EdgePortAEMemberBlock] # type: ignore[assignment] edge_port_ae_members: LAGMemberList[EdgePortAEMemberBlock] # type: ignore[assignment]
...@@ -94,7 +94,7 @@ class IptrunkBlockInactive( ...@@ -94,7 +94,7 @@ class IptrunkBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="IptrunkBlock", product_block_name="IptrunkBlock",
): ):
"""A trunk that's currently inactive, see :class:`IptrunkBlock`.""" """A trunk that's currently inactive, see ``IptrunkBlock``."""
geant_s_sid: str | None = None geant_s_sid: str | None = None
iptrunk_description: str | None = None iptrunk_description: str | None = None
...@@ -108,7 +108,7 @@ class IptrunkBlockInactive( ...@@ -108,7 +108,7 @@ class IptrunkBlockInactive(
class IptrunkBlockProvisioning(IptrunkBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class IptrunkBlockProvisioning(IptrunkBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A trunk that's currently being provisioned, see :class:`IptrunkBlock`.""" """A trunk that's currently being provisioned, see ``IptrunkBlock``."""
geant_s_sid: str | None = None geant_s_sid: str | None = None
iptrunk_description: str | None = None iptrunk_description: str | None = None
......
...@@ -31,20 +31,20 @@ class AccessPort(AccessPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE ...@@ -31,20 +31,20 @@ class AccessPort(AccessPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE
#: The type of Access Port #: The type of Access Port
ap_type: APType ap_type: APType
#: The corresponding :term:`SBP` of this Access Port. #: The corresponding SBP of this Access Port.
sbp: ServiceBindingPort sbp: ServiceBindingPort
class L3CoreServiceBlockInactive( class L3CoreServiceBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="L3CoreServiceBlock" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="L3CoreServiceBlock"
): ):
"""An inactive L3 Core service subscription. See :class:`L3CoreServiceBlock`.""" """An inactive L3 Core service subscription. See ``L3CoreServiceBlock``."""
ap_list: list[AccessPortInactive] = Field(default_factory=list) ap_list: list[AccessPortInactive] = Field(default_factory=list)
class L3CoreServiceBlockProvisioning(L3CoreServiceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class L3CoreServiceBlockProvisioning(L3CoreServiceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A provisioning L3 Core Service subscription. See :class:`L3CoreServiceBlock`.""" """A provisioning L3 Core Service subscription. See ``L3CoreServiceBlock``."""
ap_list: list[AccessPortProvisioning] # type: ignore[assignment] ap_list: list[AccessPortProvisioning] # type: ignore[assignment]
......
...@@ -14,7 +14,7 @@ class LanSwitchInterconnectInterfaceBlockInactive( ...@@ -14,7 +14,7 @@ class LanSwitchInterconnectInterfaceBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectInterfaceBlock", product_block_name="LanSwitchInterconnectInterfaceBlock",
): ):
"""An inactive :term:`LAN` Switch Interconnect interface.""" """An inactive LAN Switch Interconnect interface."""
interface_name: str | None = None interface_name: str | None = None
interface_description: str | None = None interface_description: str | None = None
...@@ -23,7 +23,7 @@ class LanSwitchInterconnectInterfaceBlockInactive( ...@@ -23,7 +23,7 @@ class LanSwitchInterconnectInterfaceBlockInactive(
class LanSwitchInterconnectInterfaceBlockProvisioning( class LanSwitchInterconnectInterfaceBlockProvisioning(
LanSwitchInterconnectInterfaceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] LanSwitchInterconnectInterfaceBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
): ):
"""A :term:`LAN` Switch Interconnect interface that is being provisioned.""" """A LAN Switch Interconnect interface that is being provisioned."""
interface_name: str interface_name: str
interface_description: str interface_description: str
...@@ -43,7 +43,7 @@ class LanSwitchInterconnectRouterSideBlockInactive( ...@@ -43,7 +43,7 @@ class LanSwitchInterconnectRouterSideBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectRouterSideBlock", product_block_name="LanSwitchInterconnectRouterSideBlock",
): ):
"""An inactive :term:`LAN` Switch Interconnect router side.""" """An inactive LAN Switch Interconnect router side."""
node: RouterBlockInactive node: RouterBlockInactive
ae_iface: str | None = None ae_iface: str | None = None
...@@ -54,7 +54,7 @@ class LanSwitchInterconnectRouterSideBlockInactive( ...@@ -54,7 +54,7 @@ class LanSwitchInterconnectRouterSideBlockInactive(
class LanSwitchInterconnectRouterSideBlockProvisioning( class LanSwitchInterconnectRouterSideBlockProvisioning(
LanSwitchInterconnectRouterSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] LanSwitchInterconnectRouterSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
): ):
"""A :term:`LAN` Switch Interconnect router side that is being provisioned.""" """A LAN Switch Interconnect router side that is being provisioned."""
node: RouterBlockProvisioning node: RouterBlockProvisioning
ae_iface: str | None = None ae_iface: str | None = None
...@@ -65,7 +65,7 @@ class LanSwitchInterconnectRouterSideBlockProvisioning( ...@@ -65,7 +65,7 @@ class LanSwitchInterconnectRouterSideBlockProvisioning(
class LanSwitchInterconnectRouterSideBlock( class LanSwitchInterconnectRouterSideBlock(
LanSwitchInterconnectRouterSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE] LanSwitchInterconnectRouterSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]
): ):
"""An active :term:`LAN` Switch Interconnect router side.""" """An active LAN Switch Interconnect router side."""
node: RouterBlock node: RouterBlock
ae_iface: str ae_iface: str
...@@ -78,7 +78,7 @@ class LanSwitchInterconnectSwitchSideBlockInactive( ...@@ -78,7 +78,7 @@ class LanSwitchInterconnectSwitchSideBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectSwitchSideBlock", product_block_name="LanSwitchInterconnectSwitchSideBlock",
): ):
"""An inactive :term:`LAN` Switch Interconnect switch side.""" """An inactive LAN Switch Interconnect switch side."""
switch: SwitchBlockInactive switch: SwitchBlockInactive
ae_iface: str | None = None ae_iface: str | None = None
...@@ -89,7 +89,7 @@ class LanSwitchInterconnectSwitchSideBlockInactive( ...@@ -89,7 +89,7 @@ class LanSwitchInterconnectSwitchSideBlockInactive(
class LanSwitchInterconnectSwitchSideBlockProvisioning( class LanSwitchInterconnectSwitchSideBlockProvisioning(
LanSwitchInterconnectSwitchSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] LanSwitchInterconnectSwitchSideBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
): ):
"""A :term:`LAN` Switch Interconnect switch side that is being provisioned.""" """A LAN Switch Interconnect switch side that is being provisioned."""
switch: SwitchBlockProvisioning switch: SwitchBlockProvisioning
ae_iface: str | None = None ae_iface: str | None = None
...@@ -100,7 +100,7 @@ class LanSwitchInterconnectSwitchSideBlockProvisioning( ...@@ -100,7 +100,7 @@ class LanSwitchInterconnectSwitchSideBlockProvisioning(
class LanSwitchInterconnectSwitchSideBlock( class LanSwitchInterconnectSwitchSideBlock(
LanSwitchInterconnectSwitchSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE] LanSwitchInterconnectSwitchSideBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]
): ):
"""An active :term:`LAN` Switch Interconnect switch side.""" """An active LAN Switch Interconnect switch side."""
switch: SwitchBlock switch: SwitchBlock
ae_iface: str ae_iface: str
...@@ -113,7 +113,7 @@ class LanSwitchInterconnectBlockInactive( ...@@ -113,7 +113,7 @@ class LanSwitchInterconnectBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="LanSwitchInterconnectBlock", product_block_name="LanSwitchInterconnectBlock",
): ):
"""A :term:`LAN` Switch Interconnect that's currently inactive, see :class:`LanSwitchInterconnectBlock`.""" """A LAN Switch Interconnect that's currently inactive, see ``LanSwitchInterconnectBlock``."""
lan_switch_interconnect_description: str | None = None lan_switch_interconnect_description: str | None = None
lan_switch_interconnect_ip_network: IPv4NetworkType | None = None lan_switch_interconnect_ip_network: IPv4NetworkType | None = None
...@@ -126,7 +126,7 @@ class LanSwitchInterconnectBlockInactive( ...@@ -126,7 +126,7 @@ class LanSwitchInterconnectBlockInactive(
class LanSwitchInterconnectBlockProvisioning( class LanSwitchInterconnectBlockProvisioning(
LanSwitchInterconnectBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING] LanSwitchInterconnectBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]
): ):
"""A :term:`LAN` Switch Interconnect that's currently being provisioned, see :class:`LanSwitchInterconnectBlock`.""" """A LAN Switch Interconnect that's currently being provisioned, see ``LanSwitchInterconnectBlock``."""
lan_switch_interconnect_description: str | None = None lan_switch_interconnect_description: str | None = None
lan_switch_interconnect_ip_network: IPv4NetworkType | None lan_switch_interconnect_ip_network: IPv4NetworkType | None
...@@ -137,17 +137,17 @@ class LanSwitchInterconnectBlockProvisioning( ...@@ -137,17 +137,17 @@ class LanSwitchInterconnectBlockProvisioning(
class LanSwitchInterconnectBlock(LanSwitchInterconnectBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class LanSwitchInterconnectBlock(LanSwitchInterconnectBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A :term:`LAN` Switch Interconnect that's currently deployed in the network.""" """A LAN Switch Interconnect that's currently deployed in the network."""
#: A human-readable description of this :term:`LAN` Switch Interconnect. #: A human-readable description of this LAN Switch Interconnect.
lan_switch_interconnect_description: str lan_switch_interconnect_description: str
#: The :term:`IP` resources for this :term:`VLAN` Switch Interconnect. #: The IP resources for this VLAN Switch Interconnect.
lan_switch_interconnect_ip_network: IPv4NetworkType | None lan_switch_interconnect_ip_network: IPv4NetworkType | None
#: The address space of the :term:`VLAN` Switch Interconnect. It can be private or public. #: The address space of the VLAN Switch Interconnect. It can be private or public.
address_space: AddressSpace address_space: AddressSpace
#: The minimum amount of links the :term:`LAN` Switch Interconnect should consist of. #: The minimum amount of links the LAN Switch Interconnect should consist of.
minimum_links: int minimum_links: int
#: The router side of the :term:`LAN` Switch Interconnect. #: The router side of the LAN Switch Interconnect.
router_side: LanSwitchInterconnectRouterSideBlock router_side: LanSwitchInterconnectRouterSideBlock
#: The switch side of the :term:`LAN` Switch Interconnect. #: The switch side of the LAN Switch Interconnect.
switch_side: LanSwitchInterconnectSwitchSideBlock switch_side: LanSwitchInterconnectSwitchSideBlock
...@@ -69,7 +69,7 @@ class Layer2CircuitType(strEnum): ...@@ -69,7 +69,7 @@ class Layer2CircuitType(strEnum):
class Layer2CircuitBlockInactive( class Layer2CircuitBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="Layer2CircuitBlock" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="Layer2CircuitBlock"
): ):
"""An inactive Layer 2 Circuit, see :class:`Layer2CircuitBlock`.""" """An inactive Layer 2 Circuit, see ``Layer2CircuitBlock``."""
layer_2_circuit_sides: Layer2CircuitSides[Layer2CircuitSideBlockInactive] layer_2_circuit_sides: Layer2CircuitSides[Layer2CircuitSideBlockInactive]
virtual_circuit_id: VC_ID | None = None virtual_circuit_id: VC_ID | None = None
...@@ -82,7 +82,7 @@ class Layer2CircuitBlockInactive( ...@@ -82,7 +82,7 @@ class Layer2CircuitBlockInactive(
class Layer2CircuitBlockProvisioning(Layer2CircuitBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class Layer2CircuitBlockProvisioning(Layer2CircuitBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A provisioning Layer 2 Circuit, see :class:`Layer2CircuitBlock`.""" """A provisioning Layer 2 Circuit, see ``Layer2CircuitBlock``."""
layer_2_circuit_sides: Layer2CircuitSides[Layer2CircuitSideBlockProvisioning] layer_2_circuit_sides: Layer2CircuitSides[Layer2CircuitSideBlockProvisioning]
virtual_circuit_id: VC_ID virtual_circuit_id: VC_ID
...@@ -103,7 +103,7 @@ class Layer2CircuitBlock(Layer2CircuitBlockProvisioning, lifecycle=[Subscription ...@@ -103,7 +103,7 @@ class Layer2CircuitBlock(Layer2CircuitBlockProvisioning, lifecycle=[Subscription
virtual_circuit_id: VC_ID virtual_circuit_id: VC_ID
#: The type of circuit, can be tagged or untagged. #: The type of circuit, can be tagged or untagged.
layer_2_circuit_type: Layer2CircuitType layer_2_circuit_type: Layer2CircuitType
#: If tagged, the lower and upper bounds will set the :term:`VLAN` range. #: If tagged, the lower and upper bounds will set the VLAN range.
vlan_range_lower_bound: VLAN_ID | None vlan_range_lower_bound: VLAN_ID | None
#: Lower and Upper bounds are including. #: Lower and Upper bounds are including.
vlan_range_upper_bound: VLAN_ID | None vlan_range_upper_bound: VLAN_ID | None
......
"""Product block for :class:`office router` products.""" """Product block for office router products."""
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
...@@ -17,7 +17,7 @@ class OfficeRouterBlockInactive( ...@@ -17,7 +17,7 @@ class OfficeRouterBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="OfficeRouterBlock", product_block_name="OfficeRouterBlock",
): ):
"""An office router that's being currently inactive. See :class:`OfficeRouterBlock`.""" """An office router that's being currently inactive. See ``OfficeRouterBlock``."""
office_router_fqdn: str | None = None office_router_fqdn: str | None = None
office_router_ts_port: PortNumber | None = None office_router_ts_port: PortNumber | None = None
...@@ -28,7 +28,7 @@ class OfficeRouterBlockInactive( ...@@ -28,7 +28,7 @@ class OfficeRouterBlockInactive(
class OfficeRouterBlockProvisioning(OfficeRouterBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class OfficeRouterBlockProvisioning(OfficeRouterBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""An office router that's being provisioned. See :class:`RouterBlock`.""" """An office router that's being provisioned. See ``RouterBlock``."""
office_router_fqdn: str | None = None office_router_fqdn: str | None = None
office_router_ts_port: PortNumber | None = None office_router_ts_port: PortNumber | None = None
...@@ -49,7 +49,7 @@ class OfficeRouterBlock(OfficeRouterBlockProvisioning, lifecycle=[SubscriptionLi ...@@ -49,7 +49,7 @@ class OfficeRouterBlock(OfficeRouterBlockProvisioning, lifecycle=[SubscriptionLi
office_router_lo_ipv4_address: IPv4AddressType office_router_lo_ipv4_address: IPv4AddressType
#: The IPv6 loopback address of the office router. #: The IPv6 loopback address of the office router.
office_router_lo_ipv6_address: IPv6AddressType office_router_lo_ipv6_address: IPv6AddressType
#: The :class:`Site` that this office router resides in. Both physically and computationally. #: The ``Site`` that this office router resides in. Both physically and computationally.
office_router_site: SiteBlock office_router_site: SiteBlock
#: The vendor of an office router. Defaults to Juniper. #: The vendor of an office router. Defaults to Juniper.
vendor: Vendor = Vendor.JUNIPER vendor: Vendor = Vendor.JUNIPER
"""Product block for :class:`Opengear` products.""" """Product block for ``Opengear`` products."""
import ipaddress import ipaddress
...@@ -17,7 +17,7 @@ class OpengearBlockInactive( ...@@ -17,7 +17,7 @@ class OpengearBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="OpengearBlock", product_block_name="OpengearBlock",
): ):
"""An Opengear that's being currently inactive. See :class:`OpengearBlock`.""" """An Opengear that's being currently inactive. See ``OpengearBlock``."""
opengear_hostname: str | None = None opengear_hostname: str | None = None
opengear_site: SiteBlockInactive | None = None opengear_site: SiteBlockInactive | None = None
...@@ -27,7 +27,7 @@ class OpengearBlockInactive( ...@@ -27,7 +27,7 @@ class OpengearBlockInactive(
class OpengearBlockProvisioning(OpengearBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class OpengearBlockProvisioning(OpengearBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""An Opengear that's being provisioned. See :class:`OpengearBlock`.""" """An Opengear that's being provisioned. See ``OpengearBlock``."""
opengear_hostname: str opengear_hostname: str
opengear_site: SiteBlockProvisioning opengear_site: SiteBlockProvisioning
...@@ -43,9 +43,9 @@ class OpengearBlock(OpengearBlockProvisioning, lifecycle=[SubscriptionLifecycle. ...@@ -43,9 +43,9 @@ class OpengearBlock(OpengearBlockProvisioning, lifecycle=[SubscriptionLifecycle.
opengear_hostname: str opengear_hostname: str
#: The site where the Opengear device is located. #: The site where the Opengear device is located.
opengear_site: SiteBlock opengear_site: SiteBlock
#: The :term:`WAN` address of the Opengear device. #: The WAN address of the Opengear device.
opengear_wan_address: ipaddress.IPv4Address opengear_wan_address: ipaddress.IPv4Address
#: The :term:`WAN` netmask of the Opengear device. #: The WAN netmask of the Opengear device.
opengear_wan_netmask: ipaddress.IPv4Address opengear_wan_netmask: ipaddress.IPv4Address
#: The :term:`WAN` gateway of the Opengear device. #: The WAN gateway of the Opengear device.
opengear_wan_gateway: ipaddress.IPv4Address opengear_wan_gateway: ipaddress.IPv4Address
...@@ -32,7 +32,7 @@ PortList = Annotated[list[T], AfterValidator(validate_unique_list), Doc("A list ...@@ -32,7 +32,7 @@ PortList = Annotated[list[T], AfterValidator(validate_unique_list), Doc("A list
class PopVlanPortBlockInactive( class PopVlanPortBlockInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="PopVlanPortBlock" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="PopVlanPortBlock"
): ):
"""An inactive Pop VLAN port.""" """An inactive PoP VLAN port."""
port_name: str | None = None port_name: str | None = None
port_description: str | None = None port_description: str | None = None
...@@ -40,7 +40,7 @@ class PopVlanPortBlockInactive( ...@@ -40,7 +40,7 @@ class PopVlanPortBlockInactive(
class PopVlanPortBlockProvisioning(PopVlanPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class PopVlanPortBlockProvisioning(PopVlanPortBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A Pop VLAN port that is being provisioned.""" """A PoP VLAN port that is being provisioned."""
port_name: str | None port_name: str | None
port_description: str | None port_description: str | None
...@@ -48,7 +48,7 @@ class PopVlanPortBlockProvisioning(PopVlanPortBlockInactive, lifecycle=[Subscrip ...@@ -48,7 +48,7 @@ class PopVlanPortBlockProvisioning(PopVlanPortBlockInactive, lifecycle=[Subscrip
class PopVlanPortBlock(PopVlanPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class PopVlanPortBlock(PopVlanPortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An active Pop :term:`VLAN` port.""" """An active PoP VLAN port."""
port_name: str port_name: str
port_description: str port_description: str
...@@ -60,7 +60,7 @@ class PopVlanBlockInactive( ...@@ -60,7 +60,7 @@ class PopVlanBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="PopVlanBlock", product_block_name="PopVlanBlock",
): ):
"""A Pop :term:`VLAN` that's currently inactive, see :class:`PopVlanBlock`.""" """A PoP VLAN that's currently inactive, see ``PopVlanBlock``."""
vlan_id: int vlan_id: int
pop_vlan_description: str | None = None pop_vlan_description: str | None = None
...@@ -72,7 +72,7 @@ class PopVlanBlockInactive( ...@@ -72,7 +72,7 @@ class PopVlanBlockInactive(
class PopVlanBlockProvisioning(PopVlanBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class PopVlanBlockProvisioning(PopVlanBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A Pop :term:`VLAN` that's currently being provisioned, see :class:`PopVlanBlock`.""" """A Pop VLAN that's currently being provisioned, see ``PopVlanBlock``."""
vlan_id: int vlan_id: int
pop_vlan_description: str | None pop_vlan_description: str | None
...@@ -84,19 +84,19 @@ class PopVlanBlockProvisioning(PopVlanBlockInactive, lifecycle=[SubscriptionLife ...@@ -84,19 +84,19 @@ class PopVlanBlockProvisioning(PopVlanBlockInactive, lifecycle=[SubscriptionLife
class PopVlanBlock(PopVlanBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class PopVlanBlock(PopVlanBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A Pop :term:`VLAN` that's currently deployed in the network.""" """A Pop VLAN that's currently deployed in the network."""
#: The :term:`VLAN` ID of the Pop :term:`VLAN`. #: The VLAN ID of the Pop VLAN.
vlan_id: int vlan_id: int
#: The description of the Pop :term:`VLAN`. #: The description of the Pop VLAN.
pop_vlan_description: str pop_vlan_description: str
#: The :term:`LAN` Switch Interconnect that this Pop :term:`VLAN` is connected to. #: The LAN Switch Interconnect that this Pop VLAN is connected to.
lan_switch_interconnect: LanSwitchInterconnectBlock lan_switch_interconnect: LanSwitchInterconnectBlock
#: The ports of the Pop :term:`VLAN`. #: The ports of the Pop VLAN.
ports: PortList[PopVlanPortBlock] # type: ignore[assignment] ports: PortList[PopVlanPortBlock] # type: ignore[assignment]
#: The level of the layer preference for the Pop :term:`VLAN` (L2 or L3). #: The level of the layer preference for the Pop VLAN (L2 or L3).
layer_preference: LayerPreference layer_preference: LayerPreference
#: IPv4 network for the Pop :term:`VLAN` if layer preference is L3. #: IPv4 network for the Pop VLAN if layer preference is L3.
ipv4_network: IPv4Network | None ipv4_network: IPv4Network | None
#: IPv6 network for the Pop :term:`VLAN` if layer preference is L3. #: IPv6 network for the Pop VLAN if layer preference is L3.
ipv6_network: IPv6Network | None ipv6_network: IPv6Network | None
"""Product block for :class:`Router` products.""" """Product block for ``Router`` products."""
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle, strEnum from orchestrator.types import SubscriptionLifecycle, strEnum
...@@ -25,7 +25,7 @@ class RouterBlockInactive( ...@@ -25,7 +25,7 @@ class RouterBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="RouterBlock", product_block_name="RouterBlock",
): ):
"""A router that's being currently inactive. See :class:`RouterBlock`.""" """A router that's being currently inactive. See ``RouterBlock``."""
router_fqdn: str | None = None router_fqdn: str | None = None
router_ts_port: PortNumber | None = None router_ts_port: PortNumber | None = None
...@@ -39,7 +39,7 @@ class RouterBlockInactive( ...@@ -39,7 +39,7 @@ class RouterBlockInactive(
class RouterBlockProvisioning(RouterBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class RouterBlockProvisioning(RouterBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A router that's being provisioned. See :class:`RouterBlock`.""" """A router that's being provisioned. See ``RouterBlock``."""
router_fqdn: str router_fqdn: str
router_ts_port: PortNumber router_ts_port: PortNumber
...@@ -67,9 +67,9 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI ...@@ -67,9 +67,9 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI
router_lo_ipv6_address: IPv6AddressType router_lo_ipv6_address: IPv6AddressType
#: The ISO NET of the router, used for ISIS support. #: The ISO NET of the router, used for ISIS support.
router_lo_iso_address: str router_lo_iso_address: str
#: The role of the router, which can be any of the values defined in :class:`RouterRole`. #: The role of the router, which can be any of the values defined in ``RouterRole``.
router_role: RouterRole router_role: RouterRole
#: The :class:`Site` that this router resides in. Both physically and computationally. #: The ``Site`` that this router resides in. Both physically and computationally.
router_site: SiteBlock router_site: SiteBlock
#: The vendor of a router. #: The vendor of a router.
vendor: Vendor vendor: Vendor
"""Service Binding Port. """Service Binding Port.
A service binding port is used to logically attach an edge port to a customer service using a :term:`VLAN`. A service binding port is used to logically attach an edge port to a customer service using a VLAN.
""" """
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
...@@ -21,7 +21,7 @@ from gso.utils.types.virtual_identifiers import VLAN_ID ...@@ -21,7 +21,7 @@ from gso.utils.types.virtual_identifiers import VLAN_ID
class BFDSettingsInactive( class BFDSettingsInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="BFDSettings" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="BFDSettings"
): ):
"""Settings for :term:`BFD`, see :class:`BFDSettings`.""" """Settings for BFD, see ``BFDSettings``."""
bfd_enabled: bool = False bfd_enabled: bool = False
bfd_interval_rx: int | None = None bfd_interval_rx: int | None = None
...@@ -30,7 +30,7 @@ class BFDSettingsInactive( ...@@ -30,7 +30,7 @@ class BFDSettingsInactive(
class BFDSettingsProvisioning(BFDSettingsInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class BFDSettingsProvisioning(BFDSettingsInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""Settings for :term:`BFD`, see :class:`BFDSettings`.""" """Settings for BFD, see ``BFDSettings``."""
bfd_enabled: bool bfd_enabled: bool
bfd_interval_rx: int | None = None bfd_interval_rx: int | None = None
...@@ -39,22 +39,22 @@ class BFDSettingsProvisioning(BFDSettingsInactive, lifecycle=[SubscriptionLifecy ...@@ -39,22 +39,22 @@ class BFDSettingsProvisioning(BFDSettingsInactive, lifecycle=[SubscriptionLifecy
class BFDSettings(BFDSettingsProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class BFDSettings(BFDSettingsProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A set of settings for :term:`BFD`.""" """A set of settings for BFD."""
#: Whether :term:`BFD` is enabled. #: Whether BFD is enabled.
bfd_enabled: bool bfd_enabled: bool
#: The :term:`BFD` interval RX, if enabled. #: The BFD interval RX, if enabled.
bfd_interval_rx: int | None bfd_interval_rx: int | None
#: The :term:`BFD` interval TX, if enabled. #: The BFD interval TX, if enabled.
bfd_interval_tx: int | None bfd_interval_tx: int | None
#: The :term:`BFD` multiplier, if enabled. #: The BFD multiplier, if enabled.
bfd_multiplier: int | None bfd_multiplier: int | None
class ServiceBindingPortInactive( class ServiceBindingPortInactive(
ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="ServiceBindingPort" ProductBlockModel, lifecycle=[SubscriptionLifecycle.INITIAL], product_block_name="ServiceBindingPort"
): ):
"""A Service Binding Port that's currently inactive. See :class:`ServiceBindingPort`.""" """A Service Binding Port that's currently inactive. See ``ServiceBindingPort``."""
is_tagged: bool | None = None is_tagged: bool | None = None
vlan_id: VLAN_ID | None = None vlan_id: VLAN_ID | None = None
...@@ -72,7 +72,7 @@ class ServiceBindingPortInactive( ...@@ -72,7 +72,7 @@ class ServiceBindingPortInactive(
class ServiceBindingPortProvisioning(ServiceBindingPortInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class ServiceBindingPortProvisioning(ServiceBindingPortInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A Service Binding Port that's currently being provisioned. See :class:`ServiceBindingPort`.""" """A Service Binding Port that's currently being provisioned. See ``ServiceBindingPort``."""
is_tagged: bool is_tagged: bool
vlan_id: VLAN_ID | None = None vlan_id: VLAN_ID | None = None
...@@ -92,9 +92,9 @@ class ServiceBindingPortProvisioning(ServiceBindingPortInactive, lifecycle=[Subs ...@@ -92,9 +92,9 @@ class ServiceBindingPortProvisioning(ServiceBindingPortInactive, lifecycle=[Subs
class ServiceBindingPort(ServiceBindingPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class ServiceBindingPort(ServiceBindingPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A service binding port that is actively used in the network.""" """A service binding port that is actively used in the network."""
#: Whether this :term:`VLAN` is tagged or not. #: Whether this VLAN is tagged or not.
is_tagged: bool is_tagged: bool
#: The :term:`VLAN` ID. #: The VLAN ID.
vlan_id: VLAN_ID | None = None vlan_id: VLAN_ID | None = None
#: Is this service binding port layer 2 or 3? #: Is this service binding port layer 2 or 3?
sbp_type: SBPType sbp_type: SBPType
...@@ -110,11 +110,11 @@ class ServiceBindingPort(ServiceBindingPortProvisioning, lifecycle=[Subscription ...@@ -110,11 +110,11 @@ class ServiceBindingPort(ServiceBindingPortProvisioning, lifecycle=[Subscription
custom_firewall_filters: bool custom_firewall_filters: bool
#: The GÉANT service ID of this binding port. #: The GÉANT service ID of this binding port.
geant_sid: str geant_sid: str
#: The :term:`BGP` sessions associated with this service binding port. #: The BGP sessions associated with this service binding port.
bgp_session_list: list[BGPSession] # type: ignore[assignment] bgp_session_list: list[BGPSession] # type: ignore[assignment]
#: The Edge Port on which this :term:`SBP` resides. #: The Edge Port on which this SBP resides.
edge_port: EdgePortBlock edge_port: EdgePortBlock
#: :term:`BFD` settings for IPv4 #: BFD settings for IPv4
v4_bfd_settings: BFDSettings v4_bfd_settings: BFDSettings
#: :term:`BFD` settings for IPv6 #: BFD settings for IPv6
v6_bfd_settings: BFDSettings v6_bfd_settings: BFDSettings
...@@ -26,7 +26,7 @@ class SiteBlockInactive( ...@@ -26,7 +26,7 @@ class SiteBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="SiteBlock", product_block_name="SiteBlock",
): ):
"""A site that's currently inactive, see :class:`SiteBlock`.""" """A site that's currently inactive, see ``SiteBlock``."""
site_name: SiteName | None = None site_name: SiteName | None = None
site_city: str | None = None site_city: str | None = None
...@@ -41,7 +41,7 @@ class SiteBlockInactive( ...@@ -41,7 +41,7 @@ class SiteBlockInactive(
class SiteBlockProvisioning(SiteBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class SiteBlockProvisioning(SiteBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A site that's currently being provisioned, see :class:`SiteBlock`.""" """A site that's currently being provisioned, see ``SiteBlock``."""
site_name: SiteName site_name: SiteName
site_city: str site_city: str
...@@ -76,7 +76,7 @@ class SiteBlock(SiteBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]) ...@@ -76,7 +76,7 @@ class SiteBlock(SiteBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE])
site_internal_id: int site_internal_id: int
#: The BGP community ID of a site, used to advertise routes learned at this site. #: The BGP community ID of a site, used to advertise routes learned at this site.
site_bgp_community_id: int site_bgp_community_id: int
#: The tier of a site, as described in :class:`SiteTier`. #: The tier of a site, as described in ``SiteTier``.
site_tier: SiteTier site_tier: SiteTier
#: The address of the terminal server that this router is connected to. The terminal server provides out of band #: The address of the terminal server that this router is connected to. The terminal server provides out of band
#: access. This is required in case a link goes down, or when a router is initially added to the network and it #: access. This is required in case a link goes down, or when a router is initially added to the network and it
......
"""Product block for :class:`Super PoP Switch` products.""" """Product block for Super PoP Switch products."""
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
...@@ -17,7 +17,7 @@ class SuperPopSwitchBlockInactive( ...@@ -17,7 +17,7 @@ class SuperPopSwitchBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="SuperPopSwitchBlock", product_block_name="SuperPopSwitchBlock",
): ):
"""A Super PoP switch that's being currently inactive. See :class:`SuperPopSwitchBlock`.""" """A Super PoP switch that's being currently inactive. See ``SuperPoPSwitchBlock``."""
super_pop_switch_fqdn: str | None = None super_pop_switch_fqdn: str | None = None
super_pop_switch_ts_port: PortNumber | None = None super_pop_switch_ts_port: PortNumber | None = None
...@@ -27,7 +27,7 @@ class SuperPopSwitchBlockInactive( ...@@ -27,7 +27,7 @@ class SuperPopSwitchBlockInactive(
class SuperPopSwitchBlockProvisioning(SuperPopSwitchBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class SuperPopSwitchBlockProvisioning(SuperPopSwitchBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A Super PoP switch that's being provisioned. See :class:`SuperPopSwitchBlock`.""" """A Super PoP switch that's being provisioned. See ``SuperPoPSwitchBlock``."""
super_pop_switch_fqdn: str | None = None super_pop_switch_fqdn: str | None = None
super_pop_switch_ts_port: PortNumber | None = None super_pop_switch_ts_port: PortNumber | None = None
...@@ -45,7 +45,7 @@ class SuperPopSwitchBlock(SuperPopSwitchBlockProvisioning, lifecycle=[Subscripti ...@@ -45,7 +45,7 @@ class SuperPopSwitchBlock(SuperPopSwitchBlockProvisioning, lifecycle=[Subscripti
super_pop_switch_ts_port: PortNumber super_pop_switch_ts_port: PortNumber
#: The IPv4 management address of the Super PoP switch. #: The IPv4 management address of the Super PoP switch.
super_pop_switch_mgmt_ipv4_address: IPv4AddressType super_pop_switch_mgmt_ipv4_address: IPv4AddressType
#: The :class:`Site` that this Super PoP switch resides in. Both physically and computationally. #: The ``Site`` that this Super PoP switch resides in. Both physically and computationally.
super_pop_switch_site: SiteBlock super_pop_switch_site: SiteBlock
#: The vendor of a Super PoP switch. Defaults to Juniper. #: The vendor of a Super PoP switch. Defaults to Juniper.
vendor: Vendor = Vendor.JUNIPER vendor: Vendor = Vendor.JUNIPER
"""Product block for :class:`Switch` products.""" """Product block for ``Switch`` products."""
from orchestrator.domain.base import ProductBlockModel from orchestrator.domain.base import ProductBlockModel
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
...@@ -24,7 +24,7 @@ class SwitchBlockInactive( ...@@ -24,7 +24,7 @@ class SwitchBlockInactive(
lifecycle=[SubscriptionLifecycle.INITIAL], lifecycle=[SubscriptionLifecycle.INITIAL],
product_block_name="SwitchBlock", product_block_name="SwitchBlock",
): ):
"""A switch that's being currently inactive. See :class:`SwitchBlock`.""" """A switch that's being currently inactive. See ``SwitchBlock``."""
fqdn: str | None = None fqdn: str | None = None
ts_port: PortNumber | None = None ts_port: PortNumber | None = None
...@@ -34,7 +34,7 @@ class SwitchBlockInactive( ...@@ -34,7 +34,7 @@ class SwitchBlockInactive(
class SwitchBlockProvisioning(SwitchBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class SwitchBlockProvisioning(SwitchBlockInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A switch that's being provisioned. See :class:`SwitchBlock`.""" """A switch that's being provisioned. See ``SwitchBlock``."""
fqdn: str fqdn: str
ts_port: PortNumber ts_port: PortNumber
...@@ -46,11 +46,11 @@ class SwitchBlockProvisioning(SwitchBlockInactive, lifecycle=[SubscriptionLifecy ...@@ -46,11 +46,11 @@ class SwitchBlockProvisioning(SwitchBlockInactive, lifecycle=[SubscriptionLifecy
class SwitchBlock(SwitchBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): class SwitchBlock(SwitchBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A switch that's currently deployed in the network.""" """A switch that's currently deployed in the network."""
#: The :term:`FQDN` of the switch. #: The FQDN of the switch.
fqdn: str fqdn: str
#: The port of the terminal server that this switch is connected to. Used to offer out of band access. #: The port of the terminal server that this switch is connected to. Used to offer out of band access.
ts_port: PortNumber ts_port: PortNumber
#: The :class:`Site` that this switch resides in. Both physically and computationally. #: The ``Site`` that this switch resides in. Both physically and computationally.
site: SiteBlock site: SiteBlock
#: The vendor of the switch. #: The vendor of the switch.
switch_vendor: Vendor switch_vendor: Vendor
......
...@@ -29,7 +29,7 @@ class LanSwitchInterconnect(LanSwitchInterconnectProvisioning, lifecycle=[Subscr ...@@ -29,7 +29,7 @@ class LanSwitchInterconnect(LanSwitchInterconnectProvisioning, lifecycle=[Subscr
class ImportedLanSwitchInterconnectInactive(SubscriptionModel, is_base=True): class ImportedLanSwitchInterconnectInactive(SubscriptionModel, is_base=True):
"""An imported, inactive :term:`LAN` Switch Interconnect.""" """An imported, inactive LAN Switch Interconnect."""
lan_switch_interconnect: LanSwitchInterconnectBlockInactive lan_switch_interconnect: LanSwitchInterconnectBlockInactive
...@@ -37,6 +37,6 @@ class ImportedLanSwitchInterconnectInactive(SubscriptionModel, is_base=True): ...@@ -37,6 +37,6 @@ class ImportedLanSwitchInterconnectInactive(SubscriptionModel, is_base=True):
class ImportedLanSwitchInterconnect( class ImportedLanSwitchInterconnect(
ImportedLanSwitchInterconnectInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING, SubscriptionLifecycle.ACTIVE] ImportedLanSwitchInterconnectInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING, SubscriptionLifecycle.ACTIVE]
): ):
"""An imported :term:`LAN` Switch Interconnect.""" """An imported LAN Switch Interconnect."""
lan_switch_interconnect: LanSwitchInterconnectBlock lan_switch_interconnect: LanSwitchInterconnectBlock
"""The product type for Pop VLAN.""" """The product type for PoP VLAN."""
from orchestrator.domain.base import SubscriptionModel from orchestrator.domain.base import SubscriptionModel
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
...@@ -7,13 +7,13 @@ from gso.products.product_blocks.pop_vlan import PopVlanBlock, PopVlanBlockInact ...@@ -7,13 +7,13 @@ from gso.products.product_blocks.pop_vlan import PopVlanBlock, PopVlanBlockInact
class PopVlanInactive(SubscriptionModel, is_base=True): class PopVlanInactive(SubscriptionModel, is_base=True):
"""A Pop VLAN that is inactive.""" """A PoP VLAN that is inactive."""
pop_vlan: PopVlanBlockInactive pop_vlan: PopVlanBlockInactive
class PopVlanProvisioning(PopVlanInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]): class PopVlanProvisioning(PopVlanInactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
"""A Pop VLAN that is being provisioned.""" """A PoP VLAN that is being provisioned."""
pop_vlan: PopVlanBlockProvisioning pop_vlan: PopVlanBlockProvisioning
......
...@@ -24,17 +24,15 @@ class CronScheduleConfig(BaseModel): ...@@ -24,17 +24,15 @@ class CronScheduleConfig(BaseModel):
def scheduler(cron_scheduler_config: CronScheduleConfig) -> Callable[[Callable], Callable]: def scheduler(cron_scheduler_config: CronScheduleConfig) -> Callable[[Callable], Callable]:
"""Schedule a Celery task using crontab-like timing. """Schedule a Celery task using crontab-like timing.
Examples Examples:
-------- - ``minute='*/15'``: Run every 15 minutes.
- ``minute='*/15'``: Run every 15 minutes. - ``hour='*/3'``: Run every 3 hours.
- ``hour='*/3'``: Run every 3 hours. - ``day_of_week='mon-fri'``: Run on weekdays only.
- ``day_of_week='mon-fri'``: Run on weekdays only. - ``day_of_month='1-7,15-21'``: Run on the first and third weeks of the month.
- ``day_of_month='1-7,15-21'``: Run on the first and third weeks of the month. - ``month_of_year='*/3'``: Run on the first month of each quarter.
- ``month_of_year='*/3'``: Run on the first month of each quarter.
All time units can be specified with lists of numbers or crontab pattern strings for advanced scheduling. All time units can be specified with lists of numbers or crontab pattern strings for advanced scheduling.
All specified time parts (minute, hour, day, etc.) must align for a task to run. All specified time parts (minute, hour, day, etc.) must align for a task to run.
""" """
def decorator(task_func: Callable) -> Callable: def decorator(task_func: Callable) -> Callable:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment