Add the OVA container format

An OVA package is a tar archive usually containing an OVF directory
inside it. Nova needs to be able to differentiate OVF and OVA based on
the container format in order to extract the relevant information from
it.
This patch adds the OVA container format to the Glance configuration.

Closes-Bug: #1286375

Change-Id: I5034d2943907823a9296e7a5fb41a28f2d92ec5a
This commit is contained in:
Arnaud Legendre 2014-03-03 13:16:01 -08:00
parent 9001bf283e
commit 965e2c3594
4 changed files with 7 additions and 3 deletions

View File

@ -102,3 +102,7 @@ You can set your image's container format to one of the following:
* **ami**
This indicates what is stored in Glance is an Amazon machine image
* **ova**
This indicates what is stored in Glance is an OVA tar archive file

View File

@ -108,7 +108,7 @@ workers = 1
#send_identity_headers = False
# Supported values for the 'container_format' image attribute
#container_formats=ami,ari,aki,bare,ovf
#container_formats=ami,ari,aki,bare,ovf,ova
# Supported values for the 'disk_format' image attribute
#disk_formats=ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso

View File

@ -41,7 +41,7 @@ paste_deploy_opts = [
]
image_format_opts = [
cfg.ListOpt('container_formats',
default=['ami', 'ari', 'aki', 'bare', 'ovf'],
default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'],
help=_("Supported values for the 'container_format' "
"image attribute"),
deprecated_opts=[cfg.DeprecatedOpt('container_formats',

View File

@ -3176,7 +3176,7 @@ class TestImageSchemaFormatConfiguration(test_utils.BaseTestCase):
def test_default_container_formats(self):
schema = glance.api.v2.images.get_schema()
expected = ['ami', 'ari', 'aki', 'bare', 'ovf']
expected = ['ami', 'ari', 'aki', 'bare', 'ovf', 'ova']
actual = schema.properties['container_format']['enum']
self.assertEqual(expected, actual)