Pass 'client', 'message' param to AuthorizationFailure Exception
Change-Id: Ia3f39a0362259429f4d2d995e94073a993ae48a7
Closes-Bug: #1666790
(cherry picked from commit 44b83d3b14
)
This commit is contained in:
parent
73f4d639c5
commit
1a685113d8
|
@ -93,9 +93,11 @@ class KeystoneClientV3(object):
|
||||||
auth = ka_v3.Password(**auth_info)
|
auth = ka_v3.Password(**auth_info)
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -181,8 +183,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