]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Copy custom properties to image from volume
authorPranaliDeore <pranali.deore@nttdata.com>
Tue, 6 May 2014 04:04:45 +0000 (04:04 +0000)
committerPranaliDeore <pranali.deore@nttdata.com>
Wed, 11 Jun 2014 11:06:42 +0000 (11:06 +0000)
commitdcf4b10cd1e16b28ab388def658e77cc9a34d766
tree1b7d4bbe465d24dd9d7a606f0cb62887f5d73bdf
parent04eecfc7542e7f314c747b01c2715876d484dbb5
Copy custom properties to image from volume

Presently after copying an image to volume, all properties
of the image are getting copied properly but while creating
image back from volume, it doesn't copy custom properties
to the image.

At present in volume-glance-metadata table all the properties
of volume are stored as key and value. Because of this it is
difficult to differentiate between core and custom properties.
To overcome this, I have added a new option
'glance_core_properties' in cinder.conf. This option defines
all core properties of an image. This way, it's easy to separate
core and custom properties from the glance_volume_metadata and add
custom property to the newly created image.

For Example:
glance_core_properties = 'checksum', 'container_format',
'disk_format', 'image_name', 'image_id', 'min_disk',
'min_ram', 'name', 'size'

DocImpact: Added 'glance_core_properties' to distinguish the
core and custom properties as discussed above in cinder.conf

blueprint: restrict-uploading-volume-to-image

Change-Id: I786edbc6e54b3d06ef679a71e22676d2f88e7307
cinder/image/glance.py
cinder/tests/api/contrib/test_volume_actions.py
cinder/tests/api/v2/stubs.py
cinder/tests/policy.json
cinder/volume/api.py
etc/cinder/cinder.conf.sample