Add support for VolumeFromImage boot source 70/9470/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 16 Mar 2018 18:47:18 +0000 (14:47 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 16 Mar 2018 18:50:41 +0000 (14:50 -0400)
Allows us the ability to configure a volume size for images. This
feature requires OpenStack Cloud Plugin 2.32 to use.

Change-Id: Ic557373c16afc3df3af3571e5f3883f5b18e8e8c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/jjb/lf-ci-jobs.rst
shell/jenkins-configure-clouds.sh

index 1a31b75..8b1324a 100644 (file)
@@ -179,6 +179,7 @@ OpenStack Cloud plugin version supported:
 
 * 2.30
 * 2.31
+* 2.32
 
 Cloud configuration are managed via a directory structure in ci-management as
 follows:
index ab7f909..a04c16c 100644 (file)
@@ -123,6 +123,7 @@ get_minion_options() {
     flavors["v2-highcpu-32"]="21dfb8a3-c472-4a2c-a8e1-4da8de415ff8"
 
     image_name=$(get_cfg "$cfg_file" IMAGE_NAME "")
+    volume_size=$(get_cfg "$cfg_file" VOLUME_SIZE "")
     hardware_id=$(get_cfg "$cfg_file" HARDWARE_ID "")
     network_id=$(get_cfg "$cfg_file" NETWORK_ID "")
     user_data_id=$(get_cfg "$cfg_file" USER_DATA_ID "jenkins-init-script")
@@ -143,7 +144,11 @@ get_minion_options() {
     fs_root=$(get_cfg "$cfg_file" FS_ROOT "/w")
     retention_time=$(get_cfg "$cfg_file" RETENTION_TIME "0")
 
-    echo "    new BootSource.Image(\"$image_name\"),"
+    if [ ! -z "$volume_size" ]; then
+        echo "    new BootSource.VolumeFromImage(\"$image_name\", $volume_size),"
+    else
+        echo "    new BootSource.Image(\"$image_name\"),"
+    fi
     echo "    \"${flavors[${hardware_id}]}\","
     echo "    \"$network_id\","
     echo "    \"$user_data_id\","