Bugfix: cacert should suppot insecure mode if needed 59/32359/1
authorrexlee8776 <limingjiang@huawei.com>
Thu, 30 Mar 2017 02:37:02 +0000 (10:37 +0800)
committerrexlee8776 <limingjiang@huawei.com>
Thu, 30 Mar 2017 02:37:02 +0000 (10:37 +0800)
currently, we use env variable "OS_CACERT" to specify the location of
cert file. but if there's no cacert and use for personal verification,
it's better to also support insecure mode by set OS_CACERT=False

JIRA: YARDSTICK-616

Change-Id: I73b0860863bf6386f9114328c52594ef87e02fa3
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
yardstick/common/openstack_utils.py

index 2df8fa5..788de0d 100644 (file)
@@ -79,6 +79,7 @@ def get_session():
     except KeyError:
         return session.Session(auth=auth)
     else:
+        cacert = False if cacert.lower() == "false" else cacert
         return session.Session(auth=auth, verify=cacert)