From 7e4fbcf5687b61d1d230cc036ff9d4649be2826e Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Mon, 1 Jun 2020 11:44:13 +0300 Subject: [PATCH] Fix ansible-tests for devel branch Ignore for now deprecation warnings (see https://github.com/ansible-collections/overview/issues/45#issuecomment-628262697) Current there are bugs in ansible-test that prevent to run these tests. Change-Id: I9829bb23a45699e61d7b0af5ecc3e1a94bbbca85 --- plugins/modules/routers_info.py | 1 - plugins/modules/server.py | 4 ---- tests/sanity/ignore-2.10.txt | 9 +++++++++ tests/unit/compat/mock.py | 2 +- tools/run-ansible-sanity.sh | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/modules/routers_info.py b/plugins/modules/routers_info.py index 3f74bb6d..05224441 100644 --- a/plugins/modules/routers_info.py +++ b/plugins/modules/routers_info.py @@ -7,7 +7,6 @@ DOCUMENTATION = ''' --- module: routers_info short_description: Retrieve information about one or more OpenStack routers. -version_added: "2.10" author: "Bram Verschueren (@bverschueren)" description: - Retrieve information about one or more routers from OpenStack. diff --git a/plugins/modules/server.py b/plugins/modules/server.py index ffc9357a..8c6eb942 100644 --- a/plugins/modules/server.py +++ b/plugins/modules/server.py @@ -11,7 +11,6 @@ DOCUMENTATION = ''' --- module: server short_description: Create/Delete Compute Instances from OpenStack -version_added: "2.0" author: "Monty Taylor (@emonty)" description: - Create or Remove compute instances from OpenStack. @@ -162,7 +161,6 @@ options: scheduler_hints: description: - Arbitrary key/value pairs to the scheduler for custom use - version_added: "2.1" type: dict state: description: @@ -176,7 +174,6 @@ options: associated with the instance will be deleted along with the instance. type: bool default: 'no' - version_added: "2.2" reuse_ips: description: - When I(auto_ip) is true and this option is true, the I(auto_ip) code @@ -188,7 +185,6 @@ options: the server is deleted using I(delete_fip). type: bool default: 'yes' - version_added: "2.2" availability_zone: description: - Availability zone in which to create the server. diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index e69de29b..c31f4e6c 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -0,0 +1,9 @@ +plugins/modules/compute_flavor_info.py pylint:invalid-tagged-version +plugins/modules/identity_domain_info.py pylint:invalid-tagged-version +plugins/modules/identity_user_info.py pylint:invalid-tagged-version +plugins/modules/image_info.py pylint:invalid-tagged-version +plugins/modules/networks_info.py pylint:invalid-tagged-version +plugins/modules/port_info.py pylint:invalid-tagged-version +plugins/modules/project_info.py pylint:invalid-tagged-version +plugins/modules/server_info.py pylint:invalid-tagged-version +plugins/modules/subnets_info.py pylint:invalid-tagged-version diff --git a/tests/unit/compat/mock.py b/tests/unit/compat/mock.py index b1afa9fa..e45f47dc 100644 --- a/tests/unit/compat/mock.py +++ b/tests/unit/compat/mock.py @@ -96,7 +96,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4): global file_spec if file_spec is None: - import _io # pylint: disable=import-outside-toplevel + import _io # noqa file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO)))) if mock is None: diff --git a/tools/run-ansible-sanity.sh b/tools/run-ansible-sanity.sh index 91646dae..77aed77a 100644 --- a/tools/run-ansible-sanity.sh +++ b/tools/run-ansible-sanity.sh @@ -24,6 +24,7 @@ mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud cp -a ${TOXDIR}/{plugins,meta,scripts,tests,docs} ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud cd ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud/ ansible-test sanity -v \ + --venv \ --skip-test metaclass-boilerplate \ --skip-test future-import-boilerplate \ plugins/ docs/ meta/ scripts/ tests/