diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index 7ebfdf8f62..ea9b8fbbb1 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -80,7 +80,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin): args = { 'session': self.context.keystone_session, 'extensions': extensions, - 'interface': endpoint_type, + 'endpoint_type': endpoint_type, 'service_type': self.COMPUTE, 'region_name': self._get_region_name(), 'http_log_debug': self._get_client_option(CLIENT_NAME, diff --git a/heat/tests/openstack/nova/fakes.py b/heat/tests/openstack/nova/fakes.py index 8c42ed74e5..0934dffc89 100644 --- a/heat/tests/openstack/nova/fakes.py +++ b/heat/tests/openstack/nova/fakes.py @@ -39,19 +39,17 @@ def fake_exception(status_code=404, message=None, details=None): class FakeClient(fakes.FakeClient, Client): def __init__(self, *args, **kwargs): - super(FakeClient, self).__init__('username', 'password', 'project_id', - 'auth_url', direct_use=False) - self.client = FakeHTTPClient(**kwargs) + super(FakeClient, self).__init__(direct_use=False) + self.client = FakeSessionClient(session=mock.Mock(), **kwargs) -class FakeHTTPClient(base_client.HTTPClient): +class FakeSessionClient(base_client.SessionClient): - def __init__(self, **kwargs): - super(FakeHTTPClient, self).__init__('username', 'password', - 'project_id', 'auth_url') + def __init__(self, *args, **kwargs): + super(FakeSessionClient, self).__init__(*args, **kwargs) self.callstack = [] - def _cs_request(self, url, method, **kwargs): + def request(self, url, method, **kwargs): # Check that certain things are called correctly if method in ['GET', 'DELETE']: assert 'body' not in kwargs