--- glance/glance/common/auth.py 2011-10-20 19:09:25.397237701 +0400 +++ /usr/lib/python2.7/site-packages/glance/common/auth.py 2011-10-20 19:34:37.257189437 +0400 @@ -148,8 +148,8 @@ def _v2_auth(self, token_url): creds = self.creds - creds = {"passwordCredentials": {"username": creds['username'], - "password": creds['password']}} + creds = {"auth": {"tenantName": creds['tenant'], "passwordCredentials": {"username": creds['username'], + "password": creds['password']}}} tenant = creds.get('tenant') if tenant: @@ -163,12 +163,13 @@ token_url, 'POST', headers=headers, body=req_body) if resp.status == 200: - resp_auth = json.loads(resp_body)['auth'] + resp_auth = json.loads(resp_body)['access'] # FIXME(sirp): for now just using the first endpoint we get back # from the service catalog for glance, and using the public url. - glance_info = resp_auth['serviceCatalog']['glance'] - glance_endpoint = glance_info[0]['publicURL'] + for service in resp_auth['serviceCatalog']: + if service['name'] == 'glance': + glance_endpoint = service['endpoints'][0]['publicURL'] self.management_url = glance_endpoint self.auth_token = resp_auth['token']['id']