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
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 8924fd3..cb18a9c 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -141,13 +141,7 @@
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