bugfix: certificate for https for MCP in baremetal 33/56233/1
authordongwenjuan <dong.wenjuan@zte.com.cn>
Mon, 23 Apr 2018 05:45:26 +0000 (13:45 +0800)
committerdongwenjuan <dong.wenjuan@zte.com.cn>
Mon, 23 Apr 2018 05:45:26 +0000 (13:45 +0800)
In Mcp baremetal env, doctor test is always failed because of
ssl certificate for https.

Change-Id: Ia443c6463fe177ff4e1ab5a86429750fbd23740c
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
doctor_tests/identity_auth.py
tox.ini

index 0d42959..62b45ed 100644 (file)
@@ -40,4 +40,5 @@ def get_session(auth=None):
     """Get a user credentials auth session."""
     if auth is None:
         auth = get_identity_auth()
-    return session.Session(auth=auth)
+    return session.Session(auth=auth,
+                           verify=os.environ.get('OS_CACERT'))
diff --git a/tox.ini b/tox.ini
index 2eaadac..53efbfe 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -21,6 +21,7 @@ passenv =
     OS_PROJECT_DOMAIN_NAME
     OS_PROJECT_DOMAIN_ID
     OS_REGION_NAME
+    OS_CACERT
     IMAGE_NAME
     VM_COUNT
     PROFILER_TYPE