xenapi: devstack support for raw tgz image upload
Devstack will recognise the .xen-raw.tgz extensions, and upload them to
glance as raw tgz images with xen pv_mode. This change also adds "tgz" to
the recognised container formats of glance. The changes for raw tgz
support are:
https://review.openstack.org/#/c/40908/
https://review.openstack.org/#/c/40909/
https://review.openstack.org/#/c/41651/
related to blueprint xenapi-supported-image-import-export
Change-Id: I077564587d4303291bb4f10d62bb16380b574106
diff --git a/lib/glance b/lib/glance
index a18189f..64d8b06 100644
--- a/lib/glance
+++ b/lib/glance
@@ -108,6 +108,10 @@
fi
iniset_rpc_backend glance $GLANCE_API_CONF DEFAULT
iniset $GLANCE_API_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/api
+ if [ "$VIRT_DRIVER" = 'xenserver' ]; then
+ iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
+ iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
+ fi
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then