Add raw image support for lxd scenario
[yardstick.git] / tests / ci / yardstick-verify
index e3d81f9..37d0a90 100755 (executable)
@@ -197,7 +197,7 @@ load_cirros_image()
 
     output=$(glance image-create \
         --name  cirros-0.3.3 \
-        --disk-format qcow2 \
+        --disk-format $DISK_FORMAT \
         --container-format bare \
         --file $image_file)
     echo "$output"
@@ -270,12 +270,6 @@ load_yardstick_image()
         cd $YARDSTICK_REPO_DIR
     fi
 
-    if [ "$DEPLOY_SCENARIO" == "os-nosdn-lxd-ha" -o "$DEPLOY_SCENARIO" == "os-nosdn-lxd-noha" ]; then
-        DISK_FORMAT="raw"
-    else
-        DISK_FORMAT="qcow2"
-    fi
-
     output=$(eval glance --os-image-api-version 1 image-create \
         --name yardstick-trusty-server \
         --is-public true --disk-format $DISK_FORMAT \
@@ -488,6 +482,12 @@ main()
 
     QCOW_IMAGE="/tmp/workspace/yardstick/yardstick-trusty-server.img"
 
+    if [ "$DEPLOY_SCENARIO" == "os-nosdn-lxd-ha" -o "$DEPLOY_SCENARIO" == "os-nosdn-lxd-noha" ]; then
+        DISK_FORMAT="raw"
+    else
+        DISK_FORMAT="qcow2"
+    fi
+
     build_yardstick_image
     load_yardstick_image
     if [ $YARD_IMG_ARCH = "arm64" ]; then