summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryatinkarel <yatin.karel@nectechnologies.in>2017-02-22 12:32:41 +0530
committerMark Goddard <mark@stackhpc.com>2017-05-12 13:37:40 +0100
commit1a685113d8df479c56ad85aa001930f6b8f1e2dd (patch)
tree4640cad26f98b98393120b5e75681c47495ca68e
parent73f4d639c52899afd81fee6ffb374b4ecd9140f0 (diff)
Pass 'client', 'message' param to AuthorizationFailure Exception
Notes
Notes (review): Code-Review+2: yatin <ykarel@redhat.com> Code-Review+2: Eli Qiao <qiaoliyong@gmail.com> Workflow+1: Eli Qiao <qiaoliyong@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 15 May 2017 06:54:36 +0000 Reviewed-on: https://review.openstack.org/464187 Project: openstack/magnum Branch: refs/heads/stable/ocata
-rw-r--r--magnum/common/keystone.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/magnum/common/keystone.py b/magnum/common/keystone.py
index 7113185..28557ef 100644
--- a/magnum/common/keystone.py
+++ b/magnum/common/keystone.py
@@ -93,9 +93,11 @@ class KeystoneClientV3(object):
93 auth = ka_v3.Password(**auth_info) 93 auth = ka_v3.Password(**auth_info)
94 94
95 else: 95 else:
96 LOG.error(_LE('Keystone API connection failed: no password, ' 96 msg = _LE('Keystone API connection failed: no password, '
97 'trust_id or token found.')) 97 'trust_id or token found.')
98 raise exception.AuthorizationFailure() 98 LOG.error(msg)
99 raise exception.AuthorizationFailure(client='keystone',
100 message='reason %s' % msg)
99 101
100 return auth 102 return auth
101 103
@@ -181,8 +183,11 @@ class KeystoneClientV3(object):
181 self.domain_admin_session 183 self.domain_admin_session
182 ) 184 )
183 except kc_exception.Unauthorized: 185 except kc_exception.Unauthorized:
184 LOG.error(_LE("Keystone client authentication failed")) 186 msg = _LE("Keystone client authentication failed")
185 raise exception.AuthorizationFailure() 187 LOG.error(msg)
188 raise exception.AuthorizationFailure(client='keystone',
189 message='reason: %s' %
190 msg)
186 191
187 self._trustee_domain_id = access.domain_id 192 self._trustee_domain_id = access.domain_id
188 193