Move dscv and ca_certs to config section service_clients
In https://review.openstack.org/#/c/294425/ a new config
section "service_clients" is added which hosts parameters
common to all service clients. ca_certificates_file and
disable_ssl_certificate_validation are also common to all
service clients, so this is to move them from section identity
to section service_clients
Change-Id: I296f1080ce89f0cdceae1c476866b215393b2605
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 77b88f9..9fe4fdb 100644
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -103,8 +103,8 @@
endpoint = _get_unversioned_endpoint(client_dict[service].base_url)
http = tempest.lib.common.http.ClosingHttp(
- CONF.identity.disable_ssl_certificate_validation,
- CONF.identity.ca_certificates_file)
+ CONF.service_clients.disable_ssl_certificate_validation,
+ CONF.service_clients.ca_certificates_file)
__, body = http.request(endpoint, 'GET')
client_dict[service].reset_path()
diff --git a/tempest/common/credentials_factory.py b/tempest/common/credentials_factory.py
index c22afc1..dfc827f 100644
--- a/tempest/common/credentials_factory.py
+++ b/tempest/common/credentials_factory.py
@@ -155,8 +155,8 @@
DEFAULT_PARAMS = {
'disable_ssl_certificate_validation':
- CONF.identity.disable_ssl_certificate_validation,
- 'ca_certs': CONF.identity.ca_certificates_file,
+ CONF.service_clients.disable_ssl_certificate_validation,
+ 'ca_certs': CONF.service_clients.ca_certificates_file,
'trace_requests': CONF.debug.trace_requests
}
diff --git a/tempest/config.py b/tempest/config.py
index 6bae021..8c02b60 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -120,13 +120,6 @@
cfg.StrOpt('catalog_type',
default='identity',
help="Catalog type of the Identity service."),
- cfg.BoolOpt('disable_ssl_certificate_validation',
- default=False,
- help="Set to True if using self-signed SSL certificates."),
- cfg.StrOpt('ca_certificates_file',
- default=None,
- help='Specify a CA bundle file to use in verifying a '
- 'TLS (https) server certificate.'),
cfg.StrOpt('uri',
help="Full URI of the OpenStack Identity API (Keystone), v2"),
cfg.StrOpt('uri_v3',
@@ -181,6 +174,16 @@
default=60,
help='Timeout in seconds to wait for the http request to '
'return'),
+ cfg.BoolOpt('disable_ssl_certificate_validation',
+ default=False,
+ help="Set to True if using self-signed SSL certificates.",
+ deprecated_group='identity'),
+ cfg.StrOpt('ca_certificates_file',
+ default=None,
+ help='Specify a CA bundle file to use in verifying a '
+ 'TLS (https) server certificate.',
+ deprecated_group='identity'),
+
]
identity_feature_group = cfg.OptGroup(name='identity-feature-enabled',
@@ -1404,8 +1407,8 @@
"""
_parameters = {
'disable_ssl_certificate_validation':
- CONF.identity.disable_ssl_certificate_validation,
- 'ca_certs': CONF.identity.ca_certificates_file,
+ CONF.service_clients.disable_ssl_certificate_validation,
+ 'ca_certs': CONF.service_clients.ca_certificates_file,
'trace_requests': CONF.debug.trace_requests,
'http_timeout': CONF.service_clients.http_timeout
}
diff --git a/tempest/manager.py b/tempest/manager.py
index dd16042..fab5a91 100644
--- a/tempest/manager.py
+++ b/tempest/manager.py
@@ -36,13 +36,13 @@
"it should not imported directly. It will be removed as "
"soon as the client manager becomes available in tempest.lib.")
LOG.warning(msg)
- dscv = CONF.identity.disable_ssl_certificate_validation
+ dscv = CONF.service_clients.disable_ssl_certificate_validation
_, uri = tempest_clients.get_auth_provider_class(credentials)
super(Manager, self).__init__(
credentials=credentials, scope=scope,
identity_uri=uri,
disable_ssl_certificate_validation=dscv,
- ca_certs=CONF.identity.ca_certificates_file,
+ ca_certs=CONF.service_clients.ca_certificates_file,
trace_requests=CONF.debug.trace_requests)
diff --git a/tempest/tests/fake_config.py b/tempest/tests/fake_config.py
index 71a4c81..56aaba6 100644
--- a/tempest/tests/fake_config.py
+++ b/tempest/tests/fake_config.py
@@ -33,7 +33,7 @@
self.conf.set_default('build_interval', 10, group='compute')
self.conf.set_default('build_timeout', 10, group='compute')
self.conf.set_default('disable_ssl_certificate_validation', True,
- group='identity')
+ group='service-clients')
self.conf.set_default('uri', 'http://fake_uri.com/auth',
group='identity')
self.conf.set_default('uri_v3', 'http://fake_uri_v3.com/auth',
@@ -89,9 +89,9 @@
self.conf.set_default('trace_requests', 'fake_module', 'debug')
# Identity default values
self.conf.set_default('disable_ssl_certificate_validation', True,
- group='identity')
+ group='service-clients')
self.conf.set_default('ca_certificates_file', '/fake/certificates',
- group='identity')
+ group='service-clients')
self.conf.set_default('region', 'fake_region', 'identity')
# Identity endpoints
self.conf.set_default('v3_endpoint_type', 'fake_v3_uri', 'identity')
diff --git a/tempest/tests/test_config.py b/tempest/tests/test_config.py
index 2808a9c..a5c211a 100644
--- a/tempest/tests/test_config.py
+++ b/tempest/tests/test_config.py
@@ -41,9 +41,9 @@
for param_name in self.expected_extra_params:
self.assertNotIn(param_name, params)
self.assertEqual(
- self.CONF.identity.disable_ssl_certificate_validation,
+ self.CONF.service_clients.disable_ssl_certificate_validation,
params['disable_ssl_certificate_validation'])
- self.assertEqual(self.CONF.identity.ca_certificates_file,
+ self.assertEqual(self.CONF.service_clients.ca_certificates_file,
params['ca_certs'])
self.assertEqual(self.CONF.debug.trace_requests,
params['trace_requests'])