fix the handeling of empty auth_key (#31753)

pull/31772/head
Yaacov Zamir 7 years ago committed by ansibot
parent b058b8e653
commit 2fc1d6618f

@ -443,7 +443,7 @@ class ManageIQProvider(object):
# get role and authtype
role = endpoint.get('role') or provider_defaults.get(endpoint_key + '_role', 'default')
if role == 'default':
authtype = provider_defaults.get('authtype', role)
authtype = provider_defaults.get('authtype') or role
else:
authtype = role
@ -461,7 +461,7 @@ class ManageIQProvider(object):
'authtype': authtype,
'userid': endpoint.get('userid'),
'password': endpoint.get('password'),
'auth_key': endpoint.get('auth_key', default_auth_key),
'auth_key': endpoint.get('auth_key') or default_auth_key,
}
})

Loading…
Cancel
Save