Fix argument spec for os_subnet and os_zone

Ansible argument spec provides facility to provide choices
for the given parameter.
Module os_subnet and os_zone spells 'choices' incorrectly.
This change fixes these modules, by changing 'choice' to 'choices'.

Original Upstream PR: https://github.com/ansible/ansible/pull/65497

Change-Id: I3eed5feeef1234996f22bf8dfe7ecec0bc8eb298
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2020-01-21 13:56:54 +05:30 committed by Sagi Shnaidman
parent 7c52b83b52
commit ead550d34e
4 changed files with 3 additions and 5 deletions

View File

@ -234,8 +234,8 @@ def main():
allocation_pool_start=dict(type='str'),
allocation_pool_end=dict(type='str'),
host_routes=dict(type='list', default=None),
ipv6_ra_mode=dict(type='str', choice=ipv6_mode_choices),
ipv6_address_mode=dict(type='str', choice=ipv6_mode_choices),
ipv6_ra_mode=dict(type='str', choices=ipv6_mode_choices),
ipv6_address_mode=dict(type='str', choices=ipv6_mode_choices),
use_default_subnetpool=dict(type='bool', default=False),
extra_specs=dict(type='dict', default=dict()),
state=dict(type='str', default='present', choices=['absent', 'present']),

View File

@ -163,7 +163,7 @@ def _wait(timeout, cloud, zone, state, module, sdk):
def main():
argument_spec = openstack_full_argument_spec(
name=dict(required=True),
zone_type=dict(required=False, choice=['primary', 'secondary']),
zone_type=dict(required=False, choices=['primary', 'secondary']),
email=dict(required=False, default=None),
description=dict(required=False, default=None),
ttl=dict(required=False, default=None, type='int'),

View File

@ -118,7 +118,6 @@ plugins/modules/os_volume.py validate-modules:doc-missing-type
plugins/modules/os_volume.py validate-modules:parameter-type-not-in-doc
plugins/modules/os_volume.py validate-modules:undocumented-parameter
plugins/modules/os_volume_snapshot.py validate-modules:doc-missing-type
plugins/modules/os_zone.py validate-modules:doc-choices-do-not-match-spec
plugins/modules/os_zone.py validate-modules:doc-missing-type
plugins/modules/os_zone.py validate-modules:parameter-type-not-in-doc
plugins/doc_fragments/openstack.py future-import-boilerplate

View File

@ -107,7 +107,6 @@ plugins/modules/os_volume.py validate-modules:doc-missing-type
plugins/modules/os_volume.py validate-modules:parameter-type-not-in-doc
plugins/modules/os_volume.py validate-modules:undocumented-parameter
plugins/modules/os_volume_snapshot.py validate-modules:doc-missing-type
plugins/modules/os_zone.py validate-modules:doc-choices-do-not-match-spec
plugins/modules/os_zone.py validate-modules:doc-missing-type
plugins/modules/os_zone.py validate-modules:parameter-type-not-in-doc
plugins/doc_fragments/openstack.py future-import-boilerplate