From 5308f61b78b3be59a85dcb855c350195216c5650 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 20 Jun 2021 12:14:28 +0000 Subject: [PATCH] ali_instance_info - marked parameters for deprecation in c.g. 5.0.0 (#2844) (#2848) * marked parameters for deprecation in c.g. 5.0.0 * added changelog fragment * deprecate params in arg_spec * doc adjusment per PR (cherry picked from commit 519411e026760477113de5332ba6f514e9599108) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../2844-ali_instance_info-deprecate-params.yml | 2 ++ plugins/modules/cloud/alicloud/ali_instance_info.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/2844-ali_instance_info-deprecate-params.yml diff --git a/changelogs/fragments/2844-ali_instance_info-deprecate-params.yml b/changelogs/fragments/2844-ali_instance_info-deprecate-params.yml new file mode 100644 index 0000000000..a37555edcd --- /dev/null +++ b/changelogs/fragments/2844-ali_instance_info-deprecate-params.yml @@ -0,0 +1,2 @@ +deprecated_features: + - ali_instance_info - marked removal version of deprecated parameters ``availability_zone`` and ``instance_names`` (https://github.com/ansible-collections/community.general/issues/2429). diff --git a/plugins/modules/cloud/alicloud/ali_instance_info.py b/plugins/modules/cloud/alicloud/ali_instance_info.py index 8a3b8aeed0..23665bbcad 100644 --- a/plugins/modules/cloud/alicloud/ali_instance_info.py +++ b/plugins/modules/cloud/alicloud/ali_instance_info.py @@ -35,12 +35,14 @@ description: options: availability_zone: description: - - (Deprecated) Aliyun availability zone ID in which to launch the instance. Please use filter item 'zone_id' instead. + - Aliyun availability zone ID in which to launch the instance. + - Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item I(zone_id) instead. aliases: ['alicloud_zone'] type: str instance_names: description: - - (Deprecated) A list of ECS instance names. Please use filter item 'instance_name' instead. + - A list of ECS instance names. + - Deprecated parameter, it will be removed in community.general 5.0.0. Please use filter item I(instance_name) instead. aliases: ["names"] type: list elements: str @@ -374,8 +376,10 @@ except ImportError: def main(): argument_spec = ecs_argument_spec() argument_spec.update(dict( - availability_zone=dict(aliases=['alicloud_zone']), - instance_ids=dict(type='list', elements='str', aliases=['ids']), + availability_zone=dict(aliases=['alicloud_zone'], + removed_in_version="5.0.0", removed_from_collection="community.general"), + instance_ids=dict(type='list', elements='str', aliases=['ids'], + removed_in_version="5.0.0", removed_from_collection="community.general"), instance_names=dict(type='list', elements='str', aliases=['names']), name_prefix=dict(type='str'), tags=dict(type='dict', aliases=['instance_tags']),