Workaround secure connection for Openstack 69/36769/1
authorYun Huang <yun.huang@windriver.com>
Mon, 19 Mar 2018 15:42:58 +0000 (23:42 +0800)
committerYun Huang <yun.huang@windriver.com>
Mon, 19 Mar 2018 15:42:58 +0000 (23:42 +0800)
Toggle the cert of secured endpoint of OpenStack by option:
cloud-region.esr-system-info.ssl-insecure. Now it support
ssl-insecure=True only.

Change-Id: I77a2792333cc7d2294672baa9fe491573a7eef6d
Issue-ID: MULTICLOUD-161
Signed-off-by: Yun Huang <yun.huang@windriver.com>
share/newton_base/util.py

index 36c4762..e925d99 100644 (file)
@@ -90,7 +90,7 @@ class VimDriverUtils(object):
         if auth_state:
            auth.set_auth_state(auth_state)
 
-        return session.Session(auth=auth, verify=False)
+        return session.Session(auth=auth, verify=(vim['insecure']==False))
 
     @staticmethod
     def get_auth_state(session_obj):