Skip to content
Snippets Groups Projects
Commit 7b9ed275 authored by Karel van Klink's avatar Karel van Klink :smiley_cat: Committed by Mohammad Torkashvand
Browse files

Update docstrings in a few product blocks

parent 97f8ab1e
No related branches found
No related tags found
1 merge request!329Feature/update docstrings
......@@ -12,16 +12,14 @@ from gso.utils.types.interfaces import LAGMemberList, PhysicalPortCapacity
class EncapsulationType(strEnum):
"""Types of encapsulation for edge ports.
Null supports a single service on the port.
Dot1Q supports multiple services for one customer or services for multiple customers.
QinQ expands VLAN space by double-tagging frames.
"""
"""Types of encapsulation for edge ports."""
DOT1Q = "dot1q"
"""Dot1Q supports multiple services for one customer or services for multiple customers."""
QINQ = "qinq"
"""QinQ expands VLAN space by double-tagging frames."""
NULL = "null"
"""Null supports a single service on the port."""
class EdgePortType(strEnum):
......@@ -94,29 +92,32 @@ class EdgePortBlockProvisioning(EdgePortBlockInactive, lifecycle=[SubscriptionLi
class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An edge port that's currently deployed in the network."""
"""An edge port that's currently deployed in the network.
Attributes:
node: The router that this Edge Port is connected to.
edge_port_name: The name of the edge port, in our case, corresponds to the name of the LAG interface.
edge_port_description: A description of the edge port.
enable_lacp: Indicates whether LACP is enabled for this edge port.
encapsulation: The type of encapsulation used on this edge port, by default DOT1Q.
mac_address: The MAC address assigned to this edge port, if applicable.
member_speed: The speed capacity of each member in the physical port.
minimum_links: The minimum number of links required for this edge port.
edge_port_type: The type of edge port (e.g., customer, private, public).
ignore_if_down: If set to True, the edge port will be ignored if it is down.
ga_id: The GEANT GA ID associated with this edge port, if any.
edge_port_ae_members: A list of LAG members associated with this edge port.
"""
#: The router that this edge port is connected to.
node: RouterBlock
#: The name of the edge port, in our case, corresponds to the name of the LAG interface.
edge_port_name: str
#: A description of the edge port.
edge_port_description: str | None = None
#: Indicates whether LACP is enabled for this edge port.
enable_lacp: bool
#: The type of encapsulation used on this edge port, by default DOT1Q.
encapsulation: EncapsulationType = EncapsulationType.DOT1Q
#: The MAC address assigned to this edge port, if applicable.
mac_address: str | None = None
#: The speed capacity of each member in the physical port.
member_speed: PhysicalPortCapacity
#: The minimum number of links required for this edge port.
minimum_links: int | None = None
#: The type of edge port (e.g., customer, private, public).
edge_port_type: EdgePortType
#: If set to True, the edge port will be ignored if it is down.
ignore_if_down: bool = False
#: The GEANT GA ID associated with this edge port, if any.
ga_id: str | None = None
#: A list of LAG members associated with this edge port.
edge_port_ae_members: LAGMemberList[EdgePortAEMemberBlock] # type: ignore[assignment]
......@@ -27,11 +27,13 @@ class AccessPortProvisioning(AccessPortInactive, lifecycle=[SubscriptionLifecycl
class AccessPort(AccessPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An access port for an R&E service."""
"""An access port for an R&E service.
#: The type of Access Port
Attributes:
ap_type: The type of Access Port
sbp: The corresponding SBP of this Access Port.
"""
ap_type: APType
#: The corresponding SBP of this Access Port.
sbp: ServiceBindingPort
......@@ -50,7 +52,9 @@ class L3CoreServiceBlockProvisioning(L3CoreServiceBlockInactive, lifecycle=[Subs
class L3CoreServiceBlock(L3CoreServiceBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""An active L3 Core Service subscription block."""
"""An active L3 Core Service subscription block.
#: The list of Access Points where this service is present.
Attributes:
ap_list: The list of Access Points where this service is present.
"""
ap_list: list[AccessPort] # type: ignore[assignment]
......@@ -39,15 +39,17 @@ class BFDSettingsProvisioning(BFDSettingsInactive, lifecycle=[SubscriptionLifecy
class BFDSettings(BFDSettingsProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
"""A set of settings for BFD."""
#: Whether BFD is enabled.
"""A set of settings for BFD.
Attributes:
bfd_enabled: Whether BFD is enabled.
bfd_interval_rx: The BFD interval RX, if enabled.
bfd_interval_tx: The BFD interval TX, if enabled.
bfd_multiplier: The BFD multiplier, if enabled.
"""
bfd_enabled: bool
#: The BFD interval RX, if enabled.
bfd_interval_rx: int | None
#: The BFD interval TX, if enabled.
bfd_interval_tx: int | None
#: The BFD multiplier, if enabled.
bfd_multiplier: int | None
......
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