fix the handeling of empty auth_key (#31753)

This commit is contained in:
Yaacov Zamir 2017-10-16 02:30:34 +03:00 committed by ansibot
parent b058b8e653
commit 2fc1d6618f

View file

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