manageiq_tags: deprecate list state (#5727)

* manageiq_tags: deprecate list state

* add changelog fragment

* add comment to sanity ignore files
This commit is contained in:
Alexei Znamensky 2022-12-23 19:13:56 +13:00 committed by GitHub
parent 6383c82328
commit 2ce3cf91b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 17 deletions

View file

@ -27,7 +27,10 @@ options:
description:
- C(absent) - tags should not exist.
- C(present) - tags should exist.
- C(list) - list current tags.
- >
C(list) - list current tags.
This state is deprecated and will be removed 8.0.0.
Please use the module M(community.general.manageiq_tags_info) instead.
choices: ['absent', 'present', 'list']
default: 'present'
tags:
@ -103,17 +106,6 @@ EXAMPLES = '''
username: 'admin'
password: 'smartvm'
validate_certs: false
- name: List current tags for a provider in ManageIQ.
community.general.manageiq_tags:
state: list
resource_name: 'EngLab'
resource_type: 'provider'
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false
'''
RETURN = '''
@ -155,6 +147,13 @@ def main():
resource_name = module.params['resource_name']
state = module.params['state']
if state == "list":
module.deprecate(
'The value "list" for "state" is deprecated. Please use community.general.manageiq_tags_info instead.',
version='8.0.0',
collection_name='community.general'
)
# get the action and resource type
action = actions[state]
resource_type = manageiq_entities()[resource_type_key]