Fixes using quota-show with default tenant id
Closes-Bug: #1234182 Change-Id: I0ce502e96693c9892dea87988f9435dd522ddcc1
This commit is contained in:
parent
d04a959505
commit
bcb5ba08a2
@ -217,6 +217,7 @@ class HTTPClient(object):
|
||||
|
||||
if extract_token:
|
||||
self.auth_token = self.service_catalog.get_token()
|
||||
self.tenant_id = self.service_catalog.get_tenant_id()
|
||||
|
||||
management_url = self.service_catalog.url_for(
|
||||
attr='region',
|
||||
|
@ -28,6 +28,9 @@ class ServiceCatalog(object):
|
||||
def get_token(self):
|
||||
return self.catalog['access']['token']['id']
|
||||
|
||||
def get_tenant_id(self):
|
||||
return self.catalog['access']['token']['tenant']['id']
|
||||
|
||||
def url_for(self, attr=None, filter_value=None,
|
||||
service_type=None, endpoint_type='publicURL',
|
||||
service_name=None, share_service_name=None):
|
||||
|
@ -33,6 +33,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
"token": {
|
||||
"expires": "12345",
|
||||
"id": "FAKE_ID",
|
||||
"tenant": {
|
||||
"id": "FAKE_TENANT_ID"
|
||||
},
|
||||
},
|
||||
"serviceCatalog": [
|
||||
{
|
||||
@ -190,6 +193,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
"token": {
|
||||
"expires": "12345",
|
||||
"id": "FAKE_ID",
|
||||
"tenant": {
|
||||
"id": "FAKE_TENANT_ID"
|
||||
},
|
||||
},
|
||||
"serviceCatalog": [
|
||||
{
|
||||
@ -274,6 +280,9 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
|
||||
"token": {
|
||||
"expires": "12345",
|
||||
"id": "FAKE_ID",
|
||||
"tenant": {
|
||||
"id": "FAKE_TENANT_ID"
|
||||
},
|
||||
},
|
||||
"serviceCatalog": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user