Bugfix and assorted fixes (#28352)

These are updates from aci-ansible.
This commit is contained in:
Dag Wieers 2017-08-17 21:00:23 +02:00 committed by GitHub
parent d4cedbee20
commit e801187899
5 changed files with 22 additions and 21 deletions

View file

@ -138,7 +138,7 @@ class ACIModule(object):
# Handle deprecated method/action parameter
if self.params['method']:
# Deprecate only if state was a valid option (not for aci_rest)
if self.module.argument_spec('state', False):
if 'state' in self.module.argument_spec:
self.module.deprecate("Parameter 'method' or 'action' is deprecated, please use 'state' instead", '2.6')
method_map = dict(delete='absent', get='query', post='present')
self.params['state'] = method_map[self.params['method']]