Addresses lp#942382 - refactor configuration for clarity
* Renamed 'nova' to 'compute'
* Merged 'env' with 'compute'
* Created new 'identity' section
* Added defensive code for bad configs
Change-Id: Ifd7506ed82ae2870600a8676a5e811769517a65d
diff --git a/tempest/services/nova/json/extensions_client.py b/tempest/services/nova/json/extensions_client.py
index 8f26847..284a655 100644
--- a/tempest/services/nova/json/extensions_client.py
+++ b/tempest/services/nova/json/extensions_client.py
@@ -4,10 +4,10 @@
class ExtensionsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
diff --git a/tempest/services/nova/json/flavors_client.py b/tempest/services/nova/json/flavors_client.py
index 990990b..7d612d7 100644
--- a/tempest/services/nova/json/flavors_client.py
+++ b/tempest/services/nova/json/flavors_client.py
@@ -4,10 +4,10 @@
class FlavorsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
diff --git a/tempest/services/nova/json/floating_ips_client.py b/tempest/services/nova/json/floating_ips_client.py
index 8a179b9..3ab8f28 100644
--- a/tempest/services/nova/json/floating_ips_client.py
+++ b/tempest/services/nova/json/floating_ips_client.py
@@ -4,10 +4,10 @@
class FloatingIPsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
self.headers = {'Content-Type': 'application/json',
diff --git a/tempest/services/nova/json/images_client.py b/tempest/services/nova/json/images_client.py
index e4d2c65..5bf10ef 100644
--- a/tempest/services/nova/json/images_client.py
+++ b/tempest/services/nova/json/images_client.py
@@ -6,15 +6,15 @@
class ImagesClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
- self.build_interval = self.config.nova.build_interval
- self.build_timeout = self.config.nova.build_timeout
+ self.build_interval = self.config.compute.build_interval
+ self.build_timeout = self.config.compute.build_timeout
self.headers = {'Content-Type': 'application/json',
'Accept': 'application/json'}
diff --git a/tempest/services/nova/json/keypairs_client.py b/tempest/services/nova/json/keypairs_client.py
index 9c912ef..a0bef15 100644
--- a/tempest/services/nova/json/keypairs_client.py
+++ b/tempest/services/nova/json/keypairs_client.py
@@ -4,10 +4,10 @@
class KeyPairsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
self.headers = {'Content-Type': 'application/json',
diff --git a/tempest/services/nova/json/limits_client.py b/tempest/services/nova/json/limits_client.py
index 93be33e..6f5f57a 100644
--- a/tempest/services/nova/json/limits_client.py
+++ b/tempest/services/nova/json/limits_client.py
@@ -4,10 +4,10 @@
class LimitsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
diff --git a/tempest/services/nova/json/security_groups_client.py b/tempest/services/nova/json/security_groups_client.py
index 0e6b6cf..29223ea 100644
--- a/tempest/services/nova/json/security_groups_client.py
+++ b/tempest/services/nova/json/security_groups_client.py
@@ -4,10 +4,10 @@
class SecurityGroupsClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
self.headers = {'Content-Type': 'application/json',
diff --git a/tempest/services/nova/json/servers_client.py b/tempest/services/nova/json/servers_client.py
index e0a26de..35e5782 100644
--- a/tempest/services/nova/json/servers_client.py
+++ b/tempest/services/nova/json/servers_client.py
@@ -6,15 +6,15 @@
class ServersClient(object):
- def __init__(self, config, username, key, auth_url, tenant_name=None):
+ def __init__(self, config, username, password, auth_url, tenant_name=None):
self.config = config
- catalog_type = self.config.nova.catalog_type
- self.client = rest_client.RestClient(config, username, key,
+ catalog_type = self.config.compute.catalog_type
+ self.client = rest_client.RestClient(config, username, password,
auth_url, catalog_type,
tenant_name)
- self.build_interval = self.config.nova.build_interval
- self.build_timeout = self.config.nova.build_timeout
+ self.build_interval = self.config.compute.build_interval
+ self.build_timeout = self.config.compute.build_timeout
self.headers = {'Content-Type': 'application/json',
'Accept': 'application/json'}