Fix and improve SSL configuration
Previously --insecure argument didn't have any effect on discover-tempest-config's behavior which lead to to failing requests due to certificates verify failures. That is fixed now. Due to the change discover-tempest-config can now automatically set the following 2 tempest options: * CONF.identity.disable_ssl_certificate_validation - previously always set to True by default. * CONF.identity.ca_certificates_file - previously not set at all. Change-Id: Iafcc9720e45190e6bd1046540d7c4a640c043023
This commit is contained in:
@@ -488,10 +488,15 @@ def get_cloud_creds(args_namespace):
|
||||
|
||||
cloud_creds = cloud.config.get_auth_args()
|
||||
region_name = cloud.config.config['region_name']
|
||||
|
||||
if region_name:
|
||||
cloud_creds['region_name'] = region_name
|
||||
|
||||
request_args = cloud.config.get_requests_verify_args()
|
||||
cloud_creds['request_args'] = {
|
||||
'verify': request_args[0],
|
||||
'cert': request_args[1],
|
||||
}
|
||||
|
||||
return cloud_creds
|
||||
|
||||
|
||||
@@ -512,7 +517,9 @@ def config_tempest(**kwargs):
|
||||
accounts_path,
|
||||
kwargs.get('cloud_creds'))
|
||||
|
||||
credentials = Credentials(conf, not kwargs.get('non_admin', False))
|
||||
request_args = kwargs.get('cloud_creds', {}).get('request_args', {})
|
||||
credentials = Credentials(conf, not kwargs.get('non_admin', False),
|
||||
**request_args)
|
||||
clients = ClientManager(conf, credentials)
|
||||
|
||||
if kwargs.get('create', False) and kwargs.get('test_accounts') is None:
|
||||
|
Reference in New Issue
Block a user