From c329f65b41de7600352b54648bdd56e54bb57315 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Wed, 7 Apr 2021 10:15:09 +0300 Subject: [PATCH] Fix issues with newest ansible-test 2.11 Change-Id: Ifdf253ca01b0e19b55867d8ead03eaceb5b2d73a --- plugins/module_utils/openstack.py | 2 +- plugins/modules/baremetal_node.py | 3 ++- plugins/modules/compute_flavor_info.py | 3 ++- plugins/modules/identity_domain_info.py | 3 ++- plugins/modules/identity_user_info.py | 3 ++- plugins/modules/port_info.py | 3 ++- plugins/modules/project_info.py | 3 ++- tests/sanity/ignore-2.10.txt | 7 ------- tests/sanity/ignore-2.11.txt | 7 ------- 9 files changed, 13 insertions(+), 21 deletions(-) diff --git a/plugins/module_utils/openstack.py b/plugins/module_utils/openstack.py index 8d0e41ad..987c32f0 100644 --- a/plugins/module_utils/openstack.py +++ b/plugins/module_utils/openstack.py @@ -290,7 +290,7 @@ class OpenStackModule: "The '%s' module has been renamed to '%s' in openstack " "collection: openstack.cloud.%s" % ( self.module_name, new_module_name, new_module_name), - version='2.10') + version='2.0.0', collection_name='openstack.cloud') def openstack_cloud_from_module(self): """Sets up connection to cloud using provided options. Checks if all diff --git a/plugins/modules/baremetal_node.py b/plugins/modules/baremetal_node.py index f7d97113..4742233f 100644 --- a/plugins/modules/baremetal_node.py +++ b/plugins/modules/baremetal_node.py @@ -242,7 +242,8 @@ def _parse_driver_info(sdk, module): info.update(info.pop(deprecated)) module.deprecate("Suboption %s of the driver_info parameter of " "'openstack.cloud.baremetal_node' is deprecated" - % deprecated, version='2.0.0') + % deprecated, version='2.0.0', + collection_name='openstack.cloud') return info diff --git a/plugins/modules/compute_flavor_info.py b/plugins/modules/compute_flavor_info.py index 48e78bf8..93ab9a99 100644 --- a/plugins/modules/compute_flavor_info.py +++ b/plugins/modules/compute_flavor_info.py @@ -184,7 +184,8 @@ def main(): is_old_facts = module._name == 'openstack.cloud.compute_flavor_facts' if is_old_facts: module.deprecate("The 'openstack.cloud.compute_flavor_facts' module has been renamed to 'openstack.cloud.compute_flavor_info', " - "and the renamed one no longer returns ansible_facts", version='2.13') + "and the renamed one no longer returns ansible_facts", version='2.0.0', + collection_name='openstack.cloud') name = module.params['name'] vcpus = module.params['vcpus'] diff --git a/plugins/modules/identity_domain_info.py b/plugins/modules/identity_domain_info.py index 05f42127..0cf6bb54 100644 --- a/plugins/modules/identity_domain_info.py +++ b/plugins/modules/identity_domain_info.py @@ -102,7 +102,8 @@ def main(): is_old_facts = module._name == 'openstack.cloud.identity_domain_facts' if is_old_facts: module.deprecate("The 'openstack.cloud.identity_domain_facts' module has been renamed to 'openstack.cloud.identity_domain_info', " - "and the renamed one no longer returns ansible_facts", version='2.13') + "and the renamed one no longer returns ansible_facts", version='2.0.0', + collection_name='openstack.cloud') sdk, opcloud = openstack_cloud_from_module(module) try: diff --git a/plugins/modules/identity_user_info.py b/plugins/modules/identity_user_info.py index 9538f701..142cb0da 100644 --- a/plugins/modules/identity_user_info.py +++ b/plugins/modules/identity_user_info.py @@ -126,7 +126,8 @@ def main(): is_old_facts = module._name == 'openstack.cloud.identity_user_facts' if is_old_facts: module.deprecate("The 'openstack.cloud.identity_user_facts' module has been renamed to 'openstack.cloud.identity_user_info', " - "and the renamed one no longer returns ansible_facts", version='2.13') + "and the renamed one no longer returns ansible_facts", version='2.0.0', + collection_name='openstack.cloud') sdk, opcloud = openstack_cloud_from_module(module) try: diff --git a/plugins/modules/port_info.py b/plugins/modules/port_info.py index 1db90ec8..cade39aa 100644 --- a/plugins/modules/port_info.py +++ b/plugins/modules/port_info.py @@ -195,7 +195,8 @@ def main(): is_old_facts = module._name == 'openstack.cloud.port_facts' if is_old_facts: module.deprecate("The 'openstack.cloud.port_facts' module has been renamed to 'openstack.cloud.port_info', " - "and the renamed one no longer returns ansible_facts", version='2.13') + "and the renamed one no longer returns ansible_facts", version='2.0.0', + collection_name='openstack.cloud') port = module.params.get('port') filters = module.params.get('filters') diff --git a/plugins/modules/project_info.py b/plugins/modules/project_info.py index 421dc36e..80b4d865 100644 --- a/plugins/modules/project_info.py +++ b/plugins/modules/project_info.py @@ -115,7 +115,8 @@ def main(): is_old_facts = module._name == 'openstack.cloud.project_facts' if is_old_facts: module.deprecate("The 'openstack.cloud.project_facts' module has been renamed to 'openstack.cloud.project_info', " - "and the renamed one no longer returns ansible_facts", version='2.13') + "and the renamed one no longer returns ansible_facts", version='2.0.0', + collection_name='openstack.cloud') sdk, opcloud = openstack_cloud_from_module(module) try: diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index d6a30b16..e69de29b 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,7 +0,0 @@ -plugins/modules/baremetal_node.py pylint:ansible-deprecated-no-collection-name -plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/port_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/project_info.py pylint:ansible-deprecated-no-collection-name -plugins/module_utils/openstack.py pylint:ansible-deprecated-no-collection-name diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index d6a30b16..e69de29b 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1,7 +0,0 @@ -plugins/modules/baremetal_node.py pylint:ansible-deprecated-no-collection-name -plugins/modules/compute_flavor_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/identity_domain_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/identity_user_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/port_info.py pylint:ansible-deprecated-no-collection-name -plugins/modules/project_info.py pylint:ansible-deprecated-no-collection-name -plugins/module_utils/openstack.py pylint:ansible-deprecated-no-collection-name