Commit Graph

9130 Commits (7e1060c716c4d7d3c5f5323895abc5a13d79ddb9)

Author SHA1 Message Date
Evgeni Golov 2c8b706a0c typo: missing-subption-docs → missing-suboption-docs (#62180)
updates the name of the test and all ignore.txt entries

(cherry picked from commit 48a39f5616)
5 years ago
Gonéri Le Bouder 4c8fa415b1 test: disable hcloud_floating_ip_info
Temporarily disable `hcloud_floating_ip_info`, this until #62414 is
resolved.

(cherry picked from commit edf15b346f)
5 years ago
Matt Clay ffbda8d153 WIP - Fix ansible-doc bugs and add integration tests. (#62461)
* Add integration tests for ansible-doc.

* Enable tests that now pass

* Cleanup processing of plugin docs

* Mostly separate the steps of processing plugin docs

  1) Acquire source data
  2) Transform and calculate additonal data
  3) Format data for output
  4) Output data

  format_plugin_doc() is still mixing transformation and formatting but
  that should be fixed in a devel-only change

* Raise exceptions in _get_plugin_doc() on errors.

* Remove check to exclude on blacklisted extensions.  We already request
  only .py files

* If there is no DOCUMENTATION entry in the plugin, raise an exception
  from _get_plugin_doc().  Everywhere we use _get_plugin_doc(), this is
  treated as an error

* If there is no ANSIBLE_METADATA raise an exception as well as
  displaying of docs assumes that this has been set.

* If there is neither DOCUMENTATION nor ANSIBLE_METADATA, warn about the
  lack of METADATA and error on the lack of DOCUMENTATION.  Lack of
  DOCUMENTATION is more important so it is what the user should see.

* Add a few special cases for backwards compat.  These should probably
  be made errors in 2.10:
  * no docs but has metadata shows no documentation rather than an error
  * empty plugin file shows no doumentation rather than an error

* Simplify backwards compatibility logic.

