Add support for vmdk files as glance images
* Adds support for vmdk files as glance images in upload_image function
* Set default image url to use for vsphere driver in stackrc
* Now using a more stable url
Change-Id: If6d45bc8dfd3c812ded5e1bcf69ad7ebd9b64f34
diff --git a/functions b/functions
index 84e88fb..bb51a55 100644
--- a/functions
+++ b/functions
@@ -1219,6 +1219,14 @@
return
fi
+ # vmdk format images
+ if [[ "$image_url" =~ '.vmdk' ]]; then
+ IMAGE="$FILES/${IMAGE_FNAME}"
+ IMAGE_NAME="${IMAGE_FNAME%.vmdk}"
+ glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public=True --container-format bare --disk-format vmdk --property vmware-disktype="preallocated" < "${IMAGE}"
+ return
+ fi
+
# XenServer-ovf-format images are provided as .vhd.tgz as well
# and should not be decompressed prior to loading
if [[ "$image_url" =~ '.vhd.tgz' ]]; then