openstack: Correct fail_json call in module_utils (#41064)

Fixes: #40925

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/40329/head
Abhijeet Kasurde 7 years ago committed by Martin Krizek
parent 4d200fb5ac
commit 13c7d149bb

@ -136,9 +136,9 @@ def openstack_cloud_from_module(module, min_version='0.12.0'):
'auth', 'region_name', 'verify',
'cacert', 'key', 'api_timeout', 'interface'):
if module.params[param] is not None:
module.fail_json(fail_message.format(param=param))
module.fail_json(msg=fail_message.format(param=param))
if module.params['auth_type'] != 'password':
module.fail_json(fail_message.format(param='auth_type'))
module.fail_json(msg=fail_message.format(param='auth_type'))
return sdk, sdk.connect(**cloud_config)
else:
return sdk, sdk.connect(

Loading…
Cancel
Save