(cherry picked from commit 3b86dc3e12)
5 years ago
Matt Clay ffb3e19dc6 [stable-2.9] Fix ansible-doc traceback and sanity test. (#62040)
* Fix ansible-doc traceback for removed modules.

This avoids tracebacks with errors like the following when a module has been removed:

module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment

* Fix ansible-doc sanity test warning handling.

Warnings about removed modules/plugins on stderr are now properly ignored.

Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored.
(cherry picked from commit 064e8e1ef4)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Gonéri Le Bouder 997f272c4e hcloud_networ_info: be more resilient is network already exists
We may already have an existing network or subnet. This commit ensures
we don't raise an error in this case.
e.g: https://app.shippable.com/github/ansible/ansible/runs/143559/145/tests

(cherry picked from commit 459677877a)
5 years ago
Sumit Jaiswal 51b8daa64d Fix ios_lldp_global enable to enabled raised in issue 61554 (#62440)
* fix ios_lldp_global (#62420)


(cherry picked from commit 9addad0f4a)

* changelog
5 years ago
Matt Clay ec841a086c [stable-2.9] Redact sensitive values by default in ansible-test
(cherry picked from commit 0631e057e9)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Trishna Guha b9e8a6a170 gather_facts action plugin: Fix loading network facts modules for smart gathering (#59856)
* fix smart gathering for network_os in gather_facts action plugin

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix detection of network_os for smart gathering

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* make pep8 happy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 5cd3be9129)
5 years ago
Mike Wiebe d4e577bd6d nxos_telemetry replaced state (#62368)
(cherry picked from commit b0668e17ed)
5 years ago
Sumit Jaiswal 7a668dab06 Backport PR for Check Point Unit tests for the following module from PR 62338 (#62390)
* Network and address range tests (#62338)

* commit network and address_range

* remove test_cp_mgmt_network from ignore.txt

(cherry picked from commit b4dcd7c835)

* changelog

* fix shippable

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Sumit Jaiswal bcd63a6c92 Backport PR for Check Point Unit tests for the following module from PR 62214 (#62405)
* Add unit tests for check_point ansible modules (#62214)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 271825cfaf)

* changelog
5 years ago
Sumit Jaiswal fed6c0ace6 Backport PR for Check Point Unit tests for the following module from PR 62213 (#62386)
* Add unit tests for check_point ansible modules (#62213)

* Update test_cp_mgmt_network.py

* 17 tests

(cherry picked from commit c7f9c3f27e)

* changelog
5 years ago
Egor Zaitsev a48f8f229e routeros_facts: fix for error when there's more than 10 interfaces (#62346)
* routeros_facts: fix for error when there's more than 10 interfaces (#61376)

* fix: proper regex for preprocessing routeros output

* test: regression test

* test: fix nondeterministic unit test

* changelog
5 years ago
Sumit Jaiswal 4df7faa213 Backport PR for Check Point Unit tests for the following module from PR 62216 (#62389)
* changelog

* Forth pr 18 tests (#62216)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit ebdf78d6e4)

* fix eol

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
5 years ago
Sumit Jaiswal 347c10c5ff Backport PR for Check Point Unit tests for the following module from PR 62215 (#62388)
* Third pr 18 tests (#62215)

* Update test_cp_mgmt_network.py

* 18 tests

(cherry picked from commit 3a5c68205c)

* changelog
5 years ago
Sumit Jaiswal 1148e68049 Backport PR for Check Point Unit tests for the following module from PR 62322 (#62385)
* Commands tests (#62322)

* commands tests

* add space in order to delete it and tun shipable tests again

* delete space in order to run shipable tests again

(cherry picked from commit 47cf4e6565)

* changelog
5 years ago
chkp-orso e2aaf72d6a unique tests (#62328)
(cherry picked from commit 6bb8861b0e)
5 years ago
Ganesh Nalawade e9a16d381d Change enable to enabled for junos_interfaces module (#62321)
Fixes #62319

Change `enable` option to `enabled` in junos_interfaces
and junos_lldp_interfaces
data model to be in sync with other network platform
resource modules added in 2.9 version.

(cherry picked from commit a9a5f4e40d)
5 years ago
Matt Clay 54ea1353b3 [stable-2.9] Mark AWS credentials in ansible-test as sensitive.
This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
(cherry picked from commit b73e7721df)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 7f2ba1aaf8 [stable-2.9] Fix display of sanity test doc links.
The documentation links are now displayed when running from an install.

Previously the links were only displayed when running from source.
This was due to ansible-test checking for the presence of documentation files locally, which are only present when running from source.
The check is no longer necessary since there is a sanity test in place to enforce the presence of documentation for all sanity tests.
(cherry picked from commit 32d965e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Felix Fontein 34a48dc2ca Re-enable some docker_swarm tests. (#61875)
(cherry picked from commit 098a13dff4)
5 years ago
Matt Martz 20fee691e3 [stable-2.9] Don't treat no checksum as a checksum match (#62146)
Fixes #61978
* moar tests for get_url fetch behavior with existing file
* add changelog fragment
(cherry picked from commit 7d51cac)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Ganesh Nalawade f7fed1dacc Fix for junos cli_config replace option (#62131)
* Fix for junos cli_config replace option

*  For device that support replace option by loading
   configuration from a file on device `config` option
   is not required and value of `replace` option is the
   path of configuration file on device. This fix allows
   invoking run() function in cli_config if `config` option
   is None and `replace` option is not boolean

*  The command to replace running config on junos device
   is `load override <filename>` and not `load replace <filename>`
   This is fixed in the junos cliconf plugin.

* Add integration test

(cherry picked from commit 200ed25648)
5 years ago
Mario Lenz 9812e52682 [stable-2.9] VMware: Fix issue with order of changes in vmware_vcenter_statistics (61345) (#62088)
* VMware: Fix issue with order of changes in vmware_vcenter_statistics

* [WIP] VMware: Fix fragile sort order in vmware_vcenter_statistics (#62288)

* vmware_vcenter_statistics: Fix fragile sort order

* vmware_vcenter_statistics: Python 2.6 compatibility

(cherry picked from commit 3e4d5aeee3)
5 years ago
Mike Wiebe 54f23c7ef7 Add proper hostname cleanup for nxos tests (#61810)
(cherry picked from commit c5a4086ed7)
5 years ago
Mike Wiebe dc2dd97e7d [stable-2.9] fix nxos_config tests for httpapi (#62082)
* fix nxos_config tests for httpapi

* Remove become parameter

(cherry picked from commit c4894b512d)
5 years ago
Mike Wiebe 8df2541983 Fix bfd cmd order and test issues (#61943)
(cherry picked from commit f582d74f7c)
5 years ago
Chris Van Heuveln 6377e6c9e8 nxos_lacp_interfaces: fix integration test dependencies (#61947)
* nxos_lacp_interfaces: fix integration test dependencies

* Add conditional mode test to m/d/r tests

(cherry picked from commit 6e72893d78)
5 years ago
Chris Van Heuveln 0b771869ea nxos_l2_interfaces: fix for integration tests failing to setup layer2 (#61887)
(cherry picked from commit c0f3777fe2)
5 years ago
Andrey Klychkov 01eef82ed9 hall: remove the module for supporting nonexistent messenger (#62152)
(cherry picked from commit 8b42de29fa)
5 years ago
Matt Clay e424b1b847 [stable-2.9] Fix ansible-test vcenter test filtering.
The default behavior of the ansible-test vcenter plugin is to use the govcsim container to run tests.

However, unless the govcsim mode was specified using the VMWARE_TEST_PLATFORM environment variable, the filter code would skip the tests unless the tests ran on Shippable or the user had an ansible-core-ci key.

Now the filter correctly recognizes that govcsim is the default.
(cherry picked from commit cd4882e)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay c59cf1d148 [stable-2.9] Fix ansible-test collections requirements installation. (#62181)
* Fix location of unit test requirements.

* Preserve ansible-test unit test requirements.

* Remove redundant unit test requirements.

* Fix location of network test requirements.

* Preserve ansible-test network test requirements.

* Remove redundant network test requirements.

* Add missing ordereddict requirements.

* Load collection requirements correctly.

* Add changelog fragment.
(cherry picked from commit cdc4926)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Martz 7dff7b916b [stable-2.9] Ensure we don't erase unsafe context in TaskExecutor.run on bytes (#62287)
* Ensure we don't erase unsafe context in TaskExecutor.run on bytes. Fixes #62237

* Remove unused import

* Add missing import

* use args splatting for to_unsafe_text/bytes

* Add security issue to changelog

* fix yaml linting issue
(cherry picked from commit 5be0668)

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Nathaniel Case 9d6282e633 [stable-2.9] Standardize eos resource modules (#61736)
* Fix eos_l3_interfaces case sensitivity

* Unify EOS module notes

* Add normalize_interfaces to eos_l2_interfaces

* Pull normalize_interface into eos_interfaces

* Add normalize_interface to lag_interfaces

* Add normalize_interface to lldp_interfaces

* Add normalize_interface to lacp_interfaces

* more module cleanup

* Add changelog
(cherry picked from commit 7917d4def7)

Co-authored-by: Nathaniel Case <ncase@redhat.com>
5 years ago
Andrey Klychkov b6335a72f1 fix typos in cloud modules (#62194) (#62274)
* fix typos in cloud modules

* fix typos in cloud modules, fix ci tests

(cherry picked from commit 7e91998049)
5 years ago
Andrey Klychkov 6137cddce2 fix typos in modules (#62135) (#62169)
(cherry picked from commit 5eb5f74083)
5 years ago
Andrey Klychkov 80c39bd85b Fix typos in database modules and their integration tests (#62125) (#62172)
(cherry picked from commit bcc3620182)
5 years ago
Sandra McCann 5bcc1b6855 [backport][docs] Backportapalooza docs #2 (#62104)
* docs: Update apt_key.py, add requirements of gpg (#61552)

(cherry picked from commit 5d7d4a93c8)

* Proposals aren't really used much, delete reference from docs (#61800)

(cherry picked from commit 41055b5dc8)

* Update gitlab_hooks docs (#61837)

(cherry picked from commit 223dab99ea)

* Unify ios_logging and eos_logging documentation with accepted options (#61777)

(cherry picked from commit cc9adf7f1a)

* don't set default:None in documentation when there is no default (#61111), otherwise "None" will be rendered as a string on docsite

(cherry picked from commit 1aca1f86b6)

* Update mso_schema_template_deploy.py (#61849), correct module name in examples

(cherry picked from commit 394a05108d)

* Update hashi_vault.py documentation  with kv V2 example (#61221)

(cherry picked from commit 70f501d5c8)
5 years ago
Kevin Breit 7e3d322b54 Removed absent parameter from state due to risk 5 years ago
Matt Clay 77c2139f7e [stable-2.9] Fix ansible-test pytest plugin loading. (#62119) (#62120)
* [stable-2.9] Fix ansible-test pytest plugin loading. (#62119)

* Avoid assertion rewriting in pytest plugins.

Adding PYTEST_DONT_REWRITE to the ansible-test pytest plugin docstrings disables assertion rewriting in pytest for those plugins.

This avoids warnings during test execution if the plugins are loaded multiple times (such as being imported within tests).

* Run ansible-test pytest plugins early.

The ansible-test pytest plugins need to load and run earlier than conftest modules.

To facilitate this, the pytest_configure function is run during loading, which works since they are loaded (but not always run) before conftest modules are loaded.

A check has also been added to the pytest_configure functions to prevent them from running multiple times in the same process.

* Load pytest plugins using an env var.

The -p command line option loads plugins before conftest, but only during collection.
The PYTEST_PLUGINS environment variable loads plugins before confest, both during collection and test execution.
(cherry picked from commit aaa6d2e)

Co-authored-by: Matt Clay <matt@mystile.com>

* Add missing changelog entry for ansible-test fix.

PR https://github.com/ansible/ansible/pull/62119 was missing a changelog entry.

(cherry picked from commit 6c78f02121)
5 years ago
Gonéri Le Bouder e616ce1091 [stable-2.9] bump hcloud version to 1.4.1 (#62097)
* bump hcloud version to 1.4.1

`hcloud`<=1.4.0 has requirement `requests==2.20.0`. This prevents the
installation of the Vcenter Automation SDK which depends on `requests>=2.22.0`.

`hcloud` 1.4.1 does not have the problem: 8bff356efb
Bumping the dependency will resolve the issue.
(cherry picked from commit 0f52b18)

Co-authored-by: Gonéri Le Bouder <goneri@lebouder.net>
5 years ago
Ganesh Nalawade 6ecf17ee4d Return commands key instead of xml in result for junos rm (#62041)
Fixes https://github.com/ansible/ansible/issues/61773

*  Change `xml` key name to `commands` key to be in sync with
   other platform resource modules.

(cherry picked from commit ff53ca76b8)
5 years ago
Simon Legner fba6fbb4b9 Fix typesetting of "GitLab" (#61702)
(cherry picked from commit 7dbd6116d8)
5 years ago
Jordan Borean 886843807f Fix ansible-test coverage --all (#62115)
(cherry picked from commit 6fb1d56fdc)
5 years ago
Matt Clay d9d8d55861 [stable-2.9] Work around virtualenv/venv issue in ansible-test. (#62111)
Creating a virtual environment using `venv` when running in a virtual environment created by `virtualenv` results in a copy of the original virtual environment instead of creation of a new one.

To work around this, `ansible-test` now identifies when it is running in a `virtualenv` created virtual environment and uses the real Python interpreter to create the `venv` virtual environment.
(cherry picked from commit a7bc11c)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay c2387536ab [stable-2.9] Properly exclude tests/output/ from code coverage.
(cherry picked from commit 983f0ad)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Clay 4f51852b5e [stable-2.9] Fix ansible-test to ignore `tests/output/`. (#62084)
The `test/results/` directory for Ansible test output was already ignored when not using git.

When Ansible Collections were switched to `tests/output/` the ignore entry was previously overlooked.
(cherry picked from commit f110abb)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Sumit Jaiswal df4f0e4ec2 To fix IOSXR L3 Interfaces idempotency failures (#61860)
* fix zuul idemptency failures

* adding eol

(cherry picked from commit 1425d23513)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
5 years ago
Matt Clay b3fbc3c156 [stable-2.9] Fix issues with ansible-test --venv option. (#62033)
* Fix ansible-test venv activation.

When using the ansible-test --venv option, an execv wrapper for each python interpreter is now used instead of a symbolic link.

* Fix ansible-test execv wrapper generation.

Use the currently running Python interpreter for the shebang in the execv wrapper instead of the selected interpreter.

This allows the wrapper to work when the selected interpreter is a script instead of a binary.

* Fix ansible-test sanity requirements install.

When running sanity tests on multiple Python versions, install requirements for all versions used instead of only the default version.

* Fix ansible-test --venv when installed.

When running ansible-test from an install, the --venv delegation option needs to make sure the ansible-test code is available in the created virtual environment.

Exposing system site packages does not work because the virtual environment may be for a different Python version than the one on which ansible-test is installed.
(cherry picked from commit c77ab11051)

Co-authored-by: Matt Clay <matt@mystile.com>
5 years ago
Matt Davis e628c87b29 allow external collections under the ansible NS (#61908)
* fixes #59988

(cherry picked from commit 7f4328ad12)
5 years ago