Browse code

Merge "Generate heat images for tempest tests"

Jenkins authored on 2013/08/14 05:48:48
Showing 2 changed files
... ...
@@ -197,6 +197,21 @@ function stop_heat() {
197 197
     done
198 198
 }
199 199
 
200
+function disk_image_create {
201
+    local elements_path=$1
202
+    local elements=$2
203
+    local arch=$3
204
+    local output=$TOP_DIR/files/$4
205
+    if [[ -f "$output.qcow2" ]];
206
+    then
207
+        echo "Image file already exists: $output_file"
208
+    else
209
+        ELEMENTS_PATH=$elements_path disk-image-create \
210
+            $elements -a $arch -o $output
211
+    fi
212
+    # upload with fake URL so that image in $TOP_DIR/files is used
213
+    upload_image "http://localhost/$output.qcow2" $TOKEN
214
+}
200 215
 
201 216
 # Restore xtrace
202 217
 $XTRACE
... ...
@@ -24,6 +24,7 @@
24 24
 # ``DEFAULT_INSTANCE_TYPE``
25 25
 # ``DEFAULT_INSTANCE_USER``
26 26
 # ``CINDER_MULTI_LVM_BACKEND``
27
+# ``HEAT_CREATE_TEST_IMAGE``
27 28
 # ``stack.sh`` calls the entry points in this order:
28 29
 #
29 30
 # install_tempest
... ...
@@ -272,6 +273,12 @@ function configure_tempest() {
272 272
     iniset $TEMPEST_CONF boto http_socket_timeout 30
273 273
     iniset $TEMPEST_CONF boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
274 274
 
275
+    # Orchestration test image
276
+    if [ $HEAT_CREATE_TEST_IMAGE == "True" ]; then
277
+        disk_image_create /usr/share/tripleo-image-elements "vm fedora heat-cfntools" "i386" "fedora-vm-heat-cfntools-tempest"
278
+        iniset $TEMPEST_CONF orchestration image_ref "fedora-vm-heat-cfntools-tempest"
279
+    fi
280
+
275 281
     # Scenario
276 282
     iniset $TEMPEST_CONF scenario img_dir "$FILES/images/cirros-0.3.1-x86_64-uec"
277 283