Merge "Bugfix: report date format wrong when upload result data to mongoDB"
[yardstick.git] / tests / ci / yardstick-verify
index 2b7ec9d..575bdc8 100755 (executable)
@@ -146,11 +146,11 @@ report(){
           \"version\":\"$(basename ${YARDSTICK_BRANCH})\",
           \"scenario\":\"${DEPLOY_SCENARIO}\",
           \"description\": \"yardstick ci scenario status\",
-          \"criteria\":\"$1\",
-          \"start_date\":\"$2\",
-          \"stop_date\":\"$3\",
+          \"criteria\":\"${1}\",
+          \"start_date\":\"${2}\",
+          \"stop_date\":\"${3}\",
           \"details\":\"\"}" \
-          ${DISPATCHER_HTTP_TARGET}
+          "${DISPATCHER_HTTP_TARGET}"
 }
 
 run_test()
@@ -160,9 +160,9 @@ run_test()
 
     mkdir -p /etc/yardstick
 
-    cat << EOF >> /etc/yardstick/yardstick.conf
+    cat << EOF > /etc/yardstick/yardstick.conf
 [DEFAULT]
-debug = True
+debug = False
 dispatcher = ${DISPATCHER_TYPE}
 
 [dispatcher_file]
@@ -220,7 +220,7 @@ EOF
             scenario_status="FAILED"
         fi
 
-        report $scenario_status $start_date $stop_date
+        report "${scenario_status}" "${start_date}" "${stop_date}"
 
         if [ $failed -gt 0 ]; then
             echo "---------------------------"
@@ -301,8 +301,8 @@ main()
 
     # check OpenStack services
     echo "Checking OpenStack services:"
-    for cmd in "glance image-list" "nova list" "heat stack-list"; do
-        echo "  checking ${cmd/%\ */} ..."
+    for cmd in "openstack image list" "openstack server list" "openstack stack list"; do
+        echo "  checking ${cmd} ..."
         if ! $cmd >/dev/null; then
             echo "error: command \"$cmd\" failed"
             exit 1
@@ -311,7 +311,7 @@ main()
 
     echo
     echo "Checking for External network:"
-    for net in $(neutron net-list --router:external True -c name -f value); do
+    for net in $(openstack network list --external -c Name -f value); do
         echo "  external network: $net"
     done
 
@@ -320,8 +320,6 @@ main()
 
     source $YARDSTICK_REPO_DIR/tests/ci/clean_images.sh
 
-    cleanup
-
     trap "error_exit" EXIT SIGTERM
 
     source $YARDSTICK_REPO_DIR/tests/ci/load_images.sh