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

Update Vale linting and documentation to be more in line with the general GAP documentation

parent 77b0c738
No related branches found
No related tags found
1 merge request!65Feature/add infoblox service
Pipeline #84026 passed
...@@ -14,6 +14,7 @@ oss-params.json ...@@ -14,6 +14,7 @@ oss-params.json
docs/build docs/build
docs/vale/styles/* docs/vale/styles/*
!docs/vale/styles/Vocab/ !docs/vale/styles/Vocab/
!docs/vale/styles/custom/
.idea .idea
.venv .venv
...@@ -5,6 +5,9 @@ BGP ...@@ -5,6 +5,9 @@ BGP
: Border Gateway Protocol: a path vector routing protocol described in : Border Gateway Protocol: a path vector routing protocol described in
<a href="https://datatracker.ietf.org/doc/html/rfc4271" target="_blank">RFC 4271</a>. <a href="https://datatracker.ietf.org/doc/html/rfc4271" target="_blank">RFC 4271</a>.
CNAME
: A type of DNS record that is used as an alias from one hostname to another
CRUD CRUD
: Create, Read, Update, Delete : Create, Read, Update, Delete
......
...@@ -20,13 +20,16 @@ proselint.Annotations = NO ...@@ -20,13 +20,16 @@ proselint.Annotations = NO
; Replacing a ... with … shouldn't be holding back the entire CI pipeline ; Replacing a ... with … shouldn't be holding back the entire CI pipeline
proselint.Typography = warning proselint.Typography = warning
; Same applies for not using contractions ; Same applies for not using contractions
Microsoft.Contractions = warning Microsoft.Contractions = NO
custom.Contractions = YES
TokenIgnores = ({term}), (:param \S+:), (:type \S+:) TokenIgnores = ({term}), (:param \S+:), (:type \S+:)
[*/glossary.md] [*/glossary.md]
; 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
custom.Contractions = YES
Microsoft.Passive = NO Microsoft.Passive = NO
[formats] [formats]
......
...@@ -10,3 +10,4 @@ dry_run ...@@ -10,3 +10,4 @@ dry_run
Dark_fiber Dark_fiber
[A|a]ddress [A|a]ddress
[I|i]ptrunk [I|i]ptrunk
[A|a]llocate
extends: substitution
message: "Use '%s' instead of '%s'."
level: suggestion
ignorecase: true
swap:
aren't: are not
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
how's: how is
isn't: is not
it's: it is
shouldn't: should not
that's: that is
they're: they are
wasn't: was not
we're: we are
we've: we have
weren't: were not
what's: what is
when's: when is
where's: where is
won't: will not
...@@ -20,7 +20,7 @@ class DeletionError(Exception): ...@@ -20,7 +20,7 @@ class DeletionError(Exception):
def _setup_connection() -> tuple[connector.Connector, IPAMParams]: def _setup_connection() -> tuple[connector.Connector, IPAMParams]:
"""Set up a new connection with an Infoblox instance. """Set up a new connection with an Infoblox instance.
:return: A tuple that contains an Infoblox `Connector` instance, and :return: A tuple that has an Infoblox `Connector` instance, and {term}`IPAM` parameters.
:rtype: tuple[{class}`infoblox_client.connector.Connector`, IPAMParams] :rtype: tuple[{class}`infoblox_client.connector.Connector`, IPAMParams]
""" """
oss = load_oss_params().IPAM oss = load_oss_params().IPAM
...@@ -52,7 +52,8 @@ def _allocate_network( ...@@ -52,7 +52,8 @@ def _allocate_network(
:type dns_view: str :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. :param netmask: The netmask of the desired network. Can be up to 32 for v4 networks, and 128 for v6 networks.
:type netmask: int :type netmask: int
:param containers: A list of network containers in which the network should be allocated, given in CIDR notation. :param containers: A list of network containers in which the network should be allocated, given in {term}`CIDR`
notation.
:type containers: list[str] :type containers: list[str]
:param comment: Optionally, a comment can be added to the network allocation. :param comment: Optionally, a comment can be added to the network allocation.
:type comment: str, optional :type comment: str, optional
...@@ -85,8 +86,8 @@ def hostname_available(hostname: str) -> bool: ...@@ -85,8 +86,8 @@ def hostname_available(hostname: str) -> bool:
def allocate_v4_network(service_type: str, comment: str | None = "") -> ipaddress.IPv4Network: def allocate_v4_network(service_type: str, comment: str | None = "") -> ipaddress.IPv4Network:
"""Allocate a new IPv4 network in Infoblox. """Allocate a new IPv4 network in Infoblox.
Allocate an IPv4 network for a specific service type. The service type should be defined in the OSS parameters of Allocate an IPv4 network for a specific service type. The service type should be defined in the {term}`OSS`
GSO, from which the containers and netmask will be used. 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. :param service_type: The service type for which the network is allocated.
:type service_type: str :type service_type: str
...@@ -104,8 +105,8 @@ def allocate_v4_network(service_type: str, comment: str | None = "") -> ipaddres ...@@ -104,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: def allocate_v6_network(service_type: str, comment: str | None = "") -> ipaddress.IPv6Network:
"""Allocate a new IPv6 network in Infoblox. """Allocate a new IPv6 network in Infoblox.
Allocate an IPv6 network for a specific service type. The service type should be defined in the OSS parameters of Allocate an IPv6 network for a specific service type. The service type should be defined in the {term}`OSS`
GSO, from which the containers and netmask will be used. 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. :param service_type: The service type for which the network is allocated.
:type service_type: str :type service_type: str
...@@ -123,8 +124,8 @@ def allocate_v6_network(service_type: str, comment: str | None = "") -> ipaddres ...@@ -123,8 +124,8 @@ def allocate_v6_network(service_type: str, comment: str | None = "") -> ipaddres
def delete_network(ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network) -> None: def delete_network(ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network) -> None:
"""Delete a network in Infoblox. """Delete a network in Infoblox.
Delete a network that is allocated in Infoblox, by passing the CIDR to be deleted. The CIDR must exactly match an Delete a network that is allocated in Infoblox, by passing the {term}`CIDR` to be deleted. The {term}`CIDR` must
existing entry in Infoblox, otherwise this method raises a {class}`DeletionError` exactly match an existing entry in Infoblox, otherwise this method raises a {class}`DeletionError`
:param ip_network: The network that should get deleted. :param ip_network: The network that should get deleted.
:type ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network :type ip_network: ipaddress.IPv4Network | ipaddress.IPv6Network
...@@ -146,12 +147,12 @@ def allocate_host( ...@@ -146,12 +147,12 @@ def allocate_host(
host. Most likely to be a loopback interface. If the hostname is not available in Infoblox (due to a potential 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`. collision) this method raises an {class}`AllocationError`.
:param hostname: The FQDN of the new host :param hostname: The {term}`FQDN` of the new host
:type hostname: str :type hostname: str
:param service_type: The service type from which IP resources should be used. :param service_type: The service type from which IP resources should be used.
:type service_type: str :type service_type: str
:param cname_aliases: A list of any CNAME aliases that should be associated with this host. Most often this will :param cname_aliases: A list of any {term}`CNAME` aliases that should be associated with this host. Most often this
be a single loopback address. will be a single loopback address.
:type cname_aliases: list[str] :type cname_aliases: list[str]
:param comment: Optionally, a comment can be added to the host record in Infoblox. :param comment: Optionally, a comment can be added to the host record in Infoblox.
:type comment: str, optional :type comment: str, optional
...@@ -218,7 +219,7 @@ def delete_host_by_ip(ip_addr: ipaddress.IPv4Address | ipaddress.IPv6Address) -> ...@@ -218,7 +219,7 @@ def delete_host_by_ip(ip_addr: ipaddress.IPv4Address | ipaddress.IPv6Address) ->
def delete_host_by_fqdn(fqdn: str) -> None: def delete_host_by_fqdn(fqdn: str) -> None:
"""Delete a host from Infoblox. """Delete a host from Infoblox.
Delete a host record in Infoblox, by providing the 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 FQDN of the host record that should get deleted.
......
...@@ -29,7 +29,7 @@ DEFAULT_LABEL = "Provisioning proxy is running. Please come back later for the r ...@@ -29,7 +29,7 @@ DEFAULT_LABEL = "Provisioning proxy is running. Please come back later for the r
class CUDOperation(strEnum): 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 isn't applicable, hence the missing R. Read is not applicable, hence the missing R.
""" """
POST = "POST" POST = "POST"
...@@ -173,7 +173,7 @@ def migrate_ip_trunk( ...@@ -173,7 +173,7 @@ def migrate_ip_trunk(
:type new_node: {class}`Router` :type new_node: {class}`Router`
:param new_lag_interface: The name of the new aggregated Ethernet interface :param new_lag_interface: The name of the new aggregated Ethernet interface
:type new_lag_interface: str :type new_lag_interface: str
:param new_lag_member_interfaces: The new list of interfaces that are part of the 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] :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, :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`. can be `0` or `1`.
...@@ -213,7 +213,7 @@ def _await_pp_results(subscription: SubscriptionModel, label_text: str = DEFAULT ...@@ -213,7 +213,7 @@ def _await_pp_results(subscription: SubscriptionModel, label_text: str = DEFAULT
:param subscription: The current subscription that the provisioning proxy is acting on. :param subscription: The current subscription that the provisioning proxy is acting on.
:type subscription: {class}`orchestrator.domain.SubscriptionModel` :type subscription: {class}`orchestrator.domain.SubscriptionModel`
:param label_text: A label that's displayed to the operator when the provisioning proxy hasn't returned its :param label_text: A label that's displayed to the operator when the provisioning proxy has not returned its
results yet. Defaults to `DEFAULT_LABEL`. results yet. Defaults to `DEFAULT_LABEL`.
:type label_text: str :type label_text: str
:return: The input that's given by the provisioning proxy, that should contain run results, and a `confirm` :return: The input that's given by the provisioning proxy, that should contain run results, and a `confirm`
......
...@@ -69,7 +69,7 @@ def get_active_router_subscriptions(fields: list[str]) -> list[Subscription]: ...@@ -69,7 +69,7 @@ def get_active_router_subscriptions(fields: list[str]) -> list[Subscription]:
def get_product_id_by_name(product_name: ProductType) -> UUID: def get_product_id_by_name(product_name: ProductType) -> UUID:
"""Retrieve the UUID of a product by its name. """Retrieve the {term}`UUID` of a product by its name.
Args: Args:
---- ----
...@@ -77,7 +77,7 @@ def get_product_id_by_name(product_name: ProductType) -> UUID: ...@@ -77,7 +77,7 @@ def get_product_id_by_name(product_name: ProductType) -> UUID:
Returns: Returns:
------- -------
UUID: The UUID of the product. {term}`UUID`: The {term}`UUID` of the product.
""" """
return ProductTable.query.filter_by(name=product_name).first().product_id return ProductTable.query.filter_by(name=product_name).first().product_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment