diff --git a/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/client.py b/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/client.py index b1981bd1e2..e51c96d17a 100644 --- a/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/client.py +++ b/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/client.py @@ -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 diff --git a/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/tests/test_client.py b/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/tests/test_client.py index df5fbee11a..3b0baf90ab 100644 --- a/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/tests/test_client.py +++ b/contrib/heat_keystoneclient_v2/heat_keystoneclient_v2/tests/test_client.py @@ -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'