diff --git a/docs/source/glossary.md b/docs/source/glossary.md index 861b864fd63f860874c29d6dae504094eb02f0d6..a9b2c4070672d4c6af78747d76395d9dc1569930 100644 --- a/docs/source/glossary.md +++ b/docs/source/glossary.md @@ -10,6 +10,9 @@ FQDN GSO : GÉANT Service Orchestrator +IPAM +: IP Address Management + IS-IS : Intermediate System to Intermediate System: a routing protocol described in <a href="https://datatracker.ietf.org/doc/html/rfc7142" target="_blank">RFC 7142</a>. diff --git a/docs/vale/styles/Vocab/geant-jargon/accept.txt b/docs/vale/styles/Vocab/geant-jargon/accept.txt index 3c7868e5dc208b634d98373c7f67b225f1018792..8d0a6acf97307cbbe2cd7cd87e1dabfcbac5b6aa 100644 --- a/docs/vale/styles/Vocab/geant-jargon/accept.txt +++ b/docs/vale/styles/Vocab/geant-jargon/accept.txt @@ -8,3 +8,4 @@ Ansible API dry_run Dark_fiber +[A|a]ddress diff --git a/gso/products/product_blocks/__init__.py b/gso/products/product_blocks/__init__.py index 89b863a4b062cf85d3069e5b47bd3924f7ca4389..0dcc00600d0464cc91832567bb2215dc301d1782 100644 --- a/gso/products/product_blocks/__init__.py +++ b/gso/products/product_blocks/__init__.py @@ -1,6 +1,6 @@ """Product blocks that store information about subscriptions. -In this file, some enumerators may be declared that are used across multiple subscriptions. +In this file, some enumerators may be declared that are available for use across all subscriptions. """ from enum import Enum @@ -9,7 +9,7 @@ from enum import Enum class PhyPortCapacity(Enum): """Physical port capacity enumerator. - An enumerator that contains the different possible capacities of ports that are available to use in subscriptions. + An enumerator that has the different possible capacities of ports that are available to use in subscriptions. """ ONE = "1G" diff --git a/gso/products/product_blocks/device.py b/gso/products/product_blocks/device.py index 897540affc531aa0169fa2140ec2ba58a0231997..d2f7996fc4281d3117d8c33b274ea32295e1089d 100644 --- a/gso/products/product_blocks/device.py +++ b/gso/products/product_blocks/device.py @@ -76,7 +76,8 @@ class DeviceBlock(DeviceBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI access. This is required in case a link goes down, or when a device is initially added to the network and it does not have any IP trunks connected to it yet.""" device_ts_port: int - """The port of the terminal server that this device is connected to. Used for the same reason as mentioned above.""" + """The port of the terminal server that this device is connected to. Used for the same reason as mentioned + previously.""" device_access_via_ts: bool """Whether this device should be accessed through the terminal server, or through its loopback address.""" device_lo_ipv4_address: ipaddress.IPv4Address diff --git a/gso/services/_ipam.py b/gso/services/_ipam.py index 573c3aef75b79744766c52006c9e784f380442db..85555619c51a3950409b6d354d36f3405b1fc7e1 100644 --- a/gso/services/_ipam.py +++ b/gso/services/_ipam.py @@ -246,7 +246,7 @@ def _allocate_host( if couldn't allocate host due to requested network not existing. """ # TODO: should hostnames be unique - # (i.e. fail if hostname already exists in this domain/service)? + # (that is, fail if hostname already exists in this domain/service)? assert addrs or networks, "You must specify either the host addresses or the networks CIDR." oss = settings.load_oss_params() assert oss.IPAM.INFOBLOX @@ -563,7 +563,7 @@ def delete_service_host( assert "_ref" in host_data[0] host_ref = host_data[0]["_ref"] - # Find cname records reference + # Find CNAME records reference r = requests.get( f"{_wapi(infoblox_params)}/record:cname", params={ diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index e83f15b99f1cf7a6716c13ecca06558624bcbf50..3ccf0bd78c2f80ccb00e1aebe298185116a296b8 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -44,7 +44,8 @@ class CUDOperation(strEnum): def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr, operation: CUDOperation) -> None: """Send a request to {term}`LSO`. The callback address is derived using the process ID provided. - :param endpoint: The {term}`LSO`-specific endpoint to call, depending on the type of service object that's acted upon. + :param endpoint: The {term}`LSO`-specific endpoint to call, depending on the type of service object that's acted + upon. :type endpoint: str :param parameters: JSON body for the request, which will almost always at least consist of a subscription object, and a boolean value to indicate a dry run. diff --git a/gso/services/resource_manager.py b/gso/services/resource_manager.py index abd359ca4c8de9a6ca62e07c3c0f260d88c46419..6962eefee1315bd069843ecdc1d4b942de944561 100644 --- a/gso/services/resource_manager.py +++ b/gso/services/resource_manager.py @@ -6,7 +6,7 @@ from gso import settings # TODO # - fill in the implementations -# - consider the additional api methods +# - consider the additional API methods # - decided what to do with various error conditions (currently assertions) diff --git a/gso/settings.py b/gso/settings.py index a576616c0b5003f27910afe983a29b4736eac253..ddc7eaafb79900c4fd85e3afcd4bc5f4d36fdc07 100644 --- a/gso/settings.py +++ b/gso/settings.py @@ -1,4 +1,4 @@ -"""GSO settings. +"""{term}`GSO` settings. Ensuring that the required parameters are set correctly. """ @@ -14,11 +14,11 @@ logger = logging.getLogger(__name__) class GeneralParams(BaseSettings): - """General parameters for a GSO configuration file.""" + """General parameters for a {term}`GSO` configuration file.""" - #: The hostname that GSO is publicly served at, used for building the - #: callback URL that the provisioning proxy uses. public_hostname: str + """The hostname that {term}`GSO` is publicly served at, used for building the callback URL that the provisioning + proxy uses.""" class InfoBloxParams(BaseSettings): @@ -60,7 +60,7 @@ class ServiceNetworkParams(BaseSettings): class IPAMParams(BaseSettings): - """A set of parameters related to IPAM.""" + """A set of parameters related to {term}`IPAM`.""" INFOBLOX: InfoBloxParams LO: ServiceNetworkParams @@ -86,7 +86,7 @@ class ResourceManagementParams(BaseSettings): class OSSParams(BaseSettings): - """The set of parameters required for running GSO.""" + """The set of parameters required for running {term}`GSO`.""" GENERAL: GeneralParams IPAM: IPAMParams diff --git a/gso/workflows/__init__.py b/gso/workflows/__init__.py index e7477bfa76d6dae56d22189a322f68858516077c..4a79362c9e457040af342333d8084512291e7364 100644 --- a/gso/workflows/__init__.py +++ b/gso/workflows/__init__.py @@ -1,4 +1,4 @@ -"""init class that imports all workflows into GSO.""" +"""Initialisation class that imports all workflows into {term}`GSO`.""" from orchestrator.workflows import LazyWorkflowInstance LazyWorkflowInstance("gso.workflows.device.create_device", "create_device") diff --git a/gso/workflows/device/get_facts.py b/gso/workflows/device/get_facts.py index 1a2ec8234010c968d37bbb897afc583035b54837..99a37c38f1f6c817c67e364068272a3d3c6204e7 100644 --- a/gso/workflows/device/get_facts.py +++ b/gso/workflows/device/get_facts.py @@ -20,15 +20,6 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> InputForm: @step("Get facts") def get_facts(subscription_id: UUIDstr) -> dict: subscription = Device.from_subscription(subscription_id) - # import ansible_runner - # - # r = ansible_runner.run( - # private_data_dir="/opt", - # playbook="get_facts.yaml", - # inventory=subscription.device.device_fqdn, - # ) - # out = r.stdout.read() - # out_splitted = out.splitlines() return {"output": subscription} diff --git a/gso/workflows/iptrunk/create_iptrunk.py b/gso/workflows/iptrunk/create_iptrunk.py index e52ac500a2e733d3febbf932b06c8cd5cf05285f..13b2be132419f9e0e2b30be388164c794873a91f 100644 --- a/gso/workflows/iptrunk/create_iptrunk.py +++ b/gso/workflows/iptrunk/create_iptrunk.py @@ -18,7 +18,7 @@ from gso.services.provisioning_proxy import pp_interaction def initial_input_form_generator(product_name: str) -> FormGenerator: - # TODO: we need additional validation: + # TODO: implement more strict validation: # * interface names must be validated devices = {} @@ -62,7 +62,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator: user_input_side_a = yield CreateIptrunkSideAForm - # We remove the selected device for side A, to prevent any loops + # Remove the selected device for side A, to prevent any loops devices.pop(str(user_input_side_a.iptrunk_sideA_node_id.name)) DeviceEnumB = Choice("Select a device", zip(devices.keys(), devices.items())) # type: ignore