Support of regional endpoinds using Keystone v2
Handles the configuration region_name_for_services with the keystone V2 authentication. Change-Id: Ibba4d617937da8ba6018471e9614259e90409a47
This commit is contained in:
parent
61bd5f30f2
commit
e7d3454c2d
@ -64,7 +64,8 @@ class KeystoneClientV2(object):
|
||||
|
||||
def _v2_client_init(self):
|
||||
kwargs = {
|
||||
'auth_url': self.context.auth_url
|
||||
'auth_url': self.context.auth_url,
|
||||
'region': cfg.CONF.region_name_for_services
|
||||
}
|
||||
auth_kwargs = {}
|
||||
# Note try trust_id first, as we can't reuse auth_token in that case
|
||||
|
@ -58,6 +58,7 @@ class KeystoneClientTest(HeatTestCase):
|
||||
cacert=None,
|
||||
cert=None,
|
||||
insecure=False,
|
||||
region=None,
|
||||
key=None).AndReturn(self.mock_ks_client)
|
||||
self.mock_ks_client.authenticate().AndReturn(auth_ok)
|
||||
elif method == 'password':
|
||||
@ -70,6 +71,7 @@ class KeystoneClientTest(HeatTestCase):
|
||||
cacert=None,
|
||||
cert=None,
|
||||
insecure=False,
|
||||
region=None,
|
||||
key=None).AndReturn(self.mock_ks_client)
|
||||
self.mock_ks_client.authenticate().AndReturn(auth_ok)
|
||||
if method == 'trust':
|
||||
@ -81,6 +83,7 @@ class KeystoneClientTest(HeatTestCase):
|
||||
cacert=None,
|
||||
cert=None,
|
||||
insecure=False,
|
||||
region=None,
|
||||
key=None).AndReturn(self.mock_ks_client)
|
||||
self.mock_ks_client.authenticate(trust_id='atrust123',
|
||||
tenant_id='test_tenant_id'
|
||||
|
Loading…
Reference in New Issue
Block a user