summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Jahns <jjahns@vmware.com>2016-12-06 20:41:04 -0800
committerJay Jahns <jjahns@vmware.com>2016-12-07 01:22:43 -0800
commit3f1e0fad92ec6031e17b556609ca940c8a20a165 (patch)
tree21682a3a30d5e30a01b72a6d4f64ad70f49d9ce2
parent8f22719326db3cbf4e6325cedd0c637ffe350adb (diff)
downloadhorizon-3f1e0fad92ec6031e17b556609ca940c8a20a165.tar.gz
Allow OVA upload for images
The OpenStack CLI allows the upload of OVA for images if the container format is set to ova. This patch allows a user to upload a OVA to Glance through the UI, changing the container_format to ova and the disk_format to vmdk. Change-Id: I1483b28ae4a1918a03798c4ef1bb94540fdb3386 Closes-Bug: #1641383
-rw-r--r--openstack_dashboard/dashboards/project/images/images/forms.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/project/images/images/forms.py b/openstack_dashboard/dashboards/project/images/images/forms.py
index fcbc5cc4f..1032fc458 100644
--- a/openstack_dashboard/dashboards/project/images/images/forms.py
+++ b/openstack_dashboard/dashboards/project/images/images/forms.py
@@ -62,6 +62,12 @@ def create_image_metadata(data):
# 'raw' as the disk format and 'docker' as the container format.
disk_format = 'raw'
container_format = 'docker'
+ elif disk_format == 'ova':
+ # If the user wishes to upload an OVA using Horizon, then
+ # 'ova' must be the container format and 'vmdk' must be the disk
+ # format.
+ container_format = 'ova'
+ disk_format = 'vmdk'
else:
container_format = 'bare'