Consider region when filtering Gnocchi base URL
Filtering by region is required for filtering by endpoint type:
tempest.lib.auth.KeystoneV3AuthProvider.base_url will always filter by
region. When no region is given the service's first URL is returned by
default – overwriting the previous result filtered by endpoint type.
Change-Id: Ibd3fde3e56c80d30ef2f66b69fe39d9d85fc0a94
diff --git a/telemetry_tempest_plugin/gnocchi/scenario/__init__.py b/telemetry_tempest_plugin/gnocchi/scenario/__init__.py
index a15210a..32dc694 100644
--- a/telemetry_tempest_plugin/gnocchi/scenario/__init__.py
+++ b/telemetry_tempest_plugin/gnocchi/scenario/__init__.py
@@ -43,7 +43,8 @@
token = self.os_admin.auth_provider.get_token()
url = self.os_admin.auth_provider.base_url(
{'service': CONF.metric.catalog_type,
- 'endpoint_type': CONF.metric.endpoint_type})
+ 'endpoint_type': CONF.metric.endpoint_type,
+ 'region': CONF.identity.region})
parsed_url = urlparse.urlsplit(url)
prefix = parsed_url.path.rstrip('/') # turn it into a prefix