diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst index 5039c68c0797cc5c84f514c248b6a5d5263965e7..bcb32a34e54387af4dd15df8f76370f0619ffda5 100644 --- a/docs/source/glossary.rst +++ b/docs/source/glossary.rst @@ -33,7 +33,7 @@ Glossary of terms Lightweight Service Orchestrator NET - Network Entity Title: used for {term}`IS-IS` routing. + Network Entity Title: used for :term:`IS-IS` routing. SNMP Simple Network Management Protocol: a protocol that's used for gathering data, widely used for network management diff --git a/docs/source/index.md b/docs/source/index.md deleted file mode 100644 index 8ed5ec92290d7b9b5c564cdb20cdd6ebcae9234b..0000000000000000000000000000000000000000 --- a/docs/source/index.md +++ /dev/null @@ -1,13 +0,0 @@ -# GÉANT Service Orchestrator ({term}`GSO`) - -Welcome to the documentation of the GÉANT Service Orchestrator, or {term}`GSO` for short. - -This documentation has the following sections: - -```{toctree} -:caption: Contents -:maxdepth: 1 -quickstart.md -apidocs/gso/gso -glossary.md -``` diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..5818da8afb4db3fb33ab27b8bf1da24d589b23d1 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,14 @@ +GÉANT Service Orchestrator +========================== + +Welcome to the documentation of the GÉANT Service Orchestrator, or :term:`GSO` for short. + +This documentation has the following sections: + +.. toctree:: + :caption: Contents + :maxdepth: 2 + + quickstart + modules + glossary diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index cc1a032a86a01aac5d50a594a348c7fa8a3979f6..1f9ef177232fd1fd139e04c04d44ab48cb824450 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -23,7 +23,7 @@ proselint.Typography = warning Microsoft.Contractions = NO custom.Contractions = YES -TokenIgnores = ({term}), (:param \S+:), (:type \S+:) +TokenIgnores = (:term:), (:param \S+:), (:type \S+:) [*/glossary.md] ; Ignore acronyms being undefined in the file that defines all acronyms by definition. diff --git a/gso/main.py b/gso/main.py index e05aac889c02934fb9842afaaeae39c89bb0dce0..112bd535c9df2054cae59225d3c3d16f9c38e242 100644 --- a/gso/main.py +++ b/gso/main.py @@ -1,4 +1,4 @@ -"""The main module that runs {term}`GSO`.""" +"""The main module that runs :term:`GSO`.""" import typer from orchestrator import OrchestratorCore from orchestrator.cli.main import app as core_cli diff --git a/gso/products/__init__.py b/gso/products/__init__.py index 16da3f77b14b198d5e980704057f705edfd9c632..df2529a3ff74a248f29490cd6fa49bbdd318fb65 100644 --- a/gso/products/__init__.py +++ b/gso/products/__init__.py @@ -1,4 +1,4 @@ -"""Module that updates the domain model of {term}`GSO`. Should contain all types of subscriptions.""" +"""Module that updates the domain model of :term:`GSO`. Should contain all types of subscriptions.""" from orchestrator.domain import SUBSCRIPTION_MODEL_REGISTRY from gso.products.product_types.iptrunk import Iptrunk diff --git a/gso/products/product_blocks/iptrunk.py b/gso/products/product_blocks/iptrunk.py index 89f54e7211a0974e97b18ee63e51c42b2ea7c7df..64b2bee71d9dcc14ca1d0ee3c2ac2b631ce0898d 100644 --- a/gso/products/product_blocks/iptrunk.py +++ b/gso/products/product_blocks/iptrunk.py @@ -96,7 +96,7 @@ class IptrunkBlock(IptrunkBlockProvisioning, lifecycle=[SubscriptionLifecycle.AC iptrunk_minimum_links: int """The minimum amount of links the trunk should consist of.""" iptrunk_isis_metric: int - """The {term}`IS-IS` metric of this link""" + """The :term:`IS-IS` metric of this link""" iptrunk_ipv4_network: ipaddress.IPv4Network """The IPv4 network used for this trunk.""" iptrunk_ipv6_network: ipaddress.IPv6Network diff --git a/gso/products/product_blocks/router.py b/gso/products/product_blocks/router.py index 547b73c462731c577d6ce768ab0f43e18b458ee6..b7f7b3257f743d75beeb8c5e40c099965a801a28 100644 --- a/gso/products/product_blocks/router.py +++ b/gso/products/product_blocks/router.py @@ -70,7 +70,7 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI """A router that's currently deployed in the network.""" router_fqdn: str - """{term}`FQDN` of a router.""" + """:term:`FQDN` of a router.""" router_ts_port: PortNumber """The port of the terminal server that this router is connected to. Used to offer out of band access.""" router_access_via_ts: bool @@ -80,7 +80,7 @@ class RouterBlock(RouterBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTI router_lo_ipv6_address: ipaddress.IPv6Address """The IPv6 loopback address of the router.""" router_lo_iso_address: str - """The {term}`ISO` {term}`NET` of the router, used for {term}`IS-IS` support.""" + """The :term:`ISO` :term:`NET` of the router, used for :term:`IS-IS` support.""" router_si_ipv4_network: Optional[ipaddress.IPv4Network] """The SI IPv4 network of the router.""" router_ias_lt_ipv4_network: Optional[ipaddress.IPv4Network] diff --git a/gso/products/product_blocks/site.py b/gso/products/product_blocks/site.py index 4cd0f6874f97562dcf66504dc0f499d88260e1d3..4fdf33b871144cff9df14aa16d83f6db9fbc9e68 100644 --- a/gso/products/product_blocks/site.py +++ b/gso/products/product_blocks/site.py @@ -54,23 +54,23 @@ class SiteBlock(SiteBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]) """A site that's currently available for routers and services to be hosted at.""" site_name: str - """The name of the site, that will dictate part of the {term}`FQDN` of routers that are hosted at this site. For + """The name of the site, that will dictate part of the :term:`FQDN` of routers that are hosted at this site. For example: `router.X.Y.geant.net`, where X denotes the name of the site.""" site_city: str """The city at which the site is located.""" site_country: str """The country in which the site is located.""" site_country_code: str - """The code of the corresponding country. This is also used for the {term}`FQDN`, following the example given for + """The code of the corresponding country. This is also used for the :term:`FQDN`, following the example given for the site name, the country code would end up in the Y position.""" site_latitude: LatitudeCoordinate - """The latitude of the site, used for {term}`SNMP` purposes.""" + """The latitude of the site, used for :term:`SNMP` purposes.""" site_longitude: LongitudeCoordinate """Similar to the latitude, the longitude of a site.""" site_internal_id: int """The internal ID used within GÉANT to denote a site.""" site_bgp_community_id: int - """The {term}`BGP` community ID of a site, used to advertise routes learned at this site.""" + """The :term:`BGP` community ID of a site, used to advertise routes learned at this site.""" site_tier: SiteTier """The tier of a site, as described in {class}`SiteTier`.""" site_ts_address: Optional[str] = None diff --git a/gso/services/infoblox.py b/gso/services/infoblox.py index 556a760953cae6cc5c55eb6f093f1ef08b9e7549..228909a3b878b43bab2dd75ecab7cf0bf56b47c3 100644 --- a/gso/services/infoblox.py +++ b/gso/services/infoblox.py @@ -20,7 +20,7 @@ class DeletionError(Exception): def _setup_connection() -> tuple[connector.Connector, IPAMParams]: """Set up a new connection with an Infoblox instance. - :return: A tuple that has an Infoblox `Connector` instance, and {term}`IPAM` parameters. + :return: A tuple that has an Infoblox `Connector` instance, and :term:`IPAM` parameters. :rtype: tuple[{class}`infoblox_client.connector.Connector`, IPAMParams] """ oss = load_oss_params().IPAM @@ -52,7 +52,7 @@ def _allocate_network( :type dns_view: str :param netmask: The netmask of the desired network. Can be up to 32 for v4 networks, and 128 for v6 networks. :type netmask: int - :param containers: A list of network containers in which the network should be allocated, given in {term}`CIDR` + :param containers: A list of network containers in which the network should be allocated, given in :term:`CIDR` notation. :type containers: list[str] :param comment: Optionally, a comment can be added to the network allocation. @@ -86,8 +86,8 @@ def hostname_available(hostname: str) -> bool: def allocate_v4_network(service_type: str, comment: str | None = "") -> ipaddress.IPv4Network: """Allocate a new IPv4 network in Infoblox. - Allocate an IPv4 network for a specific service type. The service type should be defined in the {term}`OSS` - parameters of {term}`GSO`, from which the containers and netmask will be used. + Allocate an IPv4 network for a specific service type. The service type should be defined in the :term:`OSS` + parameters of :term:`GSO`, from which the containers and netmask will be used. :param service_type: The service type for which the network is allocated. :type service_type: str @@ -105,8 +105,8 @@ def allocate_v4_network(service_type: str, comment: str | None = "") -> ipaddres def allocate_v6_network(service_type: str, comment: str | None = "") -> ipaddress.IPv6Network: """Allocate a new IPv6 network in Infoblox. - Allocate an IPv6 network for a specific service type. The service type should be defined in the {term}`OSS` - parameters of {term}`GSO`, from which the containers and netmask will be used. + Allocate an IPv6 network for a specific service type. The service type should be defined in the :term:`OSS` + parameters of :term:`GSO`, from which the containers and netmask will be used. :param service_type: The service type for which the network is allocated. :type service_type: str @@ -122,9 +122,9 @@ def allocate_v6_network(service_type: str, comment: str | None = "") -> ipaddres def find_network_by_cidr(ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network) -> objects.Network | None: - """Find a network in Infoblox by its {term}`CIDR`. + """Find a network in Infoblox by its :term:`CIDR`. - :param ip_network: The {term}`CIDR` that is searched. + :param ip_network: The :term:`CIDR` that is searched. :type ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network """ conn, _ = _setup_connection() @@ -134,7 +134,7 @@ def find_network_by_cidr(ip_network: ipaddress.IPv4Network | ipaddress.IPv6Netwo def delete_network(ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network) -> None: """Delete a network in Infoblox. - Delete a network that is allocated in Infoblox, by passing the {term}`CIDR` to be deleted. The {term}`CIDR` must + Delete a network that is allocated in Infoblox, by passing the :term:`CIDR` to be deleted. The :term:`CIDR` must exactly match an existing entry in Infoblox, otherwise this method raises a {class}`DeletionError` :param ip_network: The network that should get deleted. @@ -156,11 +156,11 @@ def allocate_host( host. Most likely to be a loopback interface. If the hostname is not available in Infoblox (due to a potential collision) this method raises an {class}`AllocationError`. - :param hostname: The {term}`FQDN` of the new host + :param hostname: The :term:`FQDN` of the new host :type hostname: str :param service_type: The service type from which IP resources should be used. :type service_type: str - :param cname_aliases: A list of any {term}`CNAME` aliases that should be associated with this host. Most often this + :param cname_aliases: A list of any :term:`CNAME` aliases that should be associated with this host. Most often this will be a single loopback address. :type cname_aliases: list[str] :param comment: A comment that is added to the host record in Infoblox, should be the `subscription_id` of the new @@ -226,9 +226,9 @@ def find_host_by_ip(ip_addr: ipaddress.IPv4Address | ipaddress.IPv6Address) -> o def find_host_by_fqdn(fqdn: str) -> objects.HostRecord | None: - """Find a host record by its associated {term}`FQDN`. + """Find a host record by its associated :term:`FQDN`. - :param fqdn: The {term}`FQDN` of a host that is searched for. + :param fqdn: The :term:`FQDN` of a host that is searched for. :type fqdn: str """ conn, _ = _setup_connection() @@ -254,7 +254,7 @@ def delete_host_by_ip(ip_addr: ipaddress.IPv4Address | ipaddress.IPv6Address) -> def delete_host_by_fqdn(fqdn: str) -> None: """Delete a host from Infoblox. - Delete a host record in Infoblox, by providing the {term}`FQDN` that is associated with the record. Raises a + Delete a host record in Infoblox, by providing the :term:`FQDN` that is associated with the record. Raises a {class}`DeletionError` if no record can be found in Infoblox. :param fqdn: The FQDN of the host record that should get deleted. diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index d3be739fd9e999e65973695848f69d515c84aad3..c9e41f74908eab79184a3a751002e60fb93b416d 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -1,6 +1,6 @@ -"""The Provisioning Proxy service, which interacts with {term}`LSO` running externally. +"""The Provisioning Proxy service, which interacts with :term:`LSO` running externally. -{term}`LSO` is responsible for executing Ansible playbooks, that deploy subscriptions. +:term:`LSO` is responsible for executing Ansible playbooks, that deploy subscriptions. """ import json import logging @@ -26,7 +26,7 @@ DEFAULT_LABEL = "Provisioning proxy is running. Please come back later for the r class CUDOperation(strEnum): - """Enumerator for different {term}`CRUD` operations that the provisioning proxy supports. + """Enumerator for different :term:`CRUD` operations that the provisioning proxy supports. Read is not applicable, hence the missing R. """ @@ -37,9 +37,9 @@ 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. + """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 + :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, @@ -82,7 +82,7 @@ def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr, operatio def provision_router( subscription: RouterProvisioning, process_id: UUIDstr, tt_number: str, dry_run: bool = True ) -> None: - """Provision a new router using {term}`LSO`. + """Provision a new router using :term:`LSO`. :param subscription: The subscription object that's to be provisioned. :type subscription: {class}`RouterProvisioning` @@ -105,7 +105,7 @@ def provision_router( def provision_ip_trunk( subscription: IptrunkProvisioning, process_id: UUIDstr, tt_number: str, config_object: str, dry_run: bool = True ) -> None: - """Provision an IP trunk service using {term}`LSO`. + """Provision an IP trunk service using :term:`LSO`. :param subscription: The subscription object that's to be provisioned. :type subscription: {class}`IptrunkProvisioning` @@ -130,7 +130,7 @@ def provision_ip_trunk( def check_ip_trunk(subscription: IptrunkProvisioning, process_id: UUIDstr, tt_number: str, check_name: str) -> None: - """Provision an IP trunk service using {term}`LSO`. + """Provision an IP trunk service using :term:`LSO`. :param subscription: The subscription object that's to be provisioned. :type subscription: {class}`IptrunkProvisioning` @@ -150,7 +150,7 @@ def check_ip_trunk(subscription: IptrunkProvisioning, process_id: UUIDstr, tt_nu def deprovision_ip_trunk(subscription: Iptrunk, process_id: UUIDstr, tt_number: str, dry_run: bool = True) -> None: - """Deprovision an IP trunk service using {term}`LSO`. + """Deprovision an IP trunk service using :term:`LSO`. :param subscription: The subscription object that's to be provisioned. :type subscription: {class}`IptrunkProvisioning` @@ -183,7 +183,7 @@ def migrate_ip_trunk( config_object: str, dry_run: bool = True, ) -> None: - """Migrate an IP trunk service using {term}`LSO`. + """Migrate an IP trunk service using :term:`LSO`. :param subscription: The subscription object that's to be migrated. :type subscription: {class}`Iptrunk` @@ -191,7 +191,7 @@ def migrate_ip_trunk( :type new_node: {class}`Router` :param new_lag_interface: The name of the new aggregated Ethernet interface :type new_lag_interface: str - :param new_lag_member_interfaces: The new list of interfaces that are part of the {term}`LAG` + :param new_lag_member_interfaces: The new list of interfaces that are part of the :term:`LAG` :type new_lag_member_interfaces: list[str] :param replace_index: The index of the side that is going to be replaced as part of the existing trunk, can be `0` or `1`. diff --git a/gso/services/subscriptions.py b/gso/services/subscriptions.py index 97c709647f04f35338147cbbc7ae09774c03442c..043691bc04a0dbac169b3ab39283c93053013f8c 100644 --- a/gso/services/subscriptions.py +++ b/gso/services/subscriptions.py @@ -69,7 +69,7 @@ def get_active_router_subscriptions(fields: list[str]) -> list[Subscription]: def get_product_id_by_name(product_name: ProductType) -> UUID: - """Retrieve the {term}`UUID` of a product by its name. + """Retrieve the :term:`UUID` of a product by its name. Args: ---- @@ -77,7 +77,7 @@ def get_product_id_by_name(product_name: ProductType) -> UUID: Returns: ------- - {term}`UUID`: The {term}`UUID` of the product. + :term:`UUID`: The :term:`UUID` of the product. """ return ProductTable.query.filter_by(name=product_name).first().product_id diff --git a/gso/settings.py b/gso/settings.py index f6ecc5e08e5cf9e45485b1931b2719661d56fc36..701f65fddc74029e2fba309d76f5ec275fd1d9e8 100644 --- a/gso/settings.py +++ b/gso/settings.py @@ -1,4 +1,4 @@ -"""{term}`GSO` settings. +""":term:`GSO` settings. Ensuring that the required parameters are set correctly. """ @@ -14,10 +14,10 @@ logger = logging.getLogger(__name__) class GeneralParams(BaseSettings): - """General parameters for a {term}`GSO` configuration file.""" + """General parameters for a :term:`GSO` configuration file.""" public_hostname: str - """The hostname that {term}`GSO` is publicly served at, used for building the callback URL that the provisioning + """The hostname that :term:`GSO` is publicly served at, used for building the callback URL that the provisioning proxy uses.""" @@ -60,7 +60,7 @@ class ServiceNetworkParams(BaseSettings): class IPAMParams(BaseSettings): - """A set of parameters related to {term}`IPAM`.""" + """A set of parameters related to :term:`IPAM`.""" INFOBLOX: InfoBloxParams LO: ServiceNetworkParams @@ -87,7 +87,7 @@ class NetBoxParams(BaseSettings): class OSSParams(BaseSettings): - """The set of parameters required for running {term}`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 32ffca79cc43d7e566515c88ee31206f029ac5f4..65a84b5d64e63f09074d2da0e7cd9660322e92ae 100644 --- a/gso/workflows/__init__.py +++ b/gso/workflows/__init__.py @@ -1,4 +1,4 @@ -"""Initialisation class that imports all workflows into {term}`GSO`.""" +"""Initialisation class that imports all workflows into :term:`GSO`.""" from orchestrator.workflows import LazyWorkflowInstance LazyWorkflowInstance("gso.workflows.iptrunk.create_iptrunk", "create_iptrunk") diff --git a/gso/workflows/utils.py b/gso/workflows/utils.py index 02ebed3eaf5a12f55027063b30728ac4a8336ca1..13e637ad6494bbcb74ba79ffaad4eea63d6228ee 100644 --- a/gso/workflows/utils.py +++ b/gso/workflows/utils.py @@ -15,10 +15,10 @@ def customer_selector() -> Choice: def iso_from_ipv4(ipv4_address: IPv4Address) -> str: - """Calculate an {term}`ISO` address, based on an IPv4 address. + """Calculate an :term:`ISO` address, based on an IPv4 address. :param IPv4Address ipv4_address: The address that's to be converted - :returns: An {term}`ISO`-formatted address. + :returns: An :term:`ISO`-formatted address. """ padded_octets = [f"{x:>03}" for x in str(ipv4_address).split(".")] joined_octets = "".join(padded_octets)