manageiq_policies: deprecate list state (#5721)

* manageiq_policies: deprecate list state

* add changelog fragment
This commit is contained in:
Alexei Znamensky 2022-12-22 18:57:23 +13:00 committed by GitHub
parent 2fc7baecf8
commit 28969c61ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 6 deletions

View file

@ -27,7 +27,10 @@ options:
description:
- C(absent) - policy_profiles should not exist,
- C(present) - policy_profiles should exist,
- C(list) - list current policy_profiles and policies.
- >
C(list) - list current policy_profiles and policies.
This state is deprecated and will be removed 8.0.0.
Please use the module M(community.general.manageiq_policies_info) instead.
choices: ['absent', 'present', 'list']
default: 'present'
policy_profiles:
@ -163,6 +166,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_policies_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]