summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorGaige B Paulsen <gaige@cluetrust.com>2024-11-25 16:08:54 -0500
committerGitHub <noreply@github.com>2024-11-25 16:08:54 -0500
commitbf38875af0a7e5166ce0330f16441b7d8b434e6a (patch)
treea01b371d37ae88136eec0d50868da6aebcea1414 /plugins/module_utils
parent04c837af1cf89ff42adc42062df48a0dd209a0e1 (diff)
downloadvyos.vyos-bf38875af0a7e5166ce0330f16441b7d8b434e6a.tar.gz
vyos.vyos-bf38875af0a7e5166ce0330f16441b7d8b434e6a.zip
T6910: fix documentation and argspecs are out of alignment (#358)
chore: update firewall_rules from module fix: update firewall_global from resource model chore: update to sync with resource module chore: update README fix: comment and formatting fix: formatting issues fix: missing imports fix: import and metadata violations fix: interface fixes fix: move the arg spec comment fix: update interface docs fix: remove comments for non-RM versions * T6910: fix documentation and argspecs * T6910: docs: update per review * T6910: docs: fix missing pipe
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/argspec/bgp_address_family/bgp_address_family.py230
-rw-r--r--plugins/module_utils/network/vyos/argspec/bgp_global/bgp_global.py317
-rw-r--r--plugins/module_utils/network/vyos/argspec/firewall_global/firewall_global.py63
-rw-r--r--plugins/module_utils/network/vyos/argspec/firewall_rules/firewall_rules.py94
-rw-r--r--plugins/module_utils/network/vyos/argspec/hostname/hostname.py2
-rw-r--r--plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py33
-rw-r--r--plugins/module_utils/network/vyos/argspec/l3_interfaces/l3_interfaces.py1
-rw-r--r--plugins/module_utils/network/vyos/argspec/lag_interfaces/lag_interfaces.py19
-rw-r--r--plugins/module_utils/network/vyos/argspec/lldp_global/lldp_global.py15
-rw-r--r--plugins/module_utils/network/vyos/argspec/lldp_interfaces/lldp_interfaces.py29
-rw-r--r--plugins/module_utils/network/vyos/argspec/logging_global/logging_global.py2
-rw-r--r--plugins/module_utils/network/vyos/argspec/ntp_global/ntp_global.py6
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospf_interfaces/ospf_interfaces.py74
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py174
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py11
-rw-r--r--plugins/module_utils/network/vyos/argspec/prefix_lists/prefix_lists.py2
-rw-r--r--plugins/module_utils/network/vyos/argspec/route_maps/route_maps.py20
-rw-r--r--plugins/module_utils/network/vyos/argspec/snmp_server/snmp_server.py12
-rw-r--r--plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py11
19 files changed, 603 insertions, 512 deletions
diff --git a/plugins/module_utils/network/vyos/argspec/bgp_address_family/bgp_address_family.py b/plugins/module_utils/network/vyos/argspec/bgp_address_family/bgp_address_family.py
index 9868fc6b..13f9fab0 100644
--- a/plugins/module_utils/network/vyos/argspec/bgp_address_family/bgp_address_family.py
+++ b/plugins/module_utils/network/vyos/argspec/bgp_address_family/bgp_address_family.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -12,17 +12,14 @@ __metaclass__ = type
# WARNING #
#############################################
#
-# This file is auto generated by the resource
-# module builder playbook.
+# This file is auto generated by the
+# cli_rm_builder.
#
-# Do not edit this file manually.
+# Manually editing this file is not advised.
#
-# Changes to this file will be over written
-# by the resource module builder.
-#
-# Changes should be made in the model used to
-# generate this file or in the resource module
-# builder template.
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
#
#############################################
@@ -34,56 +31,95 @@ The arg spec for the vyos_bgp_address_family module
class Bgp_address_familyArgs(object): # pylint: disable=R0903
"""The arg spec for the vyos_bgp_address_family module"""
- def __init__(self, **kwargs):
- pass
-
argument_spec = {
- "running_config": {},
- "state": {
- "default": "merged",
- "type": "str",
- "choices": [
- "merged",
- "replaced",
- "deleted",
- "gathered",
- "parsed",
- "rendered",
- "purged",
- "overridden",
- ],
- },
"config": {
"type": "dict",
"options": {
- "neighbors": {
+ "as_number": {"type": "int"},
+ "address_family": {
+ "type": "list",
"elements": "dict",
+ "options": {
+ "afi": {"type": "str", "choices": ["ipv4", "ipv6"]},
+ "aggregate_address": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "prefix": {"type": "str"},
+ "as_set": {"type": "bool"},
+ "summary_only": {"type": "bool"},
+ },
+ },
+ "networks": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "prefix": {"type": "str"},
+ "path_limit": {"type": "int"},
+ "backdoor": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "redistribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "protocol": {
+ "type": "str",
+ "choices": [
+ "connected",
+ "kernel",
+ "ospf",
+ "ospfv3",
+ "rip",
+ "ripng",
+ "static",
+ ],
+ },
+ "table": {"type": "str"},
+ "route_map": {"type": "str"},
+ "metric": {"type": "int"},
+ },
+ },
+ },
+ },
+ "neighbors": {
"type": "list",
+ "elements": "dict",
"options": {
+ "neighbor_address": {"type": "str"},
"address_family": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
- "nexthop_local": {"type": "bool"},
- "soft_reconfiguration": {"type": "bool"},
- "unsupress_map": {"type": "str"},
- "nexthop_self": {"type": "bool"},
- "weight": {"type": "int"},
- "prefix_list": {
- "elements": "dict",
- "type": "list",
+ "afi": {
+ "type": "str",
+ "choices": ["ipv4", "ipv6"],
+ },
+ "allowas_in": {"type": "int"},
+ "as_override": {"type": "bool"},
+ "attribute_unchanged": {
+ "type": "dict",
"options": {
- "action": {
+ "as_path": {"type": "bool"},
+ "med": {"type": "bool"},
+ "next_hop": {"type": "bool"},
+ },
+ },
+ "capability": {
+ "type": "dict",
+ "options": {
+ "dynamic": {"type": "bool"},
+ "orf": {
"type": "str",
- "choices": ["export", "import"],
+ "choices": ["send", "receive"],
},
- "prefix_list": {"type": "str"},
},
},
"default_originate": {"type": "str"},
"distribute_list": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
@@ -92,10 +128,9 @@ class Bgp_address_familyArgs(object): # pylint: disable=R0903
"acl": {"type": "int"},
},
},
- "allowas_in": {"type": "int"},
"filter_list": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
@@ -104,98 +139,57 @@ class Bgp_address_familyArgs(object): # pylint: disable=R0903
"path_list": {"type": "str"},
},
},
- "route_server_client": {"type": "bool"},
- "attribute_unchanged": {
- "type": "dict",
- "options": {
- "as_path": {"type": "bool"},
- "med": {"type": "bool"},
- "next_hop": {"type": "bool"},
- },
- },
- "peer_group": {"type": "str"},
"maximum_prefix": {"type": "int"},
- "route_reflector_client": {"type": "bool"},
- "route_map": {
- "elements": "dict",
+ "nexthop_local": {"type": "bool"},
+ "nexthop_self": {"type": "bool"},
+ "peer_group": {"type": "str"},
+ "prefix_list": {
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
"choices": ["export", "import"],
},
- "route_map": {"type": "str"},
+ "prefix_list": {"type": "str"},
},
},
- "capability": {
- "type": "dict",
+ "remove_private_as": {"type": "bool"},
+ "route_map": {
+ "type": "list",
+ "elements": "dict",
"options": {
- "orf": {
+ "action": {
"type": "str",
- "choices": ["send", "receive"],
+ "choices": ["export", "import"],
},
- "dynamic": {"type": "bool"},
+ "route_map": {"type": "str"},
},
},
- "remove_private_as": {"type": "bool"},
- "as_override": {"type": "bool"},
- "afi": {
- "type": "str",
- "choices": ["ipv4", "ipv6"],
- },
- },
- },
- "neighbor_address": {"type": "str"},
- },
- },
- "as_number": {"type": "int"},
- "address_family": {
- "elements": "dict",
- "type": "list",
- "options": {
- "afi": {"type": "str", "choices": ["ipv4", "ipv6"]},
- "redistribute": {
- "elements": "dict",
- "type": "list",
- "options": {
- "table": {"type": "str"},
- "metric": {"type": "int"},
- "protocol": {
- "type": "str",
- "choices": [
- "connected",
- "kernel",
- "ospf",
- "ospfv3",
- "rip",
- "ripng",
- "static",
- ],
- },
- "route_map": {"type": "str"},
- },
- },
- "networks": {
- "elements": "dict",
- "type": "list",
- "options": {
- "backdoor": {"type": "bool"},
- "prefix": {"type": "str"},
- "path_limit": {"type": "int"},
- "route_map": {"type": "str"},
- },
- },
- "aggregate_address": {
- "elements": "dict",
- "type": "list",
- "options": {
- "summary_only": {"type": "bool"},
- "prefix": {"type": "str"},
- "as_set": {"type": "bool"},
+ "route_reflector_client": {"type": "bool"},
+ "route_server_client": {"type": "bool"},
+ "soft_reconfiguration": {"type": "bool"},
+ "unsupress_map": {"type": "str"},
+ "weight": {"type": "int"},
},
},
},
},
},
},
+ "running_config": {"type": "str"},
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ "purged",
+ "overridden",
+ ],
+ "default": "merged",
+ },
} # pylint: disable=C0301
diff --git a/plugins/module_utils/network/vyos/argspec/bgp_global/bgp_global.py b/plugins/module_utils/network/vyos/argspec/bgp_global/bgp_global.py
index 22af6394..b647ea91 100644
--- a/plugins/module_utils/network/vyos/argspec/bgp_global/bgp_global.py
+++ b/plugins/module_utils/network/vyos/argspec/bgp_global/bgp_global.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -12,17 +12,14 @@ __metaclass__ = type
# WARNING #
#############################################
#
-# This file is auto generated by the resource
-# module builder playbook.
+# This file is auto generated by the
+# cli_rm_builder.
#
-# Do not edit this file manually.
+# Manually editing this file is not advised.
#
-# Changes to this file will be over written
-# by the resource module builder.
-#
-# Changes should be made in the model used to
-# generate this file or in the resource module
-# builder template.
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
#
#############################################
@@ -34,109 +31,62 @@ The arg spec for the vyos_bgp_global module
class Bgp_globalArgs(object): # pylint: disable=R0903
"""The arg spec for the vyos_bgp_global module"""
- def __init__(self, **kwargs):
- pass
-
argument_spec = {
- "running_config": {"type": "str"},
- "state": {
- "default": "merged",
- "type": "str",
- "choices": [
- "merged",
- "replaced",
- "deleted",
- "gathered",
- "parsed",
- "rendered",
- "purged",
- ],
- },
"config": {
"type": "dict",
"options": {
- "redistribute": {
- "elements": "dict",
+ "as_number": {"type": "int"},
+ "aggregate_address": {
"type": "list",
- "options": {
- "route_map": {"type": "str"},
- "metric": {"type": "int"},
- "protocol": {
- "type": "str",
- "choices": [
- "connected",
- "kernel",
- "ospf",
- "rip",
- "static",
- ],
- },
- },
- },
- "network": {
"elements": "dict",
- "type": "list",
"options": {
- "backdoor": {"type": "bool"},
- "route_map": {"type": "str"},
- "address": {"type": "str"},
+ "prefix": {"type": "str"},
+ "as_set": {"type": "bool"},
+ "summary_only": {"type": "bool"},
},
},
"maximum_paths": {
"type": "list",
"elements": "dict",
- "options": {
- "path": {"type": "str"},
- "count": {"type": "int"},
- },
- },
- "aggregate_address": {
- "elements": "dict",
- "type": "list",
- "options": {
- "summary_only": {"type": "bool"},
- "as_set": {"type": "bool"},
- "prefix": {"type": "str"},
- },
- },
- "timers": {
- "type": "dict",
- "options": {
- "holdtime": {"type": "int"},
- "keepalive": {"type": "int"},
- },
+ "options": {"path": {"type": "str"}, "count": {"type": "int"}},
},
"neighbor": {
"type": "list",
"elements": "dict",
"options": {
- "shutdown": {"type": "bool"},
- "weight": {"type": "int"},
- "default_originate": {"type": "str"},
- "peer_group_name": {"type": "str"},
- "route_reflector_client": {"type": "bool"},
- "strict_capability_match": {"type": "bool"},
- "remove_private_as": {"type": "bool"},
+ "address": {"type": "str"},
+ "advertisement_interval": {"type": "int"},
+ "allowas_in": {"type": "int"},
"as_override": {"type": "bool"},
- "port": {"type": "int"},
- "soft_reconfiguration": {"type": "bool"},
- "nexthop_self": {"type": "bool"},
- "remote_as": {"type": "int"},
- "ebgp_multihop": {"type": "int"},
- "route_map": {
- "elements": "dict",
- "type": "list",
+ "attribute_unchanged": {
+ "type": "dict",
"options": {
- "action": {
+ "as_path": {"type": "bool"},
+ "med": {"type": "bool"},
+ "next_hop": {"type": "bool"},
+ },
+ },
+ "capability": {
+ "type": "dict",
+ "options": {
+ "dynamic": {"type": "bool"},
+ "orf": {
"type": "str",
- "choices": ["export", "import"],
+ "choices": ["send", "receive"],
},
- "route_map": {"type": "str"},
},
},
+ "default_originate": {"type": "str"},
+ "description": {"type": "str"},
+ "disable_capability_negotiation": {"type": "bool"},
+ "disable_connected_check": {"type": "bool"},
+ "disable_send_community": {
+ "type": "str",
+ "choices": ["extended", "standard"],
+ },
"distribute_list": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
@@ -145,124 +95,140 @@ class Bgp_globalArgs(object): # pylint: disable=R0903
"acl": {"type": "int"},
},
},
- "allowas_in": {"type": "int"},
- "passive": {"type": "bool"},
- "ttl_security": {"type": "int"},
- "peer_group": {"type": "bool"},
- "maximum_prefix": {"type": "int"},
- "prefix_list": {
- "elements": "dict",
+ "ebgp_multihop": {"type": "int"},
+ "filter_list": {
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
"choices": ["export", "import"],
},
- "prefix_list": {"type": "str"},
+ "path_list": {"type": "str"},
},
},
- "update_source": {"type": "str"},
- "description": {"type": "str"},
"local_as": {"type": "int"},
- "route_server_client": {"type": "bool"},
- "attribute_unchanged": {
- "type": "dict",
- "options": {
- "as_path": {"type": "bool"},
- "med": {"type": "bool"},
- "next_hop": {"type": "bool"},
- },
- },
- "disable_connected_check": {"type": "bool"},
- "address": {"type": "str"},
- "password": {"type": "str", "no_log": True},
- "disable_send_community": {
- "type": "str",
- "choices": ["extended", "standard"],
- },
- "unsuppress_map": {"type": "str"},
+ "maximum_prefix": {"type": "int"},
+ "nexthop_self": {"type": "bool"},
"override_capability": {"type": "bool"},
- "filter_list": {
- "elements": "dict",
+ "passive": {"type": "bool"},
+ "password": {"type": "str", "no_log": True},
+ "peer_group_name": {"type": "str"},
+ "peer_group": {"type": "bool"},
+ "port": {"type": "int"},
+ "prefix_list": {
"type": "list",
+ "elements": "dict",
"options": {
"action": {
"type": "str",
"choices": ["export", "import"],
},
- "path_list": {"type": "str"},
+ "prefix_list": {"type": "str"},
},
},
- "capability": {
- "type": "dict",
+ "remote_as": {"type": "int"},
+ "remove_private_as": {"type": "bool"},
+ "route_map": {
+ "type": "list",
+ "elements": "dict",
"options": {
- "orf": {
+ "action": {
"type": "str",
- "choices": ["send", "receive"],
+ "choices": ["export", "import"],
},
- "dynamic": {"type": "bool"},
+ "route_map": {"type": "str"},
},
},
+ "route_reflector_client": {"type": "bool"},
+ "route_server_client": {"type": "bool"},
+ "shutdown": {"type": "bool"},
+ "soft_reconfiguration": {"type": "bool"},
+ "strict_capability_match": {"type": "bool"},
+ "unsuppress_map": {"type": "str"},
+ "update_source": {"type": "str"},
+ "weight": {"type": "int"},
+ "ttl_security": {"type": "int"},
"timers": {
"type": "dict",
"options": {
- "holdtime": {"type": "int"},
"connect": {"type": "int"},
+ "holdtime": {"type": "int"},
"keepalive": {"type": "int"},
},
},
- "disable_capability_negotiation": {"type": "bool"},
- "advertisement_interval": {"type": "int"},
+ },
+ },
+ "network": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "address": {"type": "str"},
+ "backdoor": {"type": "bool"},
+ "route_map": {"type": "str"},
+ },
+ },
+ "redistribute": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "protocol": {
+ "type": "str",
+ "choices": [
+ "connected",
+ "kernel",
+ "ospf",
+ "rip",
+ "static",
+ ],
+ },
+ "route_map": {"type": "str"},
+ "metric": {"type": "int"},
+ },
+ },
+ "timers": {
+ "type": "dict",
+ "options": {
+ "keepalive": {"type": "int"},
+ "holdtime": {"type": "int"},
},
},
"bgp_params": {
"type": "dict",
"options": {
- "router_id": {"type": "str"},
- "distance": {
- "elements": "dict",
- "type": "list",
+ "always_compare_med": {"type": "bool"},
+ "bestpath": {
+ "type": "dict",
"options": {
- "prefix": {"type": "int"},
- "type": {
+ "as_path": {
"type": "str",
- "choices": [
- "external",
- "internal",
- "local",
- ],
+ "choices": ["confed", "ignore"],
},
- "value": {"type": "int"},
+ "compare_routerid": {"type": "bool"},
+ "med": {
+ "type": "str",
+ "choices": ["confed", "missing-as-worst"],
+ },
+ },
+ },
+ "cluster_id": {"type": "str"},
+ "confederation": {
+ "type": "list",
+ "elements": "dict",
+ "options": {
+ "identifier": {"type": "int"},
+ "peers": {"type": "int"},
},
},
"dampening": {
"type": "dict",
"options": {
"half_life": {"type": "int"},
- "start_suppress_time": {"type": "int"},
"max_suppress_time": {"type": "int"},
"re_use": {"type": "int"},
+ "start_suppress_time": {"type": "int"},
},
},
- "graceful_restart": {"type": "int"},
- "scan_time": {"type": "int"},
- "always_compare_med": {"type": "bool"},
- "no_fast_external_failover": {"type": "bool"},
- "bestpath": {
- "type": "dict",
- "options": {
- "med": {
- "type": "str",
- "choices": ["confed", "missing-as-worst"],
- },
- "as_path": {
- "type": "str",
- "choices": ["confed", "ignore"],
- },
- "compare_routerid": {"type": "bool"},
- },
- },
- "enforce_first_as": {"type": "bool"},
"default": {
"type": "dict",
"options": {
@@ -270,22 +236,43 @@ class Bgp_globalArgs(object): # pylint: disable=R0903
"no_ipv4_unicast": {"type": "bool"},
},
},
- "cluster_id": {"type": "str"},
- "no_client_to_client_reflection": {"type": "bool"},
"deterministic_med": {"type": "bool"},
- "log_neighbor_changes": {"type": "bool"},
"disable_network_import_check": {"type": "bool"},
- "confederation": {
+ "distance": {
"type": "list",
"elements": "dict",
"options": {
- "peers": {"type": "int"},
- "identifier": {"type": "int"},
+ "type": {
+ "type": "str",
+ "choices": ["external", "internal", "local"],
+ },
+ "value": {"type": "int"},
+ "prefix": {"type": "int"},
},
},
+ "enforce_first_as": {"type": "bool"},
+ "graceful_restart": {"type": "int"},
+ "log_neighbor_changes": {"type": "bool"},
+ "no_client_to_client_reflection": {"type": "bool"},
+ "no_fast_external_failover": {"type": "bool"},
+ "router_id": {"type": "str"},
+ "scan_time": {"type": "int"},
},
},
- "as_number": {"type": "int"},
},
},
+ "state": {
+ "type": "str",
+ "choices": [
+ "deleted",
+ "merged",
+ "purged",
+ "replaced",
+ "gathered",
+ "rendered",
+ "parsed",
+ ],
+ "default": "merged",
+ },
+ "running_config": {"type": "str"},
} # pylint: disable=C0301
diff --git a/plugins/module_utils/network/vyos/argspec/firewall_global/firewall_global.py b/plugins/module_utils/network/vyos/argspec/firewall_global/firewall_global.py
index f79454ed..8421b6de 100644
--- a/plugins/module_utils/network/vyos/argspec/firewall_global/firewall_global.py
+++ b/plugins/module_utils/network/vyos/argspec/firewall_global/firewall_global.py
@@ -25,6 +25,7 @@
The arg spec for the vyos_firewall_global module
"""
+
from __future__ import absolute_import, division, print_function
@@ -47,7 +48,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"afi": {
- "choices": ["ipv4", "ipv6"],
+ "choices": [
+ "ipv4",
+ "ipv6",
+ ],
"default": "ipv4",
"type": "str",
},
@@ -57,7 +61,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"options": {"address": {"type": "str"}},
"type": "list",
},
- "name": {"required": True, "type": "str"},
+ "name": {
+ "required": True,
+ "type": "str",
+ },
},
"type": "list",
},
@@ -65,7 +72,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"afi": {
- "choices": ["ipv4", "ipv6"],
+ "choices": [
+ "ipv4",
+ "ipv6",
+ ],
"default": "ipv4",
"type": "str",
},
@@ -75,7 +85,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"options": {"address": {"type": "str"}},
"type": "list",
},
- "name": {"required": True, "type": "str"},
+ "name": {
+ "required": True,
+ "type": "str",
+ },
},
"type": "list",
},
@@ -88,7 +101,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"options": {"port": {"type": "str"}},
"type": "list",
},
- "name": {"required": True, "type": "str"},
+ "name": {
+ "required": True,
+ "type": "str",
+ },
},
"type": "list",
},
@@ -107,7 +123,10 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"afi": {
- "choices": ["ipv4", "ipv6"],
+ "choices": [
+ "ipv4",
+ "ipv6",
+ ],
"required": True,
"type": "str",
},
@@ -126,24 +145,46 @@ class Firewall_globalArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"action": {
- "choices": ["accept", "drop", "reject"],
+ "choices": [
+ "accept",
+ "drop",
+ "reject",
+ ],
"type": "str",
},
"connection_type": {
- "choices": ["established", "invalid", "related"],
+ "choices": [
+ "established",
+ "invalid",
+ "related",
+ ],
"type": "str",
},
"log": {"type": "bool"},
"log_level": {
- "choices": ["emerg", "alert", "crit", "err", "warn", "notice", "info", "debug"]
- }
+ "choices": [
+ "emerg",
+ "alert",
+ "crit",
+ "err",
+ "warn",
+ "notice",
+ "info",
+ "debug",
+ ],
+ "type": "str",
+ },
},
"type": "list",
},
"syn_cookies": {"type": "bool"},
"twa_hazards_protection": {"type": "bool"},
"validation": {
- "choices": ["strict", "loose", "disable"],
+ "choices": [
+ "strict",
+ "loose",
+ "disable",
+ ],
"type": "str",
},
},
diff --git a/plugins/module_utils/network/vyos/argspec/firewall_rules/firewall_rules.py b/plugins/module_utils/network/vyos/argspec/firewall_rules/firewall_rules.py
index 4d0973e3..74fa9c12 100644
--- a/plugins/module_utils/network/vyos/argspec/firewall_rules/firewall_rules.py
+++ b/plugins/module_utils/network/vyos/argspec/firewall_rules/firewall_rules.py
@@ -25,6 +25,7 @@
The arg spec for the vyos_firewall_rules module
"""
+
from __future__ import absolute_import, division, print_function
@@ -50,15 +51,24 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"default_action": {
- "choices": ["drop", "reject", "accept", "jump"],
+ "choices": [
+ "drop",
+ "reject",
+ "accept",
+ "jump",
+ ],
"type": "str",
},
"default_jump_target": {"type": "str"},
"description": {"type": "str"},
"enable_default_log": {"type": "bool"},
"filter": {
- "choices": ["input", "output", "forward"],
- "type": "str"
+ "choices": [
+ "input",
+ "output",
+ "forward",
+ ],
+ "type": "str",
},
"name": {"type": "str"},
"rules": {
@@ -95,8 +105,8 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"type": "dict",
},
"disable": {
- "type": "bool",
"aliases": ["disabled"],
+ "type": "bool",
},
"fragment": {
"choices": [
@@ -159,22 +169,23 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
},
"inbound_interface": {
"options": {
- "group": {
- "type": "str",
- },
- "name": {
- "type": "str",
- },
+ "group": {"type": "str"},
+ "name": {"type": "str"},
},
"type": "dict",
},
"ipsec": {
- "choices": ["match-ipsec", "match-none", "match-ipsec-in", "match-ipsec-out", "match-none-in", "match-none-out"],
- "type": "str"
- },
- "jump_target": {
- "type": "str"
+ "choices": [
+ "match-ipsec",
+ "match-none",
+ "match-ipsec-in",
+ "match-ipsec-out",
+ "match-none-in",
+ "match-none-out",
+ ],
+ "type": "str",
},
+ "jump_target": {"type": "str"},
"limit": {
"options": {
"burst": {"type": "int"},
@@ -189,18 +200,20 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"type": "dict",
},
"log": {
+ "choices": [
+ "disable",
+ "enable",
+ ],
"type": "str",
- "choices": ["enable", "disable"],
},
- "number": {"required": True, "type": "int"},
+ "number": {
+ "required": True,
+ "type": "int",
+ },
"outbound_interface": {
"options": {
- "group": {
- "type": "str",
- },
- "name": {
- "type": "str",
- },
+ "group": {"type": "str"},
+ "name": {"type": "str"},
},
"type": "dict",
},
@@ -220,24 +233,16 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"type": "str",
},
},
- "type": "list"
+ "type": "list",
},
"packet_length": {
"elements": "dict",
- "options": {
- "length": {
- "type": "str",
- },
- },
- "type": "list"
+ "options": {"length": {"type": "str"}},
+ "type": "list",
},
"packet_length_exclude": {
"elements": "dict",
- "options": {
- "length": {
- "type": "str",
- }
- },
+ "options": {"length": {"type": "str"}},
"type": "list",
},
"packet_type": {
@@ -245,15 +250,18 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"broadcast",
"multicast",
"host",
- "other"
+ "other",
],
- "type": "str"
+ "type": "str",
},
"protocol": {"type": "str"},
"queue": {"type": "str"},
"queue_options": {
- "choices": ["bypass", "fanout"],
- "type": "str"
+ "choices": [
+ "bypass",
+ "fanout",
+ ],
+ "type": "str",
},
"recent": {
"options": {
@@ -312,12 +320,12 @@ class Firewall_rulesArgs(object): # pylint: disable=R0903
"urg",
"all",
],
- "type": "str"
+ "type": "str",
},
- "invert": {"type": "bool"}
+ "invert": {"type": "bool"},
},
- "type": "list"
- }
+ "type": "list",
+ },
},
"type": "dict",
},
diff --git a/plugins/module_utils/network/vyos/argspec/hostname/hostname.py b/plugins/module_utils/network/vyos/argspec/hostname/hostname.py
index b69f2f10..12864e66 100644
--- a/plugins/module_utils/network/vyos/argspec/hostname/hostname.py
+++ b/plugins/module_utils/network/vyos/argspec/hostname/hostname.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2022 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
diff --git a/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py b/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
index fecfb48f..14b67c28 100644
--- a/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
@@ -1,3 +1,5 @@
+#
+# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -23,6 +25,7 @@
The arg spec for the vyos_interfaces module
"""
+
from __future__ import absolute_import, division, print_function
@@ -40,21 +43,39 @@ class InterfacesArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"description": {"type": "str"},
- "duplex": {"choices": ["full", "half", "auto"]},
- "enabled": {"default": True, "type": "bool"},
+ "duplex": {
+ "choices": ["full", "half", "auto"],
+ "type": "str",
+ },
+ "enabled": {
+ "aliases": ["enable"],
+ "default": True,
+ "type": "bool",
+ },
"mtu": {"type": "int"},
"name": {"required": True, "type": "str"},
"speed": {
- "choices": ["auto", "10", "100", "1000", "2500", "10000"],
+ "choices": [
+ "auto",
+ "10",
+ "100",
+ "1000",
+ "2500",
+ "10000",
+ ],
"type": "str",
},
"vifs": {
"elements": "dict",
"options": {
- "vlan_id": {"type": "int"},
"description": {"type": "str"},
- "enabled": {"default": True, "type": "bool"},
+ "enabled": {
+ "aliases": ["enable"],
+ "default": True,
+ "type": "bool",
+ },
"mtu": {"type": "int"},
+ "vlan_id": {"type": "int"},
},
"type": "list",
},
@@ -69,8 +90,8 @@ class InterfacesArgs(object): # pylint: disable=R0903
"overridden",
"deleted",
"rendered",
- "parsed",
"gathered",
+ "parsed",
],
"default": "merged",
"type": "str",
diff --git a/plugins/module_utils/network/vyos/argspec/l3_interfaces/l3_interfaces.py b/plugins/module_utils/network/vyos/argspec/l3_interfaces/l3_interfaces.py
index db333767..4dee518e 100644
--- a/plugins/module_utils/network/vyos/argspec/l3_interfaces/l3_interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/l3_interfaces/l3_interfaces.py
@@ -25,6 +25,7 @@
The arg spec for the vyos_l3_interfaces module
"""
+
from __future__ import absolute_import, division, print_function
diff --git a/plugins/module_utils/network/vyos/argspec/lag_interfaces/lag_interfaces.py b/plugins/module_utils/network/vyos/argspec/lag_interfaces/lag_interfaces.py
index dce4fb7b..956c4385 100644
--- a/plugins/module_utils/network/vyos/argspec/lag_interfaces/lag_interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/lag_interfaces/lag_interfaces.py
@@ -1,3 +1,5 @@
+#
+# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -22,6 +24,8 @@
"""
The arg spec for the vyos_lag_interfaces module
"""
+
+
from __future__ import absolute_import, division, print_function
@@ -41,12 +45,19 @@ class Lag_interfacesArgs(object): # pylint: disable=R0903
"arp_monitor": {
"options": {
"interval": {"type": "int"},
- "target": {"type": "list", "elements": "str"},
+ "target": {
+ "elements": "str",
+ "type": "list",
+ },
},
"type": "dict",
},
"hash_policy": {
- "choices": ["layer2", "layer2+3", "layer3+4"],
+ "choices": [
+ "layer2",
+ "layer2+3",
+ "layer3+4",
+ ],
"type": "str",
},
"members": {
@@ -78,9 +89,9 @@ class Lag_interfacesArgs(object): # pylint: disable=R0903
"replaced",
"overridden",
"deleted",
- "rendered",
- "gathered",
"parsed",
+ "gathered",
+ "rendered",
],
"default": "merged",
"type": "str",
diff --git a/plugins/module_utils/network/vyos/argspec/lldp_global/lldp_global.py b/plugins/module_utils/network/vyos/argspec/lldp_global/lldp_global.py
index 734274a1..5c33d674 100644
--- a/plugins/module_utils/network/vyos/argspec/lldp_global/lldp_global.py
+++ b/plugins/module_utils/network/vyos/argspec/lldp_global/lldp_global.py
@@ -1,3 +1,5 @@
+#
+# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -22,6 +24,8 @@
"""
The arg spec for the vyos_lldp_global module
"""
+
+
from __future__ import absolute_import, division, print_function
@@ -40,9 +44,14 @@ class Lldp_globalArgs(object): # pylint: disable=R0903
"address": {"type": "str"},
"enable": {"type": "bool"},
"legacy_protocols": {
- "choices": ["cdp", "edp", "fdp", "sonmp"],
- "type": "list",
+ "choices": [
+ "cdp",
+ "edp",
+ "fdp",
+ "sonmp",
+ ],
"elements": "str",
+ "type": "list",
},
"snmp": {"type": "str"},
},
@@ -54,9 +63,9 @@ class Lldp_globalArgs(object): # pylint: disable=R0903
"merged",
"replaced",
"deleted",
+ "gathered",
"rendered",
"parsed",
- "gathered",
],
"default": "merged",
"type": "str",
diff --git a/plugins/module_utils/network/vyos/argspec/lldp_interfaces/lldp_interfaces.py b/plugins/module_utils/network/vyos/argspec/lldp_interfaces/lldp_interfaces.py
index 672b7f0d..37a6afb0 100644
--- a/plugins/module_utils/network/vyos/argspec/lldp_interfaces/lldp_interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/lldp_interfaces/lldp_interfaces.py
@@ -25,6 +25,7 @@
The arg spec for the vyos_lldp_interfaces module
"""
+
from __future__ import absolute_import, division, print_function
@@ -49,8 +50,14 @@ class Lldp_interfacesArgs(object): # pylint: disable=R0903
"ca_info": {
"elements": "dict",
"options": {
- "ca_type": {"type": "int"},
- "ca_value": {"type": "str"},
+ "ca_type": {
+ "required": True,
+ "type": "int",
+ },
+ "ca_value": {
+ "required": True,
+ "type": "str",
+ },
},
"type": "list",
},
@@ -65,11 +72,21 @@ class Lldp_interfacesArgs(object): # pylint: disable=R0903
"options": {
"altitude": {"type": "int"},
"datum": {
- "choices": ["WGS84", "NAD83", "MLLW"],
+ "choices": [
+ "WGS84",
+ "NAD83",
+ "MLLW",
+ ],
+ "type": "str",
+ },
+ "latitude": {
+ "required": True,
+ "type": "str",
+ },
+ "longitude": {
+ "required": True,
"type": "str",
},
- "latitude": {"required": True, "type": "str"},
- "longitude": {"required": True, "type": "str"},
},
"type": "dict",
},
@@ -89,8 +106,8 @@ class Lldp_interfacesArgs(object): # pylint: disable=R0903
"overridden",
"deleted",
"rendered",
- "gathered",
"parsed",
+ "gathered",
],
"default": "merged",
"type": "str",
diff --git a/plugins/module_utils/network/vyos/argspec/logging_global/logging_global.py b/plugins/module_utils/network/vyos/argspec/logging_global/logging_global.py
index 93b29f4a..0be49e51 100644
--- a/plugins/module_utils/network/vyos/argspec/logging_global/logging_global.py
+++ b/plugins/module_utils/network/vyos/argspec/logging_global/logging_global.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
diff --git a/plugins/module_utils/network/vyos/argspec/ntp_global/ntp_global.py b/plugins/module_utils/network/vyos/argspec/ntp_global/ntp_global.py
index fca9bf1e..cbbfd22e 100644
--- a/plugins/module_utils/network/vyos/argspec/ntp_global/ntp_global.py
+++ b/plugins/module_utils/network/vyos/argspec/ntp_global/ntp_global.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -24,12 +24,12 @@ __metaclass__ = type
#############################################
"""
-The arg spec for the vyos_ntp module
+The arg spec for the vyos_ntp_global module
"""
class Ntp_globalArgs(object): # pylint: disable=R0903
- """The arg spec for the vyos_ntp module"""
+ """The arg spec for the vyos_ntp_global module"""
argument_spec = {
"config": {
diff --git a/plugins/module_utils/network/vyos/argspec/ospf_interfaces/ospf_interfaces.py b/plugins/module_utils/network/vyos/argspec/ospf_interfaces/ospf_interfaces.py
index 1fd33700..0b5814be 100644
--- a/plugins/module_utils/network/vyos/argspec/ospf_interfaces/ospf_interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/ospf_interfaces/ospf_interfaces.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2020 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -12,17 +12,14 @@ __metaclass__ = type
# WARNING #
#############################################
#
-# This file is auto generated by the resource
-# module builder playbook.
+# This file is auto generated by the
+# cli_rm_builder.
#
-# Do not edit this file manually.
+# Manually editing this file is not advised.
#
-# Changes to this file will be over written
-# by the resource module builder.
-#
-# Changes should be made in the model used to
-# generate this file or in the resource module
-# builder template.
+# To update the argspec make the desired changes
+# in the module docstring and re-run
+# cli_rm_builder.
#
#############################################
@@ -34,40 +31,20 @@ The arg spec for the vyos_ospf_interfaces module
class Ospf_interfacesArgs(object): # pylint: disable=R0903
"""The arg spec for the vyos_ospf_interfaces module"""
- def __init__(self, **kwargs):
- pass
-
argument_spec = {
- "running_config": {},
- "state": {
- "default": "merged",
- "type": "str",
- "choices": [
- "merged",
- "replaced",
- "overridden",
- "deleted",
- "gathered",
- "parsed",
- "rendered",
- ],
- },
"config": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
"name": {"type": "str"},
"address_family": {
- "elements": "dict",
"type": "list",
+ "elements": "dict",
"options": {
- "passive": {"type": "bool"},
- "retransmit_interval": {"type": "int"},
- "cost": {"type": "int"},
"afi": {
- "required": True,
"type": "str",
"choices": ["ipv4", "ipv6"],
+ "required": True,
},
"authentication": {
"type": "dict",
@@ -80,25 +57,40 @@ class Ospf_interfacesArgs(object): # pylint: disable=R0903
"type": "dict",
"no_log": False,
"options": {
- "key_id": {
- "type": "int",
- },
+ "key_id": {"type": "int"},
"key": {"type": "str", "no_log": True},
},
},
},
},
- "mtu_ignore": {"type": "bool"},
- "priority": {"type": "int"},
- "instance": {"type": "str"},
"bandwidth": {"type": "int"},
+ "cost": {"type": "int"},
"dead_interval": {"type": "int"},
- "ifmtu": {"type": "int"},
"hello_interval": {"type": "int"},
- "transmit_delay": {"type": "int"},
+ "mtu_ignore": {"type": "bool"},
"network": {"type": "str"},
+ "priority": {"type": "int"},
+ "retransmit_interval": {"type": "int"},
+ "transmit_delay": {"type": "int"},
+ "ifmtu": {"type": "int"},
+ "instance": {"type": "str"},
+ "passive": {"type": "bool"},
},
},
},
},
+ "running_config": {"type": "str"},
+ "state": {
+ "type": "str",
+ "choices": [
+ "merged",
+ "replaced",
+ "overridden",
+ "deleted",
+ "gathered",
+ "parsed",
+ "rendered",
+ ],
+ "default": "merged",
+ },
} # pylint: disable=C0301
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
index bd7f94d9..0a422e89 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
@@ -4,11 +4,6 @@
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-from __future__ import absolute_import, division, print_function
-
-
-__metaclass__ = type
-
#############################################
# WARNING #
#############################################
@@ -31,6 +26,12 @@ The arg spec for the vyos_ospfv2 module
"""
+from __future__ import absolute_import, division, print_function
+
+
+__metaclass__ = type
+
+
class Ospfv2Args(object): # pylint: disable=R0903
"""The arg spec for the vyos_ospfv2 module"""
@@ -40,72 +41,6 @@ class Ospfv2Args(object): # pylint: disable=R0903
argument_spec = {
"config": {
"options": {
- "auto_cost": {
- "options": {"reference_bandwidth": {"type": "int"}},
- "type": "dict",
- },
- "default_information": {
- "options": {
- "originate": {
- "options": {
- "always": {"type": "bool"},
- "metric": {"type": "int"},
- "metric_type": {"type": "int"},
- "route_map": {"type": "str"},
- },
- "type": "dict",
- },
- },
- "type": "dict",
- },
- "default_metric": {"type": "int"},
- "distance": {
- "options": {
- "global": {"type": "int"},
- "ospf": {
- "options": {
- "external": {"type": "int"},
- "inter_area": {"type": "int"},
- "intra_area": {"type": "int"},
- },
- "type": "dict",
- },
- },
- "type": "dict",
- },
- "log_adjacency_changes": {
- "choices": ["detail"],
- "type": "str",
- },
- "max_metric": {
- "options": {
- "router_lsa": {
- "options": {
- "administrative": {"type": "bool"},
- "on_shutdown": {"type": "int"},
- "on_startup": {"type": "int"},
- },
- "type": "dict",
- },
- },
- "type": "dict",
- },
- "mpls_te": {
- "options": {
- "enabled": {"type": "bool"},
- "router_address": {"type": "str"},
- },
- "type": "dict",
- },
- "neighbor": {
- "elements": "dict",
- "options": {
- "neighbor_id": {"type": "str"},
- "poll_interval": {"type": "int"},
- "priority": {"type": "int"},
- },
- "type": "list",
- },
"areas": {
"elements": "dict",
"options": {
@@ -141,12 +76,20 @@ class Ospfv2Args(object): # pylint: disable=R0903
"type": "dict",
},
"authentication": {
- "choices": ["plaintext-password", "md5"],
+ "choices": [
+ "plaintext-password",
+ "md5",
+ ],
"type": "str",
},
"network": {
"elements": "dict",
- "options": {"address": {"required": True, "type": "str"}},
+ "options": {
+ "address": {
+ "required": True,
+ "type": "str",
+ },
+ },
"type": "list",
},
"range": {
@@ -160,7 +103,11 @@ class Ospfv2Args(object): # pylint: disable=R0903
"type": "list",
},
"shortcut": {
- "choices": ["default", "disable", "enable"],
+ "choices": [
+ "default",
+ "disable",
+ "enable",
+ ],
"type": "str",
},
"virtual_link": {
@@ -174,15 +121,15 @@ class Ospfv2Args(object): # pylint: disable=R0903
"options": {
"key_id": {"type": "int"},
"md5_key": {
- "type": "str",
"no_log": True,
+ "type": "str",
},
},
"type": "list",
},
"plaintext_password": {
- "type": "str",
"no_log": True,
+ "type": "str",
},
},
"type": "dict",
@@ -197,6 +144,72 @@ class Ospfv2Args(object): # pylint: disable=R0903
},
"type": "list",
},
+ "auto_cost": {
+ "options": {"reference_bandwidth": {"type": "int"}},
+ "type": "dict",
+ },
+ "default_information": {
+ "options": {
+ "originate": {
+ "options": {
+ "always": {"type": "bool"},
+ "metric": {"type": "int"},
+ "metric_type": {"type": "int"},
+ "route_map": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "default_metric": {"type": "int"},
+ "distance": {
+ "options": {
+ "global": {"type": "int"},
+ "ospf": {
+ "options": {
+ "external": {"type": "int"},
+ "inter_area": {"type": "int"},
+ "intra_area": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "log_adjacency_changes": {
+ "choices": ["detail"],
+ "type": "str",
+ },
+ "max_metric": {
+ "options": {
+ "router_lsa": {
+ "options": {
+ "administrative": {"type": "bool"},
+ "on_shutdown": {"type": "int"},
+ "on_startup": {"type": "int"},
+ },
+ "type": "dict",
+ },
+ },
+ "type": "dict",
+ },
+ "mpls_te": {
+ "options": {
+ "enabled": {"type": "bool"},
+ "router_address": {"type": "str"},
+ },
+ "type": "dict",
+ },
+ "neighbor": {
+ "elements": "dict",
+ "options": {
+ "neighbor_id": {"type": "str"},
+ "poll_interval": {"type": "int"},
+ "priority": {"type": "int"},
+ },
+ "type": "list",
+ },
"parameters": {
"options": {
"abr_type": {
@@ -214,10 +227,13 @@ class Ospfv2Args(object): # pylint: disable=R0903
},
"type": "dict",
},
- "passive_interface": {"type": "list", "elements": "str"},
- "passive_interface_exclude": {
+ "passive_interface": {
+ "elements": "str",
"type": "list",
+ },
+ "passive_interface_exclude": {
"elements": "str",
+ "type": "list",
},
"redistribute": {
"elements": "dict",
@@ -238,7 +254,7 @@ class Ospfv2Args(object): # pylint: disable=R0903
},
"type": "list",
},
- "route_map": {"type": "list", "elements": "str"},
+ "route_map": {"elements": "str", "type": "list"},
"timers": {
"options": {
"refresh": {
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
index 4ea88b6e..a59606dd 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
@@ -4,11 +4,6 @@
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-from __future__ import absolute_import, division, print_function
-
-
-__metaclass__ = type
-
#############################################
# WARNING #
#############################################
@@ -31,6 +26,12 @@ The arg spec for the vyos_ospfv3 module
"""
+from __future__ import absolute_import, division, print_function
+
+
+__metaclass__ = type
+
+
class Ospfv3Args(object): # pylint: disable=R0903
"""The arg spec for the vyos_ospfv3 module"""
diff --git a/plugins/module_utils/network/vyos/argspec/prefix_lists/prefix_lists.py b/plugins/module_utils/network/vyos/argspec/prefix_lists/prefix_lists.py
index d2741446..b01a3e82 100644
--- a/plugins/module_utils/network/vyos/argspec/prefix_lists/prefix_lists.py
+++ b/plugins/module_utils/network/vyos/argspec/prefix_lists/prefix_lists.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
diff --git a/plugins/module_utils/network/vyos/argspec/route_maps/route_maps.py b/plugins/module_utils/network/vyos/argspec/route_maps/route_maps.py
index b2038a48..196db0c7 100644
--- a/plugins/module_utils/network/vyos/argspec/route_maps/route_maps.py
+++ b/plugins/module_utils/network/vyos/argspec/route_maps/route_maps.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2021 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -31,9 +31,6 @@ The arg spec for the vyos_route_maps module
class Route_mapsArgs(object): # pylint: disable=R0903
"""The arg spec for the vyos_route_maps module"""
- def __init__(self, **kwargs):
- pass
-
argument_spec = {
"config": {
"type": "list",
@@ -48,10 +45,7 @@ class Route_mapsArgs(object): # pylint: disable=R0903
"sequence": {"type": "int"},
"call": {"type": "str"},
"description": {"type": "str"},
- "action": {
- "type": "str",
- "choices": ["deny", "permit"],
- },
+ "action": {"type": "str", "choices": ["deny", "permit"]},
"continue_sequence": {"type": "int"},
"set": {
"type": "dict",
@@ -184,7 +178,9 @@ class Route_mapsArgs(object): # pylint: disable=R0903
"next_hop": {"type": "str"},
},
},
- "large_community_large_community_list": {"type": "str"},
+ "large_community_large_community_list": {
+ "type": "str",
+ },
"metric": {"type": "int"},
"origin": {
"type": "str",
@@ -193,11 +189,7 @@ class Route_mapsArgs(object): # pylint: disable=R0903
"peer": {"type": "str"},
"rpki": {
"type": "str",
- "choices": [
- "notfound",
- "invalid",
- "valid",
- ],
+ "choices": ["notfound", "invalid", "valid"],
},
},
},
diff --git a/plugins/module_utils/network/vyos/argspec/snmp_server/snmp_server.py b/plugins/module_utils/network/vyos/argspec/snmp_server/snmp_server.py
index 7cea6887..7d0fefec 100644
--- a/plugins/module_utils/network/vyos/argspec/snmp_server/snmp_server.py
+++ b/plugins/module_utils/network/vyos/argspec/snmp_server/snmp_server.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2022 Red Hat
+# Copyright 2024 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@@ -78,10 +78,7 @@ class Snmp_serverArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"group": {"type": "str"},
- "mode": {
- "type": "str",
- "choices": ["ro", "rw"],
- },
+ "mode": {"type": "str", "choices": ["ro", "rw"]},
"seclevel": {
"type": "str",
"choices": ["auth", "priv"],
@@ -171,10 +168,7 @@ class Snmp_serverArgs(object): # pylint: disable=R0903
},
"engine_id": {"type": "str"},
"group": {"type": "str"},
- "mode": {
- "type": "str",
- "choices": ["ro", "rw"],
- },
+ "mode": {"type": "str", "choices": ["ro", "rw"]},
"privacy": {
"type": "dict",
"options": {
diff --git a/plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py b/plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py
index 916ad260..2849b8b7 100644
--- a/plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py
+++ b/plugins/module_utils/network/vyos/argspec/static_routes/static_routes.py
@@ -25,6 +25,7 @@
The arg spec for the vyos_static_routes module
"""
+
from __future__ import absolute_import, division, print_function
@@ -45,7 +46,10 @@ class Static_routesArgs(object): # pylint: disable=R0903
"elements": "dict",
"options": {
"afi": {
- "choices": ["ipv4", "ipv6"],
+ "choices": [
+ "ipv4",
+ "ipv6",
+ ],
"required": True,
"type": "str",
},
@@ -59,7 +63,10 @@ class Static_routesArgs(object): # pylint: disable=R0903
},
"type": "dict",
},
- "dest": {"required": True, "type": "str"},
+ "dest": {
+ "required": True,
+ "type": "str",
+ },
"next_hops": {
"elements": "dict",
"options": {