Skip to content
Snippets Groups Projects
Commit 9c3c6f8d authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update documentation

parent c1b72878
No related branches found
No related tags found
1 merge request!61Feature/update input form validation
Pipeline #83923 failed
...@@ -78,7 +78,7 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI ...@@ -78,7 +78,7 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI
router_fqdn: str router_fqdn: str
"""{term}`FQDN` of a router.""" """{term}`FQDN` of a router."""
router_ts_port: PortNumber router_ts_port: PortNumber
"""The port of the terminal server that this router is connected to. Used to provide out of band access.""" """The port of the terminal server that this router is connected to. Used to offer out of band access."""
router_access_via_ts: bool router_access_via_ts: bool
"""Whether this router should be accessed through the terminal server, or through its loopback address.""" """Whether this router should be accessed through the terminal server, or through its loopback address."""
router_lo_ipv4_address: ipaddress.IPv4Address router_lo_ipv4_address: ipaddress.IPv4Address
......
...@@ -10,8 +10,8 @@ from pydantic import ConstrainedStr ...@@ -10,8 +10,8 @@ from pydantic import ConstrainedStr
class SiteTier(strEnum): class SiteTier(strEnum):
"""The tier of a site, ranging from 1 to 4. """The tier of a site, ranging from 1 to 4.
A lower value generally corresponds to a larger amount of installed equipment, and a higher cardinality of the A lower value corresponds to a larger amount of installed equipment, and a higher cardinality of the connectivity to
connectivity to and from a site. and from a site.
""" """
TIER1 = 1 TIER1 = 1
...@@ -21,7 +21,7 @@ class SiteTier(strEnum): ...@@ -21,7 +21,7 @@ class SiteTier(strEnum):
class SnmpCoordinate(ConstrainedStr): class SnmpCoordinate(ConstrainedStr):
"""An SNMP coordinate, modeled as a constrained string. """An {term}`SNMP` coordinate, modeled as a constrained string.
The coordinate must match the format of `1.35`, `-12.3456`, etc. The coordinate must match the format of `1.35`, `-12.3456`, etc.
""" """
......
"""Product types define the different products that are available. """Product types define the different products that are available.
Multiple product blocks may insist on a single product type. In that sense, a product type is a mode general description More than one product block may insist on a single product type. In that sense, a product type is a more general
of a product. For example, the product type {class}`Router` must either be a router or a switch, both being separate description of a product.
product blocks.
""" """
...@@ -6,7 +6,7 @@ from gso import settings ...@@ -6,7 +6,7 @@ from gso import settings
# TODO # TODO
# - fill in the implementations # - fill in the implementations
# - consider the additional API methods # - consider the extra API methods
# - decided what to do with various error conditions (currently assertions) # - decided what to do with various error conditions (currently assertions)
...@@ -101,8 +101,8 @@ def free_physical_interface(router_fqdn: str, interface_name: str, oss_params=se ...@@ -101,8 +101,8 @@ def free_physical_interface(router_fqdn: str, interface_name: str, oss_params=se
# TODO: this is a dummy implementation # TODO: this is a dummy implementation
ifc = _find_physical(router_fqdn, interface_name) ifc = _find_physical(router_fqdn, interface_name)
# TODO: is this really an error that should be handled? # TODO: is this truly an error that should be handled?
# ... or is it ok to ignore this? # or is it ok to ignore this?
assert ( assert (
ifc["state"] != InterfaceAllocationState.AVAILABLE ifc["state"] != InterfaceAllocationState.AVAILABLE
), f"interface {router_fqdn}:{interface_name} is already available" ), f"interface {router_fqdn}:{interface_name} is already available"
......
...@@ -15,10 +15,10 @@ def customer_selector() -> Choice: ...@@ -15,10 +15,10 @@ def customer_selector() -> Choice:
def iso_from_ipv4(ipv4_address: IPv4Address) -> str: def iso_from_ipv4(ipv4_address: IPv4Address) -> str:
"""Calculate an ISO address, based on an IPv4 address. """Calculate an {term}`ISO` address, based on an IPv4 address.
:param IPv4Address ipv4_address: The address that is to be converted :param IPv4Address ipv4_address: The address that's to be converted
:returns: An ISO-formatted address. :returns: An {term}`ISO`-formatted address.
""" """
padded_octets = [f"{x:>03}" for x in str(ipv4_address).split(".")] padded_octets = [f"{x:>03}" for x in str(ipv4_address).split(".")]
joined_octets = "".join(padded_octets) joined_octets = "".join(padded_octets)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment