From 6ab6a740ff9346004609ff28fce39a7fe5560702 Mon Sep 17 00:00:00 2001 From: Evgeny Antyshev Date: Wed, 18 Jan 2017 12:13:40 +0000 Subject: [PATCH] Add ploop in disk_format "ploop" image format is supported in upstream Glance https://review.openstack.org/341633 And similar patch has been added in python-openstackclient: https://review.openstack.org/411405 Co-Authored-By: yuyafei Change-Id: I1471224df97cf5fecfe7f02e549855af81c45848 Related-Bug: 1650342 --- glanceclient/tests/unit/v2/fixtures.py | 3 ++- glanceclient/tests/unit/v2/test_shell_v2.py | 2 +- glanceclient/v1/shell.py | 2 +- glanceclient/v2/image_schema.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/glanceclient/tests/unit/v2/fixtures.py b/glanceclient/tests/unit/v2/fixtures.py index daf7d356..a9d62367 100644 --- a/glanceclient/tests/unit/v2/fixtures.py +++ b/glanceclient/tests/unit/v2/fixtures.py @@ -168,7 +168,8 @@ schema_fixture = { "raw", "qcow2", "vdi", - "iso" + "iso", + "ploop" ], "type": [ "null", diff --git a/glanceclient/tests/unit/v2/test_shell_v2.py b/glanceclient/tests/unit/v2/test_shell_v2.py index 407775d1..fed1f720 100644 --- a/glanceclient/tests/unit/v2/test_shell_v2.py +++ b/glanceclient/tests/unit/v2/test_shell_v2.py @@ -46,7 +46,7 @@ def schema_args(schema_getter, omit=None): 'description': 'Format of the container'}, 'disk_format': { 'enum': [None, 'ami', 'ari', 'aki', 'vhd', 'vhdx', 'vmdk', - 'raw', 'qcow2', 'vdi', 'iso'], + 'raw', 'qcow2', 'vdi', 'iso', 'ploop'], 'type': 'string', 'description': 'Format of the disk'}, 'location': {'type': 'string'}, diff --git a/glanceclient/v1/shell.py b/glanceclient/v1/shell.py index eb14f6e6..e1df3465 100644 --- a/glanceclient/v1/shell.py +++ b/glanceclient/v1/shell.py @@ -31,7 +31,7 @@ import glanceclient.v1.images CONTAINER_FORMATS = 'Acceptable formats: ami, ari, aki, bare, and ovf.' DISK_FORMATS = ('Acceptable formats: ami, ari, aki, vhd, vmdk, raw, ' - 'qcow2, vdi, and iso.') + 'qcow2, vdi, iso, and ploop.') DATA_FIELDS = ('location', 'copy_from', 'file') _bool_strict = functools.partial(strutils.bool_from_string, strict=True) diff --git a/glanceclient/v2/image_schema.py b/glanceclient/v2/image_schema.py index 23db2b7a..0602bcae 100644 --- a/glanceclient/v2/image_schema.py +++ b/glanceclient/v2/image_schema.py @@ -106,7 +106,7 @@ _BASE_SCHEMA = { }, "disk_format": { "enum": [None, "ami", "ari", "aki", "vhd", "vhdx", "vmdk", "raw", - "qcow2", "vdi", "iso"], + "qcow2", "vdi", "iso", "ploop"], "type": ["null", "string"], "description": "Format of the disk" },