RestClient: Don't hard code volume service name.
Updates the common/rest_client keystone_auth function so that it doesn't hard code the 'service_name' for the volume service. The motivation here is to allow Tempest to run in more environments where the volume service name may not always be 'cinder'. Change-Id: I3b892781929642fd42a3dd3b4ba8d44486bfe275
This commit is contained in:
parent
91ff6d6a27
commit
8527c8a168
|
@ -141,13 +141,7 @@ class RestClient(object):
|
|||
|
||||
mgmt_url = None
|
||||
for ep in auth_data['serviceCatalog']:
|
||||
if ep["type"] == service and service != 'volume':
|
||||
mgmt_url = ep['endpoints'][self.region][self.endpoint_url]
|
||||
tenant_id = auth_data['token']['tenant']['id']
|
||||
break
|
||||
|
||||
elif (ep["type"] == service and ep['name'] == 'cinder' and
|
||||
service == 'volume'):
|
||||
if ep["type"] == service:
|
||||
mgmt_url = ep['endpoints'][self.region][self.endpoint_url]
|
||||
tenant_id = auth_data['token']['tenant']['id']
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue