diff --git a/build-docs.sh b/build-docs.sh index 34eadabbe43f22cac9e4abd40c3fadf1c3d872a3..f68d5ad6dfa32f42e18bfdcee90a8351d6c5e8fd 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -3,6 +3,7 @@ set -o errexit set -o nounset export OSS_PARAMS_FILENAME=../gso/oss-params-example.json +export TESTING=true pip install sphinx_rtd_theme sphinxcontrib-jquery diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst index e8046503e115742777650c0ac5492d0ac9aee66e..40512a3fb94b9241974760b518a08f1b872bc2bc 100644 --- a/docs/source/glossary.rst +++ b/docs/source/glossary.rst @@ -9,6 +9,9 @@ Glossary of terms API Application Programming Interface + BFD + Bi-directional Forwarding Detection + BGP Border Gateway Protocol: a path vector routing protocol described in `RFC 4271 <https://datatracker.ietf.org/doc/html/rfc4271>`_. @@ -63,12 +66,18 @@ Glossary of terms LAN Local Area Network + LLDP + Link Layer Discovery Protocol + LSO Lightweight Service Orchestrator NET Network Entity Title: used for :term:`ISIS` routing. + NREN + National Research and Education Network + OIDC OpenID Connect @@ -81,6 +90,10 @@ Glossary of terms OSS Operational Support Systems + SDP + Service Demarcation Point: A logical construct used for modeling partner subscriptions. It models the link between + the physical and the service domains. + SNMP Simple Network Management Protocol: a protocol that's used for gathering data, widely used for network management and monitoring. diff --git a/docs/source/module/products/product_blocks/bgp_session.rst b/docs/source/module/products/product_blocks/bgp_session.rst new file mode 100644 index 0000000000000000000000000000000000000000..5d3fe341ee92e31dd323d06bcd00206c1120c438 --- /dev/null +++ b/docs/source/module/products/product_blocks/bgp_session.rst @@ -0,0 +1,6 @@ +``gso.products.product_blocks.bgp_session`` +=========================================== + +.. automodule:: gso.products.product_blocks.bgp_session + :members: + :show-inheritance: diff --git a/docs/source/module/products/product_blocks/geant_ip.rst b/docs/source/module/products/product_blocks/geant_ip.rst new file mode 100644 index 0000000000000000000000000000000000000000..46958f8dac1681d3afd8ecdd59cc6398f588cf93 --- /dev/null +++ b/docs/source/module/products/product_blocks/geant_ip.rst @@ -0,0 +1,6 @@ +``gso.products.product_blocks.geant_ip`` +======================================== + +.. automodule:: gso.products.product_blocks.geant_ip + :members: + :show-inheritance: diff --git a/docs/source/module/products/product_blocks/index.rst b/docs/source/module/products/product_blocks/index.rst index 09cba78bf528a55a1e7c3dc23d4f99d466886ff6..65474b437b327a89345a5d12378e15ffd3a3cd68 100644 --- a/docs/source/module/products/product_blocks/index.rst +++ b/docs/source/module/products/product_blocks/index.rst @@ -14,14 +14,16 @@ Submodules .. toctree:: :maxdepth: 1 - super_pop_switch - office_router + bgp_session + edge_port + geant_ip iptrunk + lan_switch_interconnect + office_router + opengear + pop_vlan router + service_binding_port site + super_pop_switch switch - lan_switch_interconnect - pop_vlan - opengear - edge_port - diff --git a/docs/source/module/products/product_blocks/service_binding_port.rst b/docs/source/module/products/product_blocks/service_binding_port.rst new file mode 100644 index 0000000000000000000000000000000000000000..a7036dc21ef3191fda321f70362d08e89b49ffae --- /dev/null +++ b/docs/source/module/products/product_blocks/service_binding_port.rst @@ -0,0 +1,6 @@ +``gso.products.product_blocks.service_binding_port`` +==================================================== + +.. automodule:: gso.products.product_blocks.service_binding_port + :members: + :show-inheritance: diff --git a/docs/source/module/products/product_types/geant_ip.rst b/docs/source/module/products/product_types/geant_ip.rst new file mode 100644 index 0000000000000000000000000000000000000000..bb2167f1123b1a0e4a54f2433ad3ee3b3636994e --- /dev/null +++ b/docs/source/module/products/product_types/geant_ip.rst @@ -0,0 +1,6 @@ +``gso.products.product_types.geant_ip`` +======================================= + +.. automodule:: gso.products.product_types.geant_ip + :members: + :show-inheritance: diff --git a/docs/source/module/products/product_types/index.rst b/docs/source/module/products/product_types/index.rst index 999db7294a9eea3094a0d1ba23adec7d701abdb2..b2636eaf5139fb23291be3c45e2bac8b5a504af7 100644 --- a/docs/source/module/products/product_types/index.rst +++ b/docs/source/module/products/product_types/index.rst @@ -14,13 +14,14 @@ Submodules .. toctree:: :maxdepth: 1 - super_pop_switch - office_router + edge_port + geant_ip iptrunk + lan_switch_interconnect + office_router + opengear + pop_vlan router site + super_pop_switch switch - lan_switch_interconnect - pop_vlan - opengear - edge_port diff --git a/docs/source/module/utils/index.rst b/docs/source/module/utils/index.rst index 52f992ba035f17541d1e5314844ee59490a883bf..7289690736f520a7b462cce3c7446c282a805613 100644 --- a/docs/source/module/utils/index.rst +++ b/docs/source/module/utils/index.rst @@ -5,6 +5,14 @@ :members: :show-inheritance: +Subpackages +----------- + +.. toctree:: + :maxdepth: 1 + + types/index + Submodules ---------- diff --git a/docs/source/module/utils/types.rst b/docs/source/module/utils/types.rst deleted file mode 100644 index c70c8dd0c61a4fa29cc2f123ec4d0643ab7bdf5d..0000000000000000000000000000000000000000 --- a/docs/source/module/utils/types.rst +++ /dev/null @@ -1,6 +0,0 @@ -``gso.utils.types`` -=================== - -.. automodule:: gso.utils.types - :members: - :show-inheritance: diff --git a/docs/source/module/utils/types/base_site.rst b/docs/source/module/utils/types/base_site.rst new file mode 100644 index 0000000000000000000000000000000000000000..ac952086ae62069f8a4cd3f0fc9e757e9035d231 --- /dev/null +++ b/docs/source/module/utils/types/base_site.rst @@ -0,0 +1,6 @@ +``gso.utils.types.base_site`` +============================= + +.. automodule:: gso.utils.types.base_site + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/coordinates.rst b/docs/source/module/utils/types/coordinates.rst new file mode 100644 index 0000000000000000000000000000000000000000..85c52ba10681782a6ce049a231c8a21b2a0aede3 --- /dev/null +++ b/docs/source/module/utils/types/coordinates.rst @@ -0,0 +1,6 @@ +``gso.utils.types.coordinates`` +=============================== + +.. automodule:: gso.utils.types.coordinates + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/country_code.rst b/docs/source/module/utils/types/country_code.rst new file mode 100644 index 0000000000000000000000000000000000000000..604feaf1fa4c8668348c734b6e8cf6052c734de0 --- /dev/null +++ b/docs/source/module/utils/types/country_code.rst @@ -0,0 +1,6 @@ +``gso.utils.types.country_code`` +=============================== + +.. automodule:: gso.utils.types.country_code + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/index.rst b/docs/source/module/utils/types/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..2dcf23ec96f2d068448c3d3f3aadaf1d3ec3b805 --- /dev/null +++ b/docs/source/module/utils/types/index.rst @@ -0,0 +1,24 @@ +``gso.utils.types`` +=================== + +.. automodule:: gso.utils.types + :members: + :show-inheritance: + + +Submodules +---------- + +.. toctree:: + :maxdepth: 2 + :titlesonly: + + base_site + coordinates + country_code + interfaces + ip_address + netbox_router + site_name + tt_number + unique_field diff --git a/docs/source/module/utils/types/interfaces.rst b/docs/source/module/utils/types/interfaces.rst new file mode 100644 index 0000000000000000000000000000000000000000..95c9a3dacf770c3963f431cb2d40a612d4b1043f --- /dev/null +++ b/docs/source/module/utils/types/interfaces.rst @@ -0,0 +1,6 @@ +``gso.utils.types.interfaces`` +============================== + +.. automodule:: gso.utils.types.interfaces + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/ip_address.rst b/docs/source/module/utils/types/ip_address.rst new file mode 100644 index 0000000000000000000000000000000000000000..68858af762bd0559a88e2fcacf88edbd9f4bd1a3 --- /dev/null +++ b/docs/source/module/utils/types/ip_address.rst @@ -0,0 +1,6 @@ +``gso.utils.types.ip_address`` +============================== + +.. automodule:: gso.utils.types.ip_address + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/netbox_router.rst b/docs/source/module/utils/types/netbox_router.rst new file mode 100644 index 0000000000000000000000000000000000000000..1d35d235e221b31a8b09e5c0a0dcef5cfc342fcc --- /dev/null +++ b/docs/source/module/utils/types/netbox_router.rst @@ -0,0 +1,6 @@ +``gso.utils.types.netbox_router`` +================================= + +.. automodule:: gso.utils.types.netbox_router + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/site_name.rst b/docs/source/module/utils/types/site_name.rst new file mode 100644 index 0000000000000000000000000000000000000000..df2934a6d0449a9129615b97e5584fd687c528b3 --- /dev/null +++ b/docs/source/module/utils/types/site_name.rst @@ -0,0 +1,6 @@ +``gso.utils.types.site_name`` +============================= + +.. automodule:: gso.utils.types.site_name + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/tt_number.rst b/docs/source/module/utils/types/tt_number.rst new file mode 100644 index 0000000000000000000000000000000000000000..43410a3536f9fa879411e512140328293543fffa --- /dev/null +++ b/docs/source/module/utils/types/tt_number.rst @@ -0,0 +1,6 @@ +``gso.utils.types.tt_number`` +============================= + +.. automodule:: gso.utils.types.tt_number + :members: + :show-inheritance: diff --git a/docs/source/module/utils/types/unique_field.rst b/docs/source/module/utils/types/unique_field.rst new file mode 100644 index 0000000000000000000000000000000000000000..3a74a0d1faea700768b41be6fd3dfe67f2d4df58 --- /dev/null +++ b/docs/source/module/utils/types/unique_field.rst @@ -0,0 +1,6 @@ +``gso.utils.types.unique_field`` +================================ + +.. automodule:: gso.utils.types.unique_field + :members: + :show-inheritance: diff --git a/docs/source/module/workflows/edge_port/index.rst b/docs/source/module/workflows/edge_port/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..a77d161716168736b6a2b458b8c655c9082dc21b --- /dev/null +++ b/docs/source/module/workflows/edge_port/index.rst @@ -0,0 +1,18 @@ +``gso.workflows.edge_port`` +=========================== + +.. automodule:: gso.workflows.edge_port + :members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + :maxdepth: 2 + :titlesonly: + + create_edge_port + modify_edge_port + terminate_edge_port + validate_edge_port diff --git a/docs/source/module/workflows/edge_port/terminate_edge_port.rst b/docs/source/module/workflows/edge_port/terminate_edge_port.rst index 4ab880f921d395f98eb4393c39a9cf940ac69927..4613d361d6576b6b89c665f201b1eecee161f813 100644 --- a/docs/source/module/workflows/edge_port/terminate_edge_port.rst +++ b/docs/source/module/workflows/edge_port/terminate_edge_port.rst @@ -1,5 +1,5 @@ ``gso.workflows.edge_port.terminate_edge_port`` -============================================== +=============================================== .. automodule:: gso.workflows.edge_port.terminate_edge_port :members: diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index 76b4b40c4795fa870bdefc65e758f0476f747d5a..063fe579321aa2a2ee6d0613b7e9b35a8803c180 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -25,6 +25,7 @@ custom.Contractions = YES ; Using a "regular" - instead of an en dash is totally fine Microsoft.Negative = NO Microsoft.RangeFormat = NO +Microsoft.We = suggestion TokenIgnores = (:term:`\S+`), (:param \S+(?: \S+)?:), (:type \S+:), (:return \S+:), (:rtype: \S+), (:class:`\S+`) diff --git a/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt b/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt index 9d05c0923f215fd59a4b0729ffec2b91301d8e93..6509f0d5bdb354bcd9c17eab9cf79fb900653ee1 100644 --- a/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt +++ b/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt @@ -31,3 +31,7 @@ OPA OIDC HTTPBearer Kentik +UTC +EARL +SURF +[Ee]nsure diff --git a/docs/vale/styles/custom/Contractions.yml b/docs/vale/styles/custom/Contractions.yml index 9c2b94a52ad8840de5539565d9e6d4d288cdd838..ecba3923af1c6e99fbacc60afbfbdcfc862c275d 100644 --- a/docs/vale/styles/custom/Contractions.yml +++ b/docs/vale/styles/custom/Contractions.yml @@ -7,7 +7,6 @@ swap: can't: cannot couldn't: could not didn't: did not - don't: do not doesn't: does not hasn't: has not haven't: have not diff --git a/gso/products/product_blocks/edge_port.py b/gso/products/product_blocks/edge_port.py index ad90ac76f6a82ad6a9af37f1a4d18e4ec0a184f9..b77fd9386635d10ef22e647a3f2a10d059c0a401 100644 --- a/gso/products/product_blocks/edge_port.py +++ b/gso/products/product_blocks/edge_port.py @@ -114,7 +114,7 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle. edge_port_enable_lacp: bool #: The type of encapsulation used on this edge port, by default DOT1Q. edge_port_encapsulation: EncapsulationType = EncapsulationType.DOT1Q - #: The MAC address assigned to this edge port, if applicable. + #: The :term:`MAC` address assigned to this edge port, if applicable. edge_port_mac_address: str | None = None #: The speed capacity of each member in the physical port. edge_port_member_speed: PhysicalPortCapacity @@ -126,7 +126,7 @@ class EdgePortBlock(EdgePortBlockProvisioning, lifecycle=[SubscriptionLifecycle. edge_port_ignore_if_down: bool = False #: The GEANT GA ID associated with this edge port, if any. edge_port_geant_ga_id: str | None = None - #: A list of LAG members associated with this edge port. + #: A list of :term:`LAG` members associated with this edge port. edge_port_ae_members: LAGMemberList[EdgePortAEMemberBlock] # type: ignore[assignment] #: A list of Service Binding Ports associated with this Edge Port edge_port_sbp_list: list[ServiceBindingPort] # type: ignore[assignment] diff --git a/gso/products/product_blocks/geant_ip.py b/gso/products/product_blocks/geant_ip.py index 8104c23d1515da7fa633d7919c4b441e86977ce7..2f7bf5fbe4567e68ec1fb884ed02d955a79f04e8 100644 --- a/gso/products/product_blocks/geant_ip.py +++ b/gso/products/product_blocks/geant_ip.py @@ -21,7 +21,7 @@ class NRENAccessPortProvisioning(NRENAccessPortInactive, lifecycle=[Subscription """An access port for an R&E :term:`NREN` service that is being provisioned.""" nren_ap_type: APType - geant_ip_ep: EdgePortBlockProvisioning # type: ignore[assignment] + geant_ip_ep: EdgePortBlockProvisioning class NRENAccessPort(NRENAccessPortProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]): @@ -30,7 +30,7 @@ class NRENAccessPort(NRENAccessPortProvisioning, lifecycle=[SubscriptionLifecycl #: The type of Access Port nren_ap_type: APType #: The list of Edge Ports where this service terminates. - geant_ip_ep: EdgePortBlock # type: ignore[assignment] + geant_ip_ep: EdgePortBlock class GeantIPBlockInactive( diff --git a/gso/products/product_blocks/opengear.py b/gso/products/product_blocks/opengear.py index 84ed84b3b11d122f757b3e764202ce5052ca615f..14a4db847deaf6f65bd0d849f51ddabd8debf53d 100644 --- a/gso/products/product_blocks/opengear.py +++ b/gso/products/product_blocks/opengear.py @@ -43,9 +43,9 @@ class OpengearBlock(OpengearBlockProvisioning, lifecycle=[SubscriptionLifecycle. opengear_hostname: str #: The site where the Opengear device is located. opengear_site: SiteBlock - #: The WAN address of the Opengear device. + #: The :term:`WAN` address of the Opengear device. opengear_wan_address: ipaddress.IPv4Address - #: The WAN netmask of the Opengear device. + #: The :term:`WAN` netmask of the Opengear device. opengear_wan_netmask: ipaddress.IPv4Address - #: The WAN gateway of the Opengear device. + #: The :term:`WAN` gateway of the Opengear device. opengear_wan_gateway: ipaddress.IPv4Address diff --git a/gso/services/kentik_client.py b/gso/services/kentik_client.py index 7849adeeec4f6347f2545c5ec76fffaf5f6ee0e1..a958aca58e074ce4de9e32c18849ca9ebf8fc048 100644 --- a/gso/services/kentik_client.py +++ b/gso/services/kentik_client.py @@ -99,6 +99,8 @@ class KentikClient: If the site is not found, return an empty dict. + .. vale off + :param str site_slug: The name of the site, should be a three-letter slug like COR or POZ. """ sites = self.get_sites() diff --git a/gso/services/netbox_client.py b/gso/services/netbox_client.py index 63ce9da8f426315541070b493f721a3129caa625..3b71f49dd54fa643c5a7c465c9cd3deb68d61c35 100644 --- a/gso/services/netbox_client.py +++ b/gso/services/netbox_client.py @@ -295,7 +295,7 @@ class NetboxClient: router_name = Router.from_subscription(router_id).router.router_fqdn device = self.get_device_by_name(router_name) - # Get the existing LAG interfaces for the device + # Get the existing :term:`LAG` interfaces for the device lag_interface_names = [ interface["name"] for interface in self.netbox.dcim.interfaces.filter(device=device.name, type="lag") ] diff --git a/gso/translations/en-GB.json b/gso/translations/en-GB.json index 63f9e9c2453ab4eb59dfce225aaf227c3562e598..0834aa693723e35d3bb2268fde753a6896d4df97 100644 --- a/gso/translations/en-GB.json +++ b/gso/translations/en-GB.json @@ -44,6 +44,7 @@ "create_site": "Create Site", "create_switch": "Create Switch", "create_edge_port": "Create Edge Port", + "create_geant_ip": "Create GÉANT IP", "deploy_twamp": "Deploy TWAMP", "migrate_iptrunk": "Migrate IP Trunk", "modify_isis_metric": "Modify the ISIS metric", diff --git a/gso/utils/helpers.py b/gso/utils/helpers.py index e3dda41d49a7d0a883f57c96e84fc93f1c2724be..1e1470c10b7052b5beb7d2702f2bb3d0532d2d78 100644 --- a/gso/utils/helpers.py +++ b/gso/utils/helpers.py @@ -209,15 +209,18 @@ def active_edge_port_selector(*, geant_only: bool | None = None) -> Choice: if geant_only is not None: # ``geant_only`` is set, so we will filter accordingly. geant_partner_id = get_partner_by_name("GEANT")["partner_id"] - edge_port_subscriptions = filter( - lambda subscription: geant_only ^ bool(subscription["customer_id"] != geant_partner_id), - edge_port_subscriptions, + edge_port_subscriptions = list( + filter( + lambda subscription: geant_only ^ bool(subscription["customer_id"] != geant_partner_id), + edge_port_subscriptions, + ) ) - edge_port_subscriptions = {str(port["subscription_id"]): port["description"] for port in edge_port_subscriptions} + edge_ports = {str(port["subscription_id"]): port["description"] for port in edge_port_subscriptions} return Choice( - "Select an Edge Port", zip(edge_port_subscriptions.keys(), edge_port_subscriptions.items(), strict=True) + "Select an Edge Port", + zip(edge_ports.keys(), edge_ports.items(), strict=True), # type: ignore[arg-type] ) @@ -229,11 +232,11 @@ def partner_choice() -> Choice: def validate_edge_port_number_of_members_based_on_lacp(*, number_of_members: int, enable_lacp: bool) -> None: - """Validate the number of edge port members based on the LACP setting. + """Validate the number of edge port members based on the :term:`LACP` setting. :param number_of_members: The number of members to validate. - :param enable_lacp: Whether LACP is enabled or not. - :raises ValueError: If the number of members is greater than 1 and LACP is disabled. + :param enable_lacp: Whether :term:`LACP` is enabled or not. + :raises ValueError: If the number of members is greater than 1 and :term:`LACP` is disabled. """ if number_of_members > 1 and not enable_lacp: err_msg = "Number of members must be 1 if LACP is disabled." diff --git a/gso/workflows/edge_port/create_edge_port.py b/gso/workflows/edge_port/create_edge_port.py index fdf1e760b78054b22a29d252cd5cac7762ea15b1..1e57b232e2b3701ebe1f7675f30465cc75fa9515 100644 --- a/gso/workflows/edge_port/create_edge_port.py +++ b/gso/workflows/edge_port/create_edge_port.py @@ -239,7 +239,7 @@ def create_edge_port() -> StepList: * Create and initialise the subscription object in the service database * Deploy configuration on the new edge port, first as a dry run - * allocate LAG and LAG members in the Netbox. + * allocate :term:`LAG` and :term:`LAG` members in the Netbox. """ return ( begin diff --git a/gso/workflows/edge_port/terminate_edge_port.py b/gso/workflows/edge_port/terminate_edge_port.py index e191d330b1b8280c052ac22b02ffdabab430433a..893a8c1ebdf53130694a8eca604632e015d0884c 100644 --- a/gso/workflows/edge_port/terminate_edge_port.py +++ b/gso/workflows/edge_port/terminate_edge_port.py @@ -70,7 +70,7 @@ def remove_edge_port_real( @step("Netbox Clean Up") def netbox_clean_up(subscription: EdgePort) -> None: - """Update Netbox to remove the edge port LAG interface and all the LAG members.""" + """Update Netbox to remove the edge port :term:`LAG` interface and all the :term:`LAG` members.""" nbclient = NetboxClient() for member in subscription.edge_port.edge_port_ae_members: diff --git a/gso/workflows/geant_ip/create_geant_ip.py b/gso/workflows/geant_ip/create_geant_ip.py index fdaaf38e4c730dc5652a30fcb4c4459225b15843..f8c280770695b5f971721ab4eafc5369c068d112 100644 --- a/gso/workflows/geant_ip/create_geant_ip.py +++ b/gso/workflows/geant_ip/create_geant_ip.py @@ -36,15 +36,15 @@ def initial_input_form_generator(product_name: str) -> FormGenerator: model_config = ConfigDict(title=f"{product_name} - Select partner") tt_number: TTNumber - partner: partner_choice() + partner: partner_choice() # type: ignore[valid-type] initial_user_input = yield CreateGeantIPForm class EdgePortSelection(BaseModel): - edge_port: active_edge_port_selector() + edge_port: active_edge_port_selector() # type: ignore[valid-type] ap_type: APType - def __hash__(self): + def __hash__(self) -> int: return self.edge_port.__hash__() class EdgePortSelectionForm(FormPage): diff --git a/gso/workflows/iptrunk/create_iptrunk.py b/gso/workflows/iptrunk/create_iptrunk.py index e10401186d3731923dc92d398bc93a0d617465fb..3d56bf0ff9c57a0312f159c63c2f2c9bfe51d669 100644 --- a/gso/workflows/iptrunk/create_iptrunk.py +++ b/gso/workflows/iptrunk/create_iptrunk.py @@ -255,7 +255,7 @@ def dig_all_hosts_v6(new_ipv6_network: str) -> None: @step("Ping all hosts in the assigned IPv4 network") def ping_all_hosts_v4(new_ipv4_network: str) -> None: - """Ping all hosts in the IPv4 network to verify they're not in use.""" + """Ping all hosts in the IPv4 network to verify they are not in use.""" unavailable_hosts = [host for host in IPv4Network(new_ipv4_network) if ping(str(host), timeout=1)] if unavailable_hosts: @@ -265,7 +265,7 @@ def ping_all_hosts_v4(new_ipv4_network: str) -> None: @step("Ping all hosts in the assigned IPv6 network") def ping_all_hosts_v6(new_ipv6_network: str) -> State: - """Ping all hosts in the IPv6 network to verify they're not in use.""" + """Ping all hosts in the IPv6 network to verify they are not in use.""" unavailable_hosts = [host for host in IPv6Network(new_ipv6_network) if ping(str(host), timeout=1)] if unavailable_hosts: diff --git a/gso/workflows/iptrunk/migrate_iptrunk.py b/gso/workflows/iptrunk/migrate_iptrunk.py index 5a7cafb03dad77270754cdb9da8a1c57ba84182e..43b43e8c454a2dba2b419149f3dceffe59974025 100644 --- a/gso/workflows/iptrunk/migrate_iptrunk.py +++ b/gso/workflows/iptrunk/migrate_iptrunk.py @@ -89,7 +89,7 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: ): # We want to stay on the same site, so all routers that are in different sites get skipped. continue - # If migrate_to_different_site is true, we can add ALL routers to the result map + # If migrate_to_different_site is true, we can add *all* routers to the result map routers[str(router_id)] = router["description"] new_router_enum = Choice("Select a new router", zip(routers.keys(), routers.items(), strict=True)) # type: ignore[arg-type] @@ -204,7 +204,7 @@ def calculate_old_side_data(subscription: Iptrunk, replace_index: int) -> State: @step("Check Optical PRE levels on the trunk endpoint") def check_ip_trunk_optical_levels_pre(subscription: Iptrunk) -> LSOState: - """Check Optical PRE levels on the trunk.""" + """Check Optical levels on the trunk before migration.""" extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "optical_pre"} return { @@ -252,7 +252,7 @@ def check_ip_trunk_optical_levels_post( def check_ip_trunk_lldp( subscription: Iptrunk, new_node: Router, new_lag_member_interfaces: list[dict], replace_index: int ) -> LSOState: - """Check LLDP on the new trunk endpoints.""" + """Check :term:`LLDP` on the new trunk endpoints.""" extra_vars = { "wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "new_node": json.loads(json_dumps(new_node)), @@ -489,7 +489,7 @@ def update_remaining_side_bfd_real( @step("Check BFD session over trunk") def check_ip_trunk_bfd(subscription: Iptrunk, new_node: Router, replace_index: int) -> LSOState: - """Check BFD session across the new trunk.""" + """Check :term:`BFD` session across the new trunk.""" extra_vars = { "wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "new_node": json.loads(json_dumps(new_node)), @@ -830,7 +830,7 @@ def migrate_iptrunk() -> StepList: * Deploy a new :term:`ISIS` interface between routers A and C * Wait for operator confirmation that :term:`ISIS` is behaving as expected * Restore the old :term:`ISIS` metric on the new trunk - * Delete the old, disabled configuration on the routers, first as a dry run + * Delete the old configuration from the routers, first as a dry run * Reflect the changes made in :term:`IPAM` * Update the subscription model in the database * Update the reserved interfaces in Netbox diff --git a/gso/workflows/iptrunk/modify_trunk_interface.py b/gso/workflows/iptrunk/modify_trunk_interface.py index 16de246238a40f40341cf2911b59471cb956df8b..94f6312800156222dac53c77dbd51e7809b7e0ef 100644 --- a/gso/workflows/iptrunk/modify_trunk_interface.py +++ b/gso/workflows/iptrunk/modify_trunk_interface.py @@ -205,7 +205,7 @@ def check_ip_trunk_connectivity(subscription: Iptrunk) -> LSOState: @step("Check LLDP on the trunk endpoints") def check_ip_trunk_lldp(subscription: Iptrunk) -> LSOState: - """Check LLDP on trunk endpoints.""" + """Check :term:`LLDP` on trunk endpoints.""" extra_vars = {"wfo_ip_trunk_json": json.loads(json_dumps(subscription)), "check": "lldp"} return { diff --git a/gso/workflows/iptrunk/validate_iptrunk.py b/gso/workflows/iptrunk/validate_iptrunk.py index 4ca96f8b6ad70a7e6201174827632b4bad12b0d3..f66612f56c4fcfae5676b13c24f4b755d6b5965b 100644 --- a/gso/workflows/iptrunk/validate_iptrunk.py +++ b/gso/workflows/iptrunk/validate_iptrunk.py @@ -210,7 +210,7 @@ def validate_iptrunk() -> StepList: * Verify that the :term:`LAG` interfaces are correctly configured in :term:`IPAM`. * Check correct configuration of interfaces in NetBox. * Verify the configuration on both sides of the trunk is intact. - * Check the ISIS metric of the trunk. + * Check the :term:`ISIS` metric of the trunk. * Verify that TWAMP configuration is correct. If a trunk has a Juniper router on both sides, it is considered legacy and does not require validation. diff --git a/gso/workflows/router/create_router.py b/gso/workflows/router/create_router.py index 928fca58ba97e7cdba9c2012387a78bddce01540..4492e86e9b1d5b3ad4a733ada87df51efae84248 100644 --- a/gso/workflows/router/create_router.py +++ b/gso/workflows/router/create_router.py @@ -44,7 +44,7 @@ def initial_input_form_generator(product_name: str) -> FormGenerator: tt_number: TTNumber partner: ReadOnlyField("GEANT", default_type=str) # type: ignore[valid-type] vendor: Vendor - router_site: active_site_selector() + router_site: active_site_selector() # type: ignore[valid-type] hostname: str ts_port: PortNumber router_role: RouterRole diff --git a/gso/workflows/router/modify_connection_strategy.py b/gso/workflows/router/modify_connection_strategy.py index 65b29b8d1b57851d925ffb89909c215e94889f06..890329d845bfe1c3a18accb318e303734378e667 100644 --- a/gso/workflows/router/modify_connection_strategy.py +++ b/gso/workflows/router/modify_connection_strategy.py @@ -34,8 +34,8 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: def update_subscription_model(subscription: Router, connection_strategy: str) -> State: """Update the database model to reflect the new connection strategy. - If the connection strategy is set to IN-BAND, then access_via_ts should be set to False. - Conversely, if the connection strategy is set to OUT-OF-BAND, access_via_ts should be set to True. + If the connection strategy is set to in-band, then access_via_ts should be set to False. + Conversely, if the connection strategy is set to out-of-band, access_via_ts should be set to True. """ subscription.router.router_access_via_ts = connection_strategy == ConnectionStrategy.OUT_OF_BAND diff --git a/gso/workflows/router/promote_p_to_pe.py b/gso/workflows/router/promote_p_to_pe.py index a82b4823f4374772ef2b5365f3f57ea56fad1017..8bf78ea033cc00a8fe936ab10d0223ae9ee1f9dc 100644 --- a/gso/workflows/router/promote_p_to_pe.py +++ b/gso/workflows/router/promote_p_to_pe.py @@ -236,7 +236,7 @@ def deploy_routing_instances_real(subscription: dict[str, Any], tt_number: str, @step("Remove ISIS overload") def remove_isis_overload(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState: - """Remove ISIS overload.""" + """Remove :term:`ISIS` overload.""" extra_vars = { "dry_run": False, "subscription": subscription, diff --git a/test/workflows/edge_port/test_create_edge_port.py b/test/workflows/edge_port/test_create_edge_port.py index db855e8a18e10ed62a8822c901dc65d447081325..7b3fc8bcb81c5fe78466bde088b44d6ce9d20d52 100644 --- a/test/workflows/edge_port/test_create_edge_port.py +++ b/test/workflows/edge_port/test_create_edge_port.py @@ -112,7 +112,7 @@ def test_edge_port_creation_with_invalid_input( test_client, ): product_id = get_product_id_by_name(ProductName.EDGE_PORT) - # If the number of members is greater than 1 then LACP must be enabled. + # If the number of members is greater than 1 then :term:`LACP` must be enabled. input_form_wizard_data[0]["enable_lacp"] = False initial_data = [{"product": product_id}, *input_form_wizard_data] diff --git a/test/workflows/edge_port/test_validate_edge_port.py b/test/workflows/edge_port/test_validate_edge_port.py index 261d5b24fbe7deadac6deb8d287b64200a83fce8..cda43407fa9e8d9e858472046d8322e1f296221c 100644 --- a/test/workflows/edge_port/test_validate_edge_port.py +++ b/test/workflows/edge_port/test_validate_edge_port.py @@ -58,5 +58,5 @@ def test_validate_edge_port_success( subscription = EdgePort.from_subscription(subscription_id) assert subscription.status == "active" assert mock_execute_playbook.call_count == 1 - # One time for getting the LAG and two times for getting the interfaces + # One time for getting the :term:`LAG` and two times for getting the interfaces assert mock_get_interface_by_name_and_device.call_count == 3