From 57c9532cad168e51e8874676ad1f3ac2b09b843b Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 5 Nov 2018 18:26:30 +0530 Subject: [PATCH] OpenStack: add an alias for name (#47972) This fix adds an additional alias for name parameter viz. subnet Fixes: #37352 Signed-off-by: Abhijeet Kasurde --- .../modules/cloud/openstack/os_subnets_facts.py | 10 ++++++---- test/sanity/validate-modules/ignore.txt | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_subnets_facts.py b/lib/ansible/modules/cloud/openstack/os_subnets_facts.py index e4518886a4..dddefc7cbc 100644 --- a/lib/ansible/modules/cloud/openstack/os_subnets_facts.py +++ b/lib/ansible/modules/cloud/openstack/os_subnets_facts.py @@ -24,10 +24,12 @@ requirements: - "python >= 2.7" - "openstacksdk" options: - subnet: + name: description: - - Name or ID of the subnet + - Name or ID of the subnet. + - Alias 'subnet' added in version 2.8. required: false + aliases: ['subnet'] filters: description: - A dictionary of meta data to use for further filtering. Elements of @@ -131,13 +133,13 @@ openstack_subnets: ''' from ansible.module_utils.basic import AnsibleModule -from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_module_kwargs, openstack_cloud_from_module +from ansible.module_utils.openstack import openstack_full_argument_spec, openstack_cloud_from_module def main(): argument_spec = openstack_full_argument_spec( - name=dict(required=False, default=None), + name=dict(required=False, default=None, aliases=['subnet']), filters=dict(required=False, type='dict', default=None) ) module = AnsibleModule(argument_spec) diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 135f0b0ee3..7f2065a958 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -283,8 +283,6 @@ lib/ansible/modules/cloud/openstack/os_server.py E324 lib/ansible/modules/cloud/openstack/os_server_action.py E324 lib/ansible/modules/cloud/openstack/os_stack.py E324 lib/ansible/modules/cloud/openstack/os_subnet.py E326 -lib/ansible/modules/cloud/openstack/os_subnets_facts.py E322 -lib/ansible/modules/cloud/openstack/os_subnets_facts.py E323 lib/ansible/modules/cloud/openstack/os_volume.py E322 lib/ansible/modules/cloud/openstack/os_zone.py E326 lib/ansible/modules/cloud/ovirt/ovirt_affinity_label.py E317