Merge "Add 'vhdx' disk format."

This commit is contained in:
Jenkins 2016-08-01 18:32:59 +00:00 committed by Gerrit Code Review
commit 88aae3b867
8 changed files with 27 additions and 10 deletions

View File

@ -41,6 +41,11 @@ You can set your image's disk format to one of the following:
This is the VHD disk format, a common disk format used by virtual machine
monitors from VMWare, Xen, Microsoft, VirtualBox, and others
* **vhdx**
This is the VHDX disk format, an enhanced version of the vhd format which
supports larger disk sizes among other features.
* **vmdk**
Another common disk format supported by many common virtual machine monitors

View File

@ -510,8 +510,8 @@ The list of metadata headers that Glance accepts are listed below.
* ``x-image-meta-disk_format``
This header is required, unless reserving an image. Valid values are one of
``aki``, ``ari``, ``ami``, ``raw``, ``iso``, ``vhd``, ``vdi``, ``qcow2``, or
``vmdk``.
``aki``, ``ari``, ``ami``, ``raw``, ``iso``, ``vhd``, ``vhdx``, ``vdi``,
``qcow2``, or ``vmdk``.
For more information, see :doc:`About Disk and Container Formats <formats>`.

View File

@ -1105,7 +1105,7 @@
# Supported values for the 'disk_format' image attribute (list value)
# Deprecated group/name - [DEFAULT]/disk_formats
#disk_formats = ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso
#disk_formats = ami,ari,aki,vhd,vhdx,vmdk,raw,qcow2,vdi,iso
[keystone_authtoken]

View File

@ -48,8 +48,8 @@ image_format_opts = [
deprecated_opts=[cfg.DeprecatedOpt('container_formats',
group='DEFAULT')]),
cfg.ListOpt('disk_formats',
default=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2',
'vdi', 'iso'],
default=['ami', 'ari', 'aki', 'vhd', 'vhdx', 'vmdk', 'raw',
'qcow2', 'vdi', 'iso'],
help=_("Supported values for the 'disk_format' "
"image attribute"),
deprecated_opts=[cfg.DeprecatedOpt('disk_formats',

View File

@ -21,8 +21,9 @@ class ImageAsAnArtifact(definitions.ArtifactType):
file = definitions.BinaryObject(required=True)
disk_format = definitions.String(allowed_values=['ami', 'ari', 'aki',
'vhd', 'vmdk', 'raw',
'qcow2', 'vdi', 'iso'],
'vhd', 'vhdx', 'vmdk',
'raw', 'qcow2', 'vdi',
'iso'],
required=True,
mutable=False)
container_format = definitions.String(allowed_values=['ami', 'ari',

View File

@ -3726,8 +3726,8 @@ class TestImagesSerializerDirectUrl(test_utils.BaseTestCase):
class TestImageSchemaFormatConfiguration(test_utils.BaseTestCase):
def test_default_disk_formats(self):
schema = glance.api.v2.images.get_schema()
expected = [None, 'ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2',
'vdi', 'iso']
expected = [None, 'ami', 'ari', 'aki', 'vhd', 'vhdx', 'vmdk',
'raw', 'qcow2', 'vdi', 'iso']
actual = schema.properties['disk_format']['enum']
self.assertEqual(expected, actual)

View File

@ -42,7 +42,7 @@ class GlancePlugin(scenario.OpenStackScenario):
Acceptable formats: ami, ari, aki, bare, ovf, ova and docker.
:param image_location: image file location used to upload
:param disk_format: Disk format of image. Acceptable formats:
ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.
ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, and iso.
:param **kwargs: optional parameters to create image
returns: object of image

View File

@ -0,0 +1,11 @@
---
prelude: >
- Add VHDX to list of supported disk format.
features:
- The identifier ``vhdx`` has been added to the list of
supported disk formats in Glance. The respective
configuration option has been updated and the default
list shows ``vhdx`` as a supported format.
upgrade:
- The ``disk_format`` config option enables ``vhdx`` as
supported by default.