diff --git a/doc/source/formats.rst b/doc/source/formats.rst index fd464e4ed0..c763a77e4d 100644 --- a/doc/source/formats.rst +++ b/doc/source/formats.rst @@ -106,3 +106,8 @@ You can set your image's container format to one of the following: * **ova** This indicates what is stored in Glance is an OVA tar archive file + +* **docker** + + This indicates what is stored in Glance is a Docker tar archive of + the container filesystem diff --git a/doc/source/glanceapi.rst b/doc/source/glanceapi.rst index c0add7109c..743e3aa0f3 100644 --- a/doc/source/glanceapi.rst +++ b/doc/source/glanceapi.rst @@ -427,7 +427,7 @@ The list of metadata headers that Glance accepts are listed below. * ``x-image-meta-container_format`` This header is required, unless reserving an image. Valid values are one of - ``aki``, ``ari``, ``ami``, ``bare``, or ``ovf``. + ``aki``, ``ari``, ``ami``, ``bare``, ``ovf``, or ``docker``. For more information, see :doc:`About Disk and Container Formats `. diff --git a/etc/glance-api.conf b/etc/glance-api.conf index dc773badaa..ce44c4243e 100644 --- a/etc/glance-api.conf +++ b/etc/glance-api.conf @@ -963,7 +963,7 @@ # Supported values for the 'container_format' image attribute (list # value) # Deprecated group/name - [DEFAULT]/container_formats -#container_formats = ami,ari,aki,bare,ovf,ova +#container_formats = ami,ari,aki,bare,ovf,ova,docker # Supported values for the 'disk_format' image attribute (list value) # Deprecated group/name - [DEFAULT]/disk_formats diff --git a/glance/common/config.py b/glance/common/config.py index ebf97fc356..51ea8136f9 100644 --- a/glance/common/config.py +++ b/glance/common/config.py @@ -45,7 +45,7 @@ paste_deploy_opts = [ ] image_format_opts = [ cfg.ListOpt('container_formats', - default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'], + default=['ami', 'ari', 'aki', 'bare', 'ovf', 'ova', 'docker'], help=_("Supported values for the 'container_format' " "image attribute"), deprecated_opts=[cfg.DeprecatedOpt('container_formats', diff --git a/glance/contrib/plugins/image_artifact/v1/image.py b/glance/contrib/plugins/image_artifact/v1/image.py index 176c4b9a60..e4ca103986 100644 --- a/glance/contrib/plugins/image_artifact/v1/image.py +++ b/glance/contrib/plugins/image_artifact/v1/image.py @@ -27,7 +27,8 @@ class ImageAsAnArtifact(definitions.ArtifactType): mutable=False) container_format = definitions.String(allowed_values=['ami', 'ari', 'aki', 'bare', - 'ovf', 'ova'], + 'ovf', 'ova', + 'docker'], required=True, mutable=False) min_disk = definitions.Integer(min_value=0, default=0) diff --git a/glance/tests/unit/v2/test_images_resource.py b/glance/tests/unit/v2/test_images_resource.py index df86e9feea..c5c5a2e77f 100644 --- a/glance/tests/unit/v2/test_images_resource.py +++ b/glance/tests/unit/v2/test_images_resource.py @@ -3755,7 +3755,7 @@ class TestImageSchemaFormatConfiguration(test_utils.BaseTestCase): def test_default_container_formats(self): schema = glance.api.v2.images.get_schema() - expected = [None, 'ami', 'ari', 'aki', 'bare', 'ovf', 'ova'] + expected = [None, 'ami', 'ari', 'aki', 'bare', 'ovf', 'ova', 'docker'] actual = schema.properties['container_format']['enum'] self.assertEqual(expected, actual) diff --git a/rally-jobs/plugins/plugin_sample.py b/rally-jobs/plugins/plugin_sample.py index 0eb497007d..8d112ee017 100644 --- a/rally-jobs/plugins/plugin_sample.py +++ b/rally-jobs/plugins/plugin_sample.py @@ -39,7 +39,7 @@ class GlancePlugin(scenario.OpenStackScenario): :param image_name: String used to name the image :param container_format: Container format of image. - Acceptable formats: ami, ari, aki, bare, and ovf. + Acceptable formats: ami, ari, aki, bare, ovf, 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.