Fixes lp#932320
* Made catalog name configurable
Change-Id: I0906dd37df98612f66996b934163962fe9f2b173
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index dd14e13..da35c8f 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -9,6 +9,7 @@
ssh_timeout=300
build_interval=10
build_timeout=600
+catalog_name=nova
[environment]
image_ref=3
diff --git a/tempest/config.py b/tempest/config.py
index 7aa9405..960ff74 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -88,6 +88,11 @@
"""Timeout in seconds to wait for an entity to build."""
return float(self.get("build_timeout", 300))
+ @property
+ def catalog_name(self):
+ """Catalog name of the Nova service."""
+ return self.get("catalog_name", 'nova')
+
class EnvironmentConfig(object):
def __init__(self, conf):
diff --git a/tempest/services/nova/json/extensions_client.py b/tempest/services/nova/json/extensions_client.py
index abd8957..5f2cac4 100644
--- a/tempest/services/nova/json/extensions_client.py
+++ b/tempest/services/nova/json/extensions_client.py
@@ -6,8 +6,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
def list_extensions(self):
url = 'extensions'
diff --git a/tempest/services/nova/json/flavors_client.py b/tempest/services/nova/json/flavors_client.py
index 60807a3..b592781 100644
--- a/tempest/services/nova/json/flavors_client.py
+++ b/tempest/services/nova/json/flavors_client.py
@@ -6,8 +6,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
def list_flavors(self, params=None):
url = 'flavors'
diff --git a/tempest/services/nova/json/floating_ips_client.py b/tempest/services/nova/json/floating_ips_client.py
index 9a15182..4a9f9eb 100644
--- a/tempest/services/nova/json/floating_ips_client.py
+++ b/tempest/services/nova/json/floating_ips_client.py
@@ -6,8 +6,10 @@
class FloatingIPsClient(object):
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
self.headers = {'Content-Type': 'application/json',
'Accept': 'application/json'}
diff --git a/tempest/services/nova/json/images_client.py b/tempest/services/nova/json/images_client.py
index 12c1774..435e2fa 100644
--- a/tempest/services/nova/json/images_client.py
+++ b/tempest/services/nova/json/images_client.py
@@ -8,8 +8,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
self.build_interval = self.config.nova.build_interval
self.build_timeout = self.config.nova.build_timeout
diff --git a/tempest/services/nova/json/keypairs_client.py b/tempest/services/nova/json/keypairs_client.py
index 73b92a9..88dfcfe 100644
--- a/tempest/services/nova/json/keypairs_client.py
+++ b/tempest/services/nova/json/keypairs_client.py
@@ -6,8 +6,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
self.headers = {'Content-Type': 'application/json',
'Accept': 'application/json'}
diff --git a/tempest/services/nova/json/limits_client.py b/tempest/services/nova/json/limits_client.py
index f06235c..9b96fb4 100644
--- a/tempest/services/nova/json/limits_client.py
+++ b/tempest/services/nova/json/limits_client.py
@@ -5,8 +5,11 @@
class LimitsClient(object):
def __init__(self, config, username, key, auth_url, tenant_name=None):
+ self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
def get_limits(self):
resp, body = self.client.get("limits")
diff --git a/tempest/services/nova/json/security_groups_client.py b/tempest/services/nova/json/security_groups_client.py
index b365ce5..05ba61f 100644
--- a/tempest/services/nova/json/security_groups_client.py
+++ b/tempest/services/nova/json/security_groups_client.py
@@ -6,8 +6,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
def list_security_groups(self, params=None):
"""List all security groups for a user"""
diff --git a/tempest/services/nova/json/servers_client.py b/tempest/services/nova/json/servers_client.py
index 4f2e257..0d343d2 100644
--- a/tempest/services/nova/json/servers_client.py
+++ b/tempest/services/nova/json/servers_client.py
@@ -8,8 +8,10 @@
def __init__(self, config, username, key, auth_url, tenant_name=None):
self.config = config
+ catalog_name = self.config.nova.catalog_name
self.client = rest_client.RestClient(config, username, key,
- auth_url, 'nova', tenant_name)
+ auth_url, catalog_name,
+ tenant_name)
self.build_interval = self.config.nova.build_interval
self.build_timeout = self.config.nova.build_timeout