Skip to content
Snippets Groups Projects
Verified Commit 0db4eb39 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update Vale config, resolve a bunch of errors, warnings and suggestions

parent 96c4bf42
Branches
Tags
No related merge requests found
Pipeline #84191 failed
...@@ -19,7 +19,7 @@ html_css_files = ['custom.css'] ...@@ -19,7 +19,7 @@ html_css_files = ['custom.css']
html_js_files = ['custom.js'] html_js_files = ['custom.js']
html_logo = 'static/geant_logo_white.svg' html_logo = 'static/geant_logo_white.svg'
# Both the class' and the __init__ method's docstring are concatenated and inserted. # Both the class' and the ``__init__`` method's docstring are concatenated and inserted.
autoclass_content = 'both' autoclass_content = 'both'
# Display todos by setting to True # Display todos by setting to True
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Sub-packages and -modules Sub-packages and -modules
========================= =========================
This page contains references to the documentation of all sub-packages and -modules that make up :term:`GSO`. This page lists references to the documentation of all sub-packages and -modules that make up :term:`GSO`.
Subpackages Subpackages
----------- -----------
......
...@@ -4,7 +4,7 @@ Quickstart ...@@ -4,7 +4,7 @@ Quickstart
Development environment and dependencies Development environment and dependencies
---------------------------------------- ----------------------------------------
- Install python 3.10 if you don't have it already: - Install python 3.10 if you do not have it already:
- ``add-apt-repository ppa:deadsnakes/ppa`` - ``add-apt-repository ppa:deadsnakes/ppa``
- ``apt install python3.10 python3.10-distutils`` - ``apt install python3.10 python3.10-distutils``
- Follow Steps 1 and 2 from here to install dependencies and setup DB: - Follow Steps 1 and 2 from here to install dependencies and setup DB:
......
...@@ -6,8 +6,8 @@ Vocab = geant-jargon, Sphinx ...@@ -6,8 +6,8 @@ Vocab = geant-jargon, Sphinx
Packages = proselint, Microsoft Packages = proselint, Microsoft
[*.{md,py}] [*.{py,rst}]
; We only lint .md and .py files ; We only lint .rst and .py files
BasedOnStyles = Vale, proselint, Microsoft BasedOnStyles = Vale, proselint, Microsoft
; Some headers are generated and we have no real influence over them ; Some headers are generated and we have no real influence over them
Microsoft.Headings = NO Microsoft.Headings = NO
...@@ -22,10 +22,13 @@ proselint.Typography = warning ...@@ -22,10 +22,13 @@ proselint.Typography = warning
; Same applies for not using contractions ; Same applies for not using contractions
Microsoft.Contractions = NO Microsoft.Contractions = NO
custom.Contractions = YES custom.Contractions = YES
; Using a "regular" - instead of an en dash is totally fine
Microsoft.Negative = NO
Microsoft.RangeFormat = NO
TokenIgnores = (:term:), (:param \S+:), (:type \S+:) TokenIgnores = (:term:`\S+`), (:param \S+(?: \S+)?:), (:type \S+:), (:return \S+:), (:rtype: \S+)
[*/glossary.md] [*/glossary.rst]
; Ignore acronyms being undefined in the file that defines all acronyms by definition. ; Ignore acronyms being undefined in the file that defines all acronyms by definition.
Microsoft.Acronyms = NO Microsoft.Acronyms = NO
Microsoft.Contractions = NO Microsoft.Contractions = NO
...@@ -33,4 +36,4 @@ custom.Contractions = YES ...@@ -33,4 +36,4 @@ custom.Contractions = YES
Microsoft.Passive = NO Microsoft.Passive = NO
[formats] [formats]
py = md py = rst
...@@ -11,7 +11,7 @@ def netbox_initial_setup() -> None: ...@@ -11,7 +11,7 @@ def netbox_initial_setup() -> None:
"""Set up NetBox for the first time. """Set up NetBox for the first time.
It includes: It includes:
- Creating a default site (GEANT) - Creating a default site (GÉANT)
- Creating device roles (Router) - Creating device roles (Router)
""" """
typer.echo("Initial setup of NetBox ...") typer.echo("Initial setup of NetBox ...")
...@@ -19,7 +19,7 @@ def netbox_initial_setup() -> None: ...@@ -19,7 +19,7 @@ def netbox_initial_setup() -> None:
nbclient = NetBoxClient() nbclient = NetBoxClient()
typer.echo("Creating GEANT site ...") typer.echo("Creating GÉANT site ...")
try: try:
nbclient.create_device_site("GEANT", "geant") nbclient.create_device_site("GEANT", "geant")
typer.echo("Site created successfully.") typer.echo("Site created successfully.")
......
...@@ -72,8 +72,7 @@ def _allocate_network( ...@@ -72,8 +72,7 @@ def _allocate_network(
def hostname_available(hostname: str) -> bool: def hostname_available(hostname: str) -> bool:
"""Check whether a hostname is still available **in Infoblox**. """Check whether a hostname is still available **in Infoblox**.
Check whether Infoblox already contains a :class:`infoblox_client.objects.HostRecord` that matches the given Check whether Infoblox already has a :class:`infoblox_client.objects.HostRecord` that matches the given hostname.
hostname.
.. warning:: .. warning::
This method only checks within the Infoblox instance, and not the rest of the internet. The hostname could This method only checks within the Infoblox instance, and not the rest of the internet. The hostname could
...@@ -260,7 +259,7 @@ def delete_host_by_fqdn(fqdn: str) -> None: ...@@ -260,7 +259,7 @@ def delete_host_by_fqdn(fqdn: str) -> None:
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. :class:`DeletionError` if no record can be found in Infoblox.
:param fqdn: The FQDN of the host record that should get deleted. :param fqdn: The :term:`FQDN` of the host record that should get deleted.
:type fqdn: str :type fqdn: str
""" """
host = find_host_by_fqdn(fqdn) host = find_host_by_fqdn(fqdn)
......
...@@ -70,9 +70,8 @@ class NetBoxClient: ...@@ -70,9 +70,8 @@ class NetBoxClient:
def create_interface(self, iface_name: str, type: str, speed: str, device_name: str) -> Interfaces: def create_interface(self, iface_name: str, type: str, speed: str, device_name: str) -> Interfaces:
"""Create new interface on a device, where device is defined by name. """Create new interface on a device, where device is defined by name.
The type parameter can be 1000base-t, 10gbase-t, lag... The type parameter can be 1000base-t, 10gbase-t, lag, etc.
For more details on type definition have a look in For more details on type definition have a look in choices.py in the netbox API implementation in module DCIM.
choices.py in the netbox API implementation in module DCIM.
Returns the new interface object as dict. Returns the new interface object as dict.
""" """
device = self.get_device_by_name(device_name) device = self.get_device_by_name(device_name)
......
...@@ -285,19 +285,6 @@ def deploy_new_isis( ...@@ -285,19 +285,6 @@ def deploy_new_isis(
} }
# Leaving it like this as a placeholder
# @step("Check ISIS metric")
# def check_isis(subscription: Iptrunk, process_id: UUIDstr) -> State:
# provisioning_proxy.check_ip_trunk(subscription, process_id, "VERB NEEDS TO BE UPDATED")
#
# logger.warning("Playbook verb is not yet properly set.")
#
# return {
# "subscription": subscription,
# "label_text": "Checking ISIS functionality, please refresh to get the results of the playbook.",
# }
@inputstep("Wait for confirmation", assignee=Assignee.SYSTEM) @inputstep("Wait for confirmation", assignee=Assignee.SYSTEM)
def confirm_continue_restore_isis() -> FormGenerator: def confirm_continue_restore_isis() -> FormGenerator:
class ProvisioningResultPage(FormPage): class ProvisioningResultPage(FormPage):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment