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:
TerryHowe
2015-05-16 09:36:01 -06:00
parent 24f198ce9a
commit 8711a66eab
2 changed files with 4 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ def make_connection(opts):
occ = os_client_config.OpenStackConfig()
cloud = occ.get_one_cloud(opts.cloud, opts)
auth = cloud.config['auth']
if 'insecure' in cloud.config:
auth['verify'] = cloud.config['insecure']
conn = connection.Connection(preference=opts.user_preferences, **auth)
return conn

View File

@@ -32,6 +32,8 @@ class BaseFunctionalTest(unittest.TestCase):
utils.enable_logging(True)
auth = test_cloud.config['auth']
if 'insecure' in test_cloud.config:
auth['verify'] = test_cloud.config['insecure']
cls.conn = connection.Connection(preference=pref, **auth)
@classmethod