diff --git a/AUTHORS b/AUTHORS index fac0d2bb5..54b69d146 100644 --- a/AUTHORS +++ b/AUTHORS @@ -36,6 +36,7 @@ Kirill Shileev Lvov Maxim Matt Dietz Matt Stephenson +Michael Basnight Nicholas Mistry Nikolay Sokolov Pavel Shkitin diff --git a/novaclient/client.py b/novaclient/client.py index 95013e3cb..81ce6d9ac 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -35,7 +35,8 @@ class HTTPClient(httplib2.Http): USER_AGENT = 'python-novaclient' def __init__(self, user, password, projectid, auth_url, insecure=False, - timeout=None, token=None, region_name=None, + timeout=None, proxy_tenant_id=None, + proxy_token=None, region_name=None, endpoint_type='publicURL', service_type=None, service_name=None): super(HTTPClient, self).__init__(timeout=timeout) @@ -51,7 +52,8 @@ def __init__(self, user, password, projectid, auth_url, insecure=False, self.management_url = None self.auth_token = None - self.proxy_token = token + self.proxy_token = proxy_token + self.proxy_tenant_id = proxy_tenant_id # httplib2 overrides self.force_exception_to_status_code = True @@ -192,7 +194,8 @@ def _fetch_endpoints_from_auth(self, url): """ # GET ...:5001/v2.0/tokens/#####/endpoints - url = '/'.join([url, 'tokens', self.proxy_token, 'endpoints']) + url = '/'.join([url, 'tokens', '%s?belongsTo=%s' + % (self.proxy_token, self.proxy_tenant_id)]) _logger.debug("Using Endpoint URL: %s" % url) resp, body = self.request(url, "GET", headers={'X-Auth_Token': self.auth_token}) diff --git a/novaclient/v1_1/client.py b/novaclient/v1_1/client.py index e9d3e3c23..aa399f99f 100644 --- a/novaclient/v1_1/client.py +++ b/novaclient/v1_1/client.py @@ -39,7 +39,8 @@ class Client(object): # FIXME(jesse): project_id isn't required to authenticate def __init__(self, username, api_key, project_id, auth_url, - insecure=False, timeout=None, token=None, region_name=None, + insecure=False, timeout=None, proxy_tenant_id=None, + proxy_token=None, region_name=None, endpoint_type='publicURL', extensions=None, service_type=None, service_name=None): # FIXME(comstud): Rename the api_key argument above when we @@ -83,7 +84,8 @@ def __init__(self, username, api_key, project_id, auth_url, auth_url, insecure=insecure, timeout=timeout, - token=token, + proxy_token=proxy_token, + proxy_tenant_id=proxy_tenant_id, region_name=region_name, endpoint_type=endpoint_type, service_type=service_type,