Merge "Pass 'client', 'message' param to AuthorizationFailure Exception"
This commit is contained in:
commit
dd2a8520cb
|
@ -92,9 +92,11 @@ class KeystoneClientV3(object):
|
||||||
except ka_exception.MissingRequiredOptions:
|
except ka_exception.MissingRequiredOptions:
|
||||||
auth = self._get_legacy_auth()
|
auth = self._get_legacy_auth()
|
||||||
else:
|
else:
|
||||||
LOG.error(_LE('Keystone API connection failed: no password, '
|
msg = _LE('Keystone API connection failed: no password, '
|
||||||
'trust_id or token found.'))
|
'trust_id or token found.')
|
||||||
raise exception.AuthorizationFailure()
|
LOG.error(msg)
|
||||||
|
raise exception.AuthorizationFailure(client='keystone',
|
||||||
|
message='reason %s' % msg)
|
||||||
|
|
||||||
return auth
|
return auth
|
||||||
|
|
||||||
|
@ -180,8 +182,11 @@ class KeystoneClientV3(object):
|
||||||
self.domain_admin_session
|
self.domain_admin_session
|
||||||
)
|
)
|
||||||
except kc_exception.Unauthorized:
|
except kc_exception.Unauthorized:
|
||||||
LOG.error(_LE("Keystone client authentication failed"))
|
msg = _LE("Keystone client authentication failed")
|
||||||
raise exception.AuthorizationFailure()
|
LOG.error(msg)
|
||||||
|
raise exception.AuthorizationFailure(client='keystone',
|
||||||
|
message='reason: %s' %
|
||||||
|
msg)
|
||||||
|
|
||||||
self._trustee_domain_id = access.domain_id
|
self._trustee_domain_id = access.domain_id
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue