Bugfix: supoort insecure mode in checking openstack environment 43/38043/3
authorJingLu5 <lvjing5@huawei.com>
Tue, 25 Jul 2017 03:21:30 +0000 (03:21 +0000)
committerJingLu5 <lvjing5@huawei.com>
Wed, 26 Jul 2017 00:58:10 +0000 (00:58 +0000)
Change-Id: I18346aa177689bc995eb7d4883f4a66383e827ba
Signed-off-by: JingLu5 <lvjing5@huawei.com>
tests/ci/yardstick-verify

index 751cf65..90854d4 100755 (executable)
@@ -293,8 +293,13 @@ main()
     echo
 
     # check OpenStack services
+    if [[ $OS_INSECURE ]] && [[ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]]; then
+        SECURE="--insecure"
+    else
+        SECURE=""
+    fi
     echo "Checking OpenStack services:"
-    for cmd in "openstack image list" "openstack server list" "openstack stack list"; do
+    for cmd in "openstack ${SECURE} image list" "openstack ${SECURE} server list" "openstack ${SECURE} stack list"; do
         echo "  checking ${cmd} ..."
         if ! $cmd >/dev/null; then
             echo "error: command \"$cmd\" failed"