diff options
-rw-r--r-- | .pre-commit-config.yaml | 7 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | plugins/module_utils/network/vyos/config/ospfv2/ospfv2.py | 1 | ||||
-rw-r--r-- | plugins/module_utils/network/vyos/facts/ospfv2/ospfv2.py | 1 | ||||
-rw-r--r-- | plugins/module_utils/network/vyos/facts/ospfv3/ospfv3.py | 4 | ||||
-rw-r--r-- | test-requirements.txt | 12 | ||||
-rw-r--r-- | tests/sanity/ignore-2.10.txt | 12 | ||||
-rw-r--r-- | tests/sanity/ignore-2.11.txt | 12 | ||||
-rw-r--r-- | tests/sanity/ignore-2.12.txt | 12 | ||||
-rw-r--r-- | tests/sanity/ignore-2.14.txt | 1 | ||||
-rw-r--r-- | tests/sanity/ignore-2.18.txt (renamed from tests/sanity/ignore-2.13.txt) | 0 | ||||
-rw-r--r-- | tests/sanity/ignore-2.9.txt | 14 | ||||
-rw-r--r-- | tox.ini | 32 |
13 files changed, 8 insertions, 105 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9ef17e..0f5d0b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,5 @@ --- repos: - - repo: https://github.com/ansible-network/collection_prep - rev: 1.1.1 - hooks: - - id: update-docs - - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: @@ -29,6 +24,6 @@ repos: args: ["--filter-files"] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.4.2 hooks: - id: black @@ -3,6 +3,9 @@ # VyOS Collection [![CI](https://zuul-ci.org/gated.svg)](https://dashboard.zuul.ansible.com/t/ansible/project/github.com/ansible-collections/vyos.vyos) <!--[![Codecov](https://img.shields.io/codecov/c/github/ansible-collections/vyos)](https://codecov.io/gh/ansible-collections/vyos)--> [![Codecov](https://codecov.io/gh/ansible-collections/vyos.vyos/branch/main/graph/badge.svg)](https://codecov.io/gh/ansible-collections/vyos.vyos) + +⚠️ **The vyos.vyos collection has been [deprecated](https://forum.ansible.com/t/the-bullhorn-123/2568#project-updates-8) and will reach it's end-of-life on December, 2025. We are no longer accepting new pull requests, except for ones that fix critical bugs or security vulnerabilities. Compatibility with ansible-core>2.17 is not guaranteed.** + The Ansible VyOS collection includes a variety of Ansible content to help automate the management of VyOS network appliances. This collection has been tested against VyOS 1.1.8 (helium). @@ -10,7 +13,7 @@ This collection has been tested against VyOS 1.1.8 (helium). <!--start requires_ansible--> ## Ansible version compatibility -This collection has been tested against following Ansible versions: **>=2.9.10**. +This collection has been tested against following Ansible versions: **<2.18.0,>=2.15.0**. For collections that support Ansible 2.9, please ensure you update your `network_os` to use the fully qualified collection name (for example, `cisco.ios.ios`). diff --git a/plugins/module_utils/network/vyos/config/ospfv2/ospfv2.py b/plugins/module_utils/network/vyos/config/ospfv2/ospfv2.py index dedc241..3f9e4e6 100644 --- a/plugins/module_utils/network/vyos/config/ospfv2/ospfv2.py +++ b/plugins/module_utils/network/vyos/config/ospfv2/ospfv2.py @@ -35,7 +35,6 @@ from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.utils.utils class Ospfv2(ConfigBase): - """ The vyos_ospfv2 class """ diff --git a/plugins/module_utils/network/vyos/facts/ospfv2/ospfv2.py b/plugins/module_utils/network/vyos/facts/ospfv2/ospfv2.py index a5c4636..5121c98 100644 --- a/plugins/module_utils/network/vyos/facts/ospfv2/ospfv2.py +++ b/plugins/module_utils/network/vyos/facts/ospfv2/ospfv2.py @@ -24,7 +24,6 @@ from ansible_collections.vyos.vyos.plugins.module_utils.network.vyos.argspec.osp class Ospfv2Facts(object): - """The vyos ospfv2 fact class""" def __init__( diff --git a/plugins/module_utils/network/vyos/facts/ospfv3/ospfv3.py b/plugins/module_utils/network/vyos/facts/ospfv3/ospfv3.py index 121a348..d4b3e44 100644 --- a/plugins/module_utils/network/vyos/facts/ospfv3/ospfv3.py +++ b/plugins/module_utils/network/vyos/facts/ospfv3/ospfv3.py @@ -184,9 +184,7 @@ class Ospfv3Facts(object): return ( "disable" if attrib == "disabled" - else "enable" - if attrib == "enabled" - else attrib.replace("_", "-") + else "enable" if attrib == "enabled" else attrib.replace("_", "-") ) def is_bool(self, attrib): diff --git a/test-requirements.txt b/test-requirements.txt index de3685a..b3159d7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,12 +1,4 @@ -# For ansible-tox-linters -black==23.3.0 ; python_version >= '3.7' -flake8 -yamllint - # Unit test runner -pytest-ansible ; python_version >= '3.9' -git+https://github.com/ansible-community/pytest-ansible-units.git ; python_version < '3.9' +pytest-ansible pytest-xdist - -# For integration tests -pexpect +pytest-cov diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt deleted file mode 100644 index 496cf86..0000000 --- a/tests/sanity/ignore-2.10.txt +++ /dev/null @@ -1,12 +0,0 @@ -plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip -plugins/modules/vyos_route_maps.py import-2.6!skip -plugins/modules/vyos_prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip -plugins/modules/vyos_logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt deleted file mode 100644 index 496cf86..0000000 --- a/tests/sanity/ignore-2.11.txt +++ /dev/null @@ -1,12 +0,0 @@ -plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip -plugins/modules/vyos_route_maps.py import-2.6!skip -plugins/modules/vyos_prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip -plugins/modules/vyos_logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt deleted file mode 100644 index 496cf86..0000000 --- a/tests/sanity/ignore-2.12.txt +++ /dev/null @@ -1,12 +0,0 @@ -plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip -plugins/modules/vyos_route_maps.py import-2.6!skip -plugins/modules/vyos_prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip -plugins/modules/vyos_logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt deleted file mode 100644 index c835eef..0000000 --- a/tests/sanity/ignore-2.14.txt +++ /dev/null @@ -1 +0,0 @@ -plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` diff --git a/tests/sanity/ignore-2.13.txt b/tests/sanity/ignore-2.18.txt index c835eef..c835eef 100644 --- a/tests/sanity/ignore-2.13.txt +++ b/tests/sanity/ignore-2.18.txt diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt deleted file mode 100644 index 5a69ef6..0000000 --- a/tests/sanity/ignore-2.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -plugins/modules/vyos_logging.py validate-modules:deprecation-mismatch # 2.9 expects METADATA -plugins/modules/vyos_logging.py validate-modules:invalid-documentation # removed_at_date not supported in `deprecated` dict -plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py compile-2.6!skip -plugins/module_utils/network/vyos/config/ospf_interfaces/ospf_interfaces.py import-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py compile-2.6!skip -plugins/module_utils/network/vyos/config/route_maps/route_maps.py import-2.6!skip -plugins/modules/vyos_route_maps.py import-2.6!skip -plugins/modules/vyos_prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py import-2.6!skip -plugins/module_utils/network/vyos/config/prefix_lists/prefix_lists.py compile-2.6!skip -plugins/modules/vyos_logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py import-2.6!skip -plugins/module_utils/network/vyos/config/logging_global/logging_global.py compile-2.6!skip diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 6bd8489..0000000 --- a/tox.ini +++ /dev/null @@ -1,32 +0,0 @@ -[tox] -minversion = 1.4.2 -envlist = linters -skipsdist = True - -[testenv] -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -[testenv:black] -install_command = pip install {opts} {packages} -commands = - black --exclude '\.git|\.mypy_cache|\.tox|tests/output' {toxinidir} - -[testenv:linters] -install_command = pip install {opts} {packages} -commands = - black --exclude '\.git|\.mypy_cache|\.tox|tests/output' --check {toxinidir} - flake8 {posargs} - yamllint -s . - -[testenv:venv] -commands = {posargs} - -[flake8] -# E123, E125 skipped as they are invalid PEP-8. - -show-source = True -ignore = E123,E125,E402,W503,W504 -max-line-length = 160 -builtins = _ -exclude = .git,.tox,tests/unit/compat/ |