summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2020-06-08 16:03:27 -0400
committerGitHub <noreply@github.com>2020-06-08 20:03:27 +0000
commit61314778e0a605c50b4fc1d918193771492c52fb (patch)
tree2be70db4aa16ceb7e75be6e11dc09d4bc4b0e556
parent06235439435396c852535c2569542939bf65ef43 (diff)
downloadvyos-ansible-collection-61314778e0a605c50b4fc1d918193771492c52fb.tar.gz
vyos-ansible-collection-61314778e0a605c50b4fc1d918193771492c52fb.zip
Fixes needed for sanity (#40)
Fixes needed for sanity Reviewed-by: https://github.com/apps/ansible-zuul
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py4
-rw-r--r--plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py4
-rw-r--r--plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py13
-rw-r--r--plugins/modules/vyos_command.py2
-rw-r--r--plugins/modules/vyos_interface.py3
-rw-r--r--plugins/modules/vyos_l3_interface.py3
-rw-r--r--plugins/modules/vyos_linkagg.py3
-rw-r--r--plugins/modules/vyos_lldp_interface.py3
-rw-r--r--plugins/modules/vyos_static_route.py3
-rw-r--r--tests/sanity/ignore-2.10.txt83
-rw-r--r--tests/sanity/ignore-2.9.txt80
-rw-r--r--tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py2
-rw-r--r--tests/unit/modules/network/vyos/test_vyos_firewall_rules.py12
-rw-r--r--tests/unit/modules/network/vyos/test_vyos_ospfv2.py10
-rw-r--r--tests/unit/modules/network/vyos/test_vyos_ospfv3.py10
-rw-r--r--tox.ini2
16 files changed, 96 insertions, 141 deletions
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
index 275aaf3..b4cdadf 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv2/ospfv2.py
@@ -4,6 +4,10 @@
# 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 #
#############################################
diff --git a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
index 66aaa8c..25f979c 100644
--- a/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
+++ b/plugins/module_utils/network/vyos/argspec/ospfv3/ospfv3.py
@@ -4,6 +4,10 @@
# 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 #
#############################################
diff --git a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
index 3b99d34..eac8467 100644
--- a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
+++ b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
@@ -10,12 +10,7 @@ for a given resource, parsed, and the facts tree is populated
based on the configuration.
"""
-from __future__ import (
- absolute_import,
- division,
- print_function,
- unicode_literals,
-)
+from __future__ import absolute_import, division, print_function
__metaclass__ = type
@@ -26,8 +21,8 @@ from ansible_collections.ansible.netcommon.plugins.module_utils.network.common i
utils,
)
from ansible.module_utils.six import iteritems
-from ansible_collections.ansible.netcommon.plugins.module_utils.compat import (
- ipaddress,
+from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.utils.utils import (
+ get_ip_address_version,
)
from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.l3_interfaces.l3_interfaces import (
L3_interfacesArgs,
@@ -135,7 +130,7 @@ class L3_interfacesFacts(object):
elif item == "dhcpv6":
config["ipv6"].append({"address": item})
else:
- ip_version = ipaddress.ip_address(item.split("/")[0]).version
+ ip_version = get_ip_address_version(item.split("/")[0])
if ip_version == 4:
config["ipv4"].append({"address": item})
else:
diff --git a/plugins/modules/vyos_command.py b/plugins/modules/vyos_command.py
index 58e98c9..2871683 100644
--- a/plugins/modules/vyos_command.py
+++ b/plugins/modules/vyos_command.py
@@ -209,7 +209,7 @@ def main():
module.fail_json(msg=msg, failed_conditions=failed_conditions)
result.update(
- {"stdout": responses, "stdout_lines": list(to_lines(responses)),}
+ {"stdout": responses, "stdout_lines": list(to_lines(responses))}
)
module.exit_json(**result)
diff --git a/plugins/modules/vyos_interface.py b/plugins/modules/vyos_interface.py
index 11a1d49..fe4fce3 100644
--- a/plugins/modules/vyos_interface.py
+++ b/plugins/modules/vyos_interface.py
@@ -19,6 +19,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
DOCUMENTATION = """
module: vyos_interface
diff --git a/plugins/modules/vyos_l3_interface.py b/plugins/modules/vyos_l3_interface.py
index 3e43f7c..2feb824 100644
--- a/plugins/modules/vyos_l3_interface.py
+++ b/plugins/modules/vyos_l3_interface.py
@@ -19,6 +19,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
DOCUMENTATION = """
module: vyos_l3_interface
diff --git a/plugins/modules/vyos_linkagg.py b/plugins/modules/vyos_linkagg.py
index 0d939b2..a68197b 100644
--- a/plugins/modules/vyos_linkagg.py
+++ b/plugins/modules/vyos_linkagg.py
@@ -19,6 +19,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
DOCUMENTATION = """
module: vyos_linkagg
diff --git a/plugins/modules/vyos_lldp_interface.py b/plugins/modules/vyos_lldp_interface.py
index 80d4dbf..90e123d 100644
--- a/plugins/modules/vyos_lldp_interface.py
+++ b/plugins/modules/vyos_lldp_interface.py
@@ -19,6 +19,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
DOCUMENTATION = """
module: vyos_lldp_interface
diff --git a/plugins/modules/vyos_static_route.py b/plugins/modules/vyos_static_route.py
index 7859467..4724d5f 100644
--- a/plugins/modules/vyos_static_route.py
+++ b/plugins/modules/vyos_static_route.py
@@ -19,6 +19,9 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import absolute_import, division, print_function
+
+__metaclass__ = type
DOCUMENTATION = """
module: vyos_static_route
diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt
deleted file mode 100644
index a62f497..0000000
--- a/tests/sanity/ignore-2.10.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-plugins/module_utils/network/vyos/vyos.py future-import-boilerplate
-plugins/module_utils/network/vyos/vyos.py metaclass-boilerplate
-plugins/modules/vyos_banner.py future-import-boilerplate
-plugins/modules/vyos_banner.py metaclass-boilerplate
-plugins/modules/vyos_banner.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_banner.py validate-modules:doc-missing-type
-plugins/modules/vyos_banner.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_command.py future-import-boilerplate
-plugins/modules/vyos_command.py metaclass-boilerplate
-plugins/modules/vyos_command.py pylint:blacklisted-name
-plugins/modules/vyos_command.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_command.py validate-modules:doc-missing-type
-plugins/modules/vyos_command.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_command.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_command.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_config.py future-import-boilerplate
-plugins/modules/vyos_config.py metaclass-boilerplate
-plugins/modules/vyos_config.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_config.py validate-modules:doc-missing-type
-plugins/modules/vyos_config.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_config.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_config.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_facts.py future-import-boilerplate
-plugins/modules/vyos_facts.py metaclass-boilerplate
-plugins/modules/vyos_facts.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_facts.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_facts.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_facts.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lag_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lag_interfaces.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_lldp_global.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_lldp_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lldp_interfaces.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_logging.py future-import-boilerplate
-plugins/modules/vyos_logging.py metaclass-boilerplate
-plugins/modules/vyos_logging.py validate-modules:doc-choices-do-not-match-spec
-plugins/modules/vyos_logging.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_logging.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_logging.py validate-modules:doc-missing-type
-plugins/modules/vyos_logging.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_logging.py validate-modules:missing-suboption-docs
-plugins/modules/vyos_logging.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_logging.py validate-modules:undocumented-parameter
-plugins/modules/vyos_ping.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_ping.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_ping.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_system.py future-import-boilerplate
-plugins/modules/vyos_system.py metaclass-boilerplate
-plugins/modules/vyos_system.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_system.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_system.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_system.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_user.py future-import-boilerplate
-plugins/modules/vyos_user.py metaclass-boilerplate
-plugins/modules/vyos_user.py validate-modules:doc-choices-do-not-match-spec
-plugins/modules/vyos_user.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_user.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_user.py validate-modules:doc-missing-type
-plugins/modules/vyos_user.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_user.py validate-modules:missing-suboption-docs
-plugins/modules/vyos_user.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_user.py validate-modules:undocumented-parameter
-plugins/modules/vyos_vlan.py validate-modules:doc-choices-do-not-match-spec
-plugins/modules/vyos_vlan.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_vlan.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_vlan.py validate-modules:doc-missing-type
-plugins/modules/vyos_vlan.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_vlan.py validate-modules:missing-suboption-docs
-plugins/modules/vyos_vlan.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_vlan.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_vlan.py validate-modules:undocumented-parameter
-plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
-plugins/doc_fragments/vyos.py future-import-boilerplate
-plugins/doc_fragments/vyos.py metaclass-boilerplate
-tests/unit/mock/path.py future-import-boilerplate
-tests/unit/mock/path.py metaclass-boilerplate
-tests/unit/mock/yaml_helper.py future-import-boilerplate
-tests/unit/mock/yaml_helper.py metaclass-boilerplate
-tests/unit/modules/conftest.py future-import-boilerplate
-tests/unit/modules/conftest.py metaclass-boilerplate
-tests/unit/modules/utils.py future-import-boilerplate
-tests/unit/modules/utils.py metaclass-boilerplate \ No newline at end of file
diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt
index a62f497..68c5fc2 100644
--- a/tests/sanity/ignore-2.9.txt
+++ b/tests/sanity/ignore-2.9.txt
@@ -1,78 +1,100 @@
-plugins/module_utils/network/vyos/vyos.py future-import-boilerplate
-plugins/module_utils/network/vyos/vyos.py metaclass-boilerplate
+plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
+plugins/doc_fragments/vyos.py future-import-boilerplate
+plugins/doc_fragments/vyos.py metaclass-boilerplate
plugins/modules/vyos_banner.py future-import-boilerplate
plugins/modules/vyos_banner.py metaclass-boilerplate
plugins/modules/vyos_banner.py validate-modules:doc-default-does-not-match-spec
plugins/modules/vyos_banner.py validate-modules:doc-missing-type
-plugins/modules/vyos_banner.py validate-modules:doc-required-mismatch
plugins/modules/vyos_command.py future-import-boilerplate
plugins/modules/vyos_command.py metaclass-boilerplate
plugins/modules/vyos_command.py pylint:blacklisted-name
plugins/modules/vyos_command.py validate-modules:doc-default-does-not-match-spec
plugins/modules/vyos_command.py validate-modules:doc-missing-type
-plugins/modules/vyos_command.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_command.py validate-modules:parameter-list-no-elements
plugins/modules/vyos_command.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_config.py future-import-boilerplate
plugins/modules/vyos_config.py metaclass-boilerplate
plugins/modules/vyos_config.py validate-modules:doc-default-does-not-match-spec
plugins/modules/vyos_config.py validate-modules:doc-missing-type
-plugins/modules/vyos_config.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_config.py validate-modules:parameter-list-no-elements
plugins/modules/vyos_config.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_facts.py future-import-boilerplate
plugins/modules/vyos_facts.py metaclass-boilerplate
plugins/modules/vyos_facts.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_facts.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_facts.py validate-modules:parameter-list-no-elements
plugins/modules/vyos_facts.py validate-modules:parameter-type-not-in-doc
-plugins/modules/vyos_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lag_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lag_interfaces.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_lldp_global.py validate-modules:parameter-list-no-elements
-plugins/modules/vyos_lldp_interfaces.py validate-modules:doc-elements-mismatch
-plugins/modules/vyos_lldp_interfaces.py validate-modules:doc-required-mismatch
+plugins/modules/vyos_firewall_global.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_interface.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_interface.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_interface.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_interface.py validate-modules:doc-missing-type
+plugins/modules/vyos_interface.py validate-modules:invalid-documentation
+plugins/modules/vyos_interface.py validate-modules:missing-suboption-docs
+plugins/modules/vyos_interface.py validate-modules:parameter-type-not-in-doc
+plugins/modules/vyos_interface.py validate-modules:undocumented-parameter
+plugins/modules/vyos_l3_interface.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_l3_interface.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_l3_interface.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_l3_interface.py validate-modules:doc-missing-type
+plugins/modules/vyos_l3_interface.py validate-modules:invalid-documentation
+plugins/modules/vyos_l3_interface.py validate-modules:missing-suboption-docs
+plugins/modules/vyos_l3_interface.py validate-modules:parameter-type-not-in-doc
+plugins/modules/vyos_l3_interface.py validate-modules:undocumented-parameter
+plugins/modules/vyos_linkagg.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_linkagg.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_linkagg.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_linkagg.py validate-modules:doc-missing-type
+plugins/modules/vyos_linkagg.py validate-modules:invalid-documentation
+plugins/modules/vyos_linkagg.py validate-modules:missing-suboption-docs
+plugins/modules/vyos_linkagg.py validate-modules:parameter-type-not-in-doc
+plugins/modules/vyos_linkagg.py validate-modules:undocumented-parameter
+plugins/modules/vyos_lldp_interface.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_lldp_interface.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_lldp_interface.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_lldp_interface.py validate-modules:doc-missing-type
+plugins/modules/vyos_lldp_interface.py validate-modules:invalid-documentation
+plugins/modules/vyos_lldp_interface.py validate-modules:missing-suboption-docs
+plugins/modules/vyos_lldp_interface.py validate-modules:undocumented-parameter
+plugins/modules/vyos_lldp.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_lldp.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_lldp.py validate-modules:invalid-documentation
plugins/modules/vyos_logging.py future-import-boilerplate
plugins/modules/vyos_logging.py metaclass-boilerplate
plugins/modules/vyos_logging.py validate-modules:doc-choices-do-not-match-spec
plugins/modules/vyos_logging.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_logging.py validate-modules:doc-elements-mismatch
plugins/modules/vyos_logging.py validate-modules:doc-missing-type
-plugins/modules/vyos_logging.py validate-modules:doc-required-mismatch
plugins/modules/vyos_logging.py validate-modules:missing-suboption-docs
plugins/modules/vyos_logging.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_logging.py validate-modules:undocumented-parameter
+plugins/modules/vyos_ospfv2.py validate-modules:invalid-documentation
+plugins/modules/vyos_ospfv3.py validate-modules:invalid-documentation
plugins/modules/vyos_ping.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_ping.py validate-modules:doc-required-mismatch
plugins/modules/vyos_ping.py validate-modules:parameter-type-not-in-doc
+plugins/modules/vyos_static_route.py validate-modules:deprecation-mismatch
+plugins/modules/vyos_static_route.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/vyos_static_route.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/vyos_static_route.py validate-modules:doc-missing-type
+plugins/modules/vyos_static_route.py validate-modules:invalid-documentation
+plugins/modules/vyos_static_route.py validate-modules:missing-suboption-docs
+plugins/modules/vyos_static_route.py validate-modules:parameter-type-not-in-doc
+plugins/modules/vyos_static_route.py validate-modules:undocumented-parameter
plugins/modules/vyos_system.py future-import-boilerplate
plugins/modules/vyos_system.py metaclass-boilerplate
plugins/modules/vyos_system.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_system.py validate-modules:doc-required-mismatch
-plugins/modules/vyos_system.py validate-modules:parameter-list-no-elements
plugins/modules/vyos_system.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_user.py future-import-boilerplate
plugins/modules/vyos_user.py metaclass-boilerplate
plugins/modules/vyos_user.py validate-modules:doc-choices-do-not-match-spec
plugins/modules/vyos_user.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_user.py validate-modules:doc-elements-mismatch
plugins/modules/vyos_user.py validate-modules:doc-missing-type
-plugins/modules/vyos_user.py validate-modules:doc-required-mismatch
plugins/modules/vyos_user.py validate-modules:missing-suboption-docs
plugins/modules/vyos_user.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_user.py validate-modules:undocumented-parameter
plugins/modules/vyos_vlan.py validate-modules:doc-choices-do-not-match-spec
plugins/modules/vyos_vlan.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/vyos_vlan.py validate-modules:doc-elements-mismatch
plugins/modules/vyos_vlan.py validate-modules:doc-missing-type
-plugins/modules/vyos_vlan.py validate-modules:doc-required-mismatch
plugins/modules/vyos_vlan.py validate-modules:missing-suboption-docs
-plugins/modules/vyos_vlan.py validate-modules:parameter-list-no-elements
plugins/modules/vyos_vlan.py validate-modules:parameter-type-not-in-doc
plugins/modules/vyos_vlan.py validate-modules:undocumented-parameter
-plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
-plugins/doc_fragments/vyos.py future-import-boilerplate
-plugins/doc_fragments/vyos.py metaclass-boilerplate
+plugins/module_utils/network/vyos/vyos.py future-import-boilerplate
+plugins/module_utils/network/vyos/vyos.py metaclass-boilerplate
tests/unit/mock/path.py future-import-boilerplate
tests/unit/mock/path.py metaclass-boilerplate
tests/unit/mock/yaml_helper.py future-import-boilerplate
@@ -80,4 +102,4 @@ tests/unit/mock/yaml_helper.py metaclass-boilerplate
tests/unit/modules/conftest.py future-import-boilerplate
tests/unit/modules/conftest.py metaclass-boilerplate
tests/unit/modules/utils.py future-import-boilerplate
-tests/unit/modules/utils.py metaclass-boilerplate \ No newline at end of file
+tests/unit/modules/utils.py metaclass-boilerplate
diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py b/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py
index 92d2a4f..2a9a81c 100644
--- a/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py
+++ b/tests/unit/modules/network/vyos/test_vyos_firewall_interfaces.py
@@ -303,7 +303,7 @@ class TestVyosFirewallInterfacesModule(TestVyosModule):
access_rules=[
dict(
afi="ipv4",
- rules=[dict(name="INBOUND", direction="in"),],
+ rules=[dict(name="INBOUND", direction="in")],
),
dict(
afi="ipv6",
diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_rules.py b/tests/unit/modules/network/vyos/test_vyos_firewall_rules.py
index 86fcc65..8d59e19 100644
--- a/tests/unit/modules/network/vyos/test_vyos_firewall_rules.py
+++ b/tests/unit/modules/network/vyos/test_vyos_firewall_rules.py
@@ -686,9 +686,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
def test_vyos_firewall_v4_rule_sets_del_01(self):
set_module_args(
dict(
- config=[
- dict(afi="ipv4", rule_sets=[dict(name="V4-INGRESS"),])
- ],
+ config=[dict(afi="ipv4", rule_sets=[dict(name="V4-INGRESS")])],
state="deleted",
)
)
@@ -699,8 +697,8 @@ class TestVyosFirewallRulesModule(TestVyosModule):
set_module_args(
dict(
config=[
- dict(afi="ipv4", rule_sets=[dict(name="V4-INGRESS"),]),
- dict(afi="ipv6", rule_sets=[dict(name="V6-INGRESS"),]),
+ dict(afi="ipv4", rule_sets=[dict(name="V4-INGRESS")]),
+ dict(afi="ipv6", rule_sets=[dict(name="V6-INGRESS")]),
],
state="deleted",
)
@@ -720,8 +718,8 @@ class TestVyosFirewallRulesModule(TestVyosModule):
set_module_args(
dict(
config=[
- dict(afi="ipv4", rule_sets=[dict(name="V4-ING"),]),
- dict(afi="ipv6", rule_sets=[dict(name="V6-ING"),]),
+ dict(afi="ipv4", rule_sets=[dict(name="V4-ING")]),
+ dict(afi="ipv6", rule_sets=[dict(name="V6-ING")]),
],
state="deleted",
)
diff --git a/tests/unit/modules/network/vyos/test_vyos_ospfv2.py b/tests/unit/modules/network/vyos/test_vyos_ospfv2.py
index b825066..3d558b8 100644
--- a/tests/unit/modules/network/vyos/test_vyos_ospfv2.py
+++ b/tests/unit/modules/network/vyos/test_vyos_ospfv2.py
@@ -99,7 +99,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
dict(
area_id="4",
area_type=dict(stub=dict(default_cost=10)),
- network=[dict(address="192.0.2.0/24"),],
+ network=[dict(address="192.0.2.0/24")],
range=[
dict(address="192.0.3.0/24", cost=10),
dict(address="192.0.4.0/24", cost=12),
@@ -143,7 +143,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
dict(
area_id="14",
area_type=dict(stub=dict(default_cost=20)),
- network=[dict(address="192.0.12.0/24"),],
+ network=[dict(address="192.0.12.0/24")],
range=[
dict(address="192.0.13.0/24", cost=10),
dict(address="192.0.14.0/24", cost=12),
@@ -207,7 +207,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
dict(
area_id="15",
area_type=dict(stub=dict(default_cost=10)),
- network=[dict(address="192.0.12.0/24"),],
+ network=[dict(address="192.0.12.0/24")],
range=[
dict(address="192.0.13.0/24", cost=10),
dict(address="192.0.14.0/24", cost=12),
@@ -251,7 +251,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
dict(
area_id="14",
area_type=dict(stub=dict(default_cost=20)),
- network=[dict(address="192.0.12.0/24"),],
+ network=[dict(address="192.0.12.0/24")],
range=[
dict(address="192.0.13.0/24", cost=10),
dict(address="192.0.14.0/24", cost=12),
@@ -401,7 +401,7 @@ set protocols ospf redistribute bgp metric-type '2'"""
dict(
area_id="4",
area_type=dict(stub=dict(default_cost=10)),
- network=[dict(address="192.0.2.0/24"),],
+ network=[dict(address="192.0.2.0/24")],
range=[
dict(address="192.0.3.0/24", cost=10),
dict(address="192.0.4.0/24", cost=12),
diff --git a/tests/unit/modules/network/vyos/test_vyos_ospfv3.py b/tests/unit/modules/network/vyos/test_vyos_ospfv3.py
index 1d9cb3a..9c016da 100644
--- a/tests/unit/modules/network/vyos/test_vyos_ospfv3.py
+++ b/tests/unit/modules/network/vyos/test_vyos_ospfv3.py
@@ -101,7 +101,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
),
dict(
area_id="3",
- range=[dict(address="2001:db40::/32"),],
+ range=[dict(address="2001:db40::/32")],
),
],
),
@@ -139,7 +139,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
),
dict(
area_id="13",
- range=[dict(address="2001:db44::/32"),],
+ range=[dict(address="2001:db44::/32")],
),
],
),
@@ -203,7 +203,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
),
dict(
area_id="14",
- range=[dict(address="2001:db40::/32"),],
+ range=[dict(address="2001:db40::/32")],
),
],
),
@@ -238,7 +238,7 @@ class TestVyosFirewallRulesModule(TestVyosModule):
),
dict(
area_id="13",
- range=[dict(address="2001:db44::/32"),],
+ range=[dict(address="2001:db44::/32")],
),
],
),
@@ -323,7 +323,7 @@ set protocols ospfv3 redistribute 'bgp'"""
),
dict(
area_id="3",
- range=[dict(address="2001:db40::/32"),],
+ range=[dict(address="2001:db40::/32")],
),
],
),
diff --git a/tox.ini b/tox.ini
index 3a6d05a..4aaa22a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -26,7 +26,7 @@ commands = {posargs}
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
-ignore = E123,E125,E231,E402,W503
+ignore = E123,E125,E402,W503
max-line-length = 160
builtins = _
exclude = .git,.tox,tests/unit/compat/