Fix up schema for collection deprecation (#69977)

* Fix up schema for collection deprecation

* Fix up modules using wrong name

* Another fix
pull/69978/head
Jordan Borean 5 years ago committed by GitHub
parent a81dd4f06a
commit 15f07e7a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2063,7 +2063,7 @@ class AnsibleModule(object):
self.deprecate(d[0], version=d[1])
elif isinstance(d, Mapping):
self.deprecate(d['msg'], version=d.get('version'), date=d.get('date'),
collection_name=d.get('date'))
collection_name=d.get('collection_name'))
else:
self.deprecate(d) # pylint: disable=ansible-deprecated-no-version
else:

@ -1529,7 +1529,7 @@ def url_argument_spec():
return dict(
url=dict(type='str'),
force=dict(type='bool', default=False, aliases=['thirsty'],
deprecated_aliases=[dict(name='thirsty', version='2.13', collection='ansible.builtin')]),
deprecated_aliases=[dict(name='thirsty', version='2.13', collection_name='ansible.builtin')]),
http_agent=dict(type='str', default='ansible-httpget'),
use_proxy=dict(type='bool', default=True),
validate_certs=dict(type='bool', default=True),

@ -182,12 +182,12 @@ def argument_spec_schema(for_collection):
{
Required('name'): Any(*string_types),
Required('date'): date(),
Required('collection'): collection_name,
Required('collection_name'): collection_name,
},
{
Required('name'): Any(*string_types),
Required('version'): version(for_collection),
Required('collection'): collection_name,
Required('collection_name'): collection_name,
},
)]),
}

Loading…
Cancel
Save