Make keystone verify configurable

In some cases, such as test environements, it is required
to run with an insecure keystone connection. Allow for a
configuration option to set the verify flag.

Change-Id: I4b0658322b5d737b116d5659551fb2fe4f9e68a1
This commit is contained in:
ptoohill1
2015-09-17 00:52:46 -05:00
parent e2a50cac93
commit 2494c1f920
2 changed files with 3 additions and 1 deletions

View File

@@ -51,6 +51,7 @@
# admin_user = octavia
# admin_password = password
# admin_tenant_name = service
# insecure = False
[keystone_authtoken_v3]
# If using Keystone v3

View File

@@ -60,7 +60,8 @@ def get_session():
try:
kc = client.Password(**kwargs)
_SESSION = session.Session(auth=kc)
_SESSION = session.Session(
auth=kc, verify=not cfg.CONF.keystone_authtoken.insecure)
except Exception:
with excutils.save_and_reraise_exception():
LOG.exception(_LE("Error creating Keystone session."))