Upload XenServer style ovf directly to glance

Don't decompress images ending with .vhd.tgz, just send them
to glance

Fixes LP# 1117256

Change-Id: I201debc2e34808703c717276d192169b1ed24c05
This commit is contained in:
Davanum Srinivas 2013-02-06 15:29:49 -05:00 committed by Gerrit Code Review
parent d404c79930
commit 316ed6cc6e

View File

@ -923,6 +923,15 @@ function upload_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
IMAGE="$FILES/${IMAGE_FNAME}"
IMAGE_NAME="${IMAGE_FNAME%.vhd.tgz}"
glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public=True --container-format=ovf --disk-format=vhd < "${IMAGE}"
return
fi
KERNEL=""
RAMDISK=""
DISK_FORMAT=""