Support for verify option for examples and tests
Add support for the verify option for examples and tests. Currently, OCC only supports the 'insecure' option as a boolean, so we'll map that to the verify option. Change-Id: I0761d01c74f8de5f9043332cecdc4b72ca730997
This commit is contained in:
@@ -31,6 +31,8 @@ def make_connection(opts):
|
|||||||
occ = os_client_config.OpenStackConfig()
|
occ = os_client_config.OpenStackConfig()
|
||||||
cloud = occ.get_one_cloud(opts.cloud, opts)
|
cloud = occ.get_one_cloud(opts.cloud, opts)
|
||||||
auth = cloud.config['auth']
|
auth = cloud.config['auth']
|
||||||
|
if 'insecure' in cloud.config:
|
||||||
|
auth['verify'] = cloud.config['insecure']
|
||||||
conn = connection.Connection(preference=opts.user_preferences, **auth)
|
conn = connection.Connection(preference=opts.user_preferences, **auth)
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class BaseFunctionalTest(unittest.TestCase):
|
|||||||
utils.enable_logging(True)
|
utils.enable_logging(True)
|
||||||
|
|
||||||
auth = test_cloud.config['auth']
|
auth = test_cloud.config['auth']
|
||||||
|
if 'insecure' in test_cloud.config:
|
||||||
|
auth['verify'] = test_cloud.config['insecure']
|
||||||
cls.conn = connection.Connection(preference=pref, **auth)
|
cls.conn = connection.Connection(preference=pref, **auth)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user