]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix volume upload failure with glance_api_version=2
authorTomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
Fri, 18 Dec 2015 11:38:36 +0000 (20:38 +0900)
committerTomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
Mon, 21 Dec 2015 06:06:06 +0000 (15:06 +0900)
commitedf00659aadaf898ae679f358a6ea8533f4dd891
treece2bf7dfb5595009d7e68e2d04c70776be4e565d
parente7965dc323c3d9a97d6cddfad48dc36b7792f6c8
Fix volume upload failure with glance_api_version=2

When the volume has additional image properties, upload-to-image
using glance API version 2 will fail with the following error.

  Failed validation u'type' in schema[u'additionalProperties']:
      {u'type': u'string'}

This is due to non core properties passed as a dict to the key
'properties'. It is valid in Image API v1, but the additional
properties must be passed just like core properties in v2.

Change-Id: Ib32c92a8be170b5f43a34e69155398dfc1a8cbcd
Closes-Bug: #1527324
cinder/image/glance.py
cinder/tests/unit/image/test_glance.py
releasenotes/notes/glance_v2_upload-939c5693bcc25483.yaml [new file with mode: 0644]