]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make copy_to_volume a bit more useful.
authorjohn-griffith <john.griffith@solidfire.com>
Tue, 4 Dec 2012 04:02:19 +0000 (21:02 -0700)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 6 Dec 2012 21:01:06 +0000 (14:01 -0700)
commit6a31bf3e436c1b975630615af0b381df3b7c8756
treeb627c039c0fbfa270f62bc262697133f777dbc20
parent51a438c8f3f0d13c6779602264d72cde82feab9c
Make copy_to_volume a bit more useful.

The current implementation of cinder.driver.copy_to_volume
does not take in to account image type and is only valid
for raw images.  This doesn't do much good for the majority
of cases, and rather than require folks to have a raw version
uploaded to Glance, let's just do a convert if needed on the fly.

This simply creates a temp file, does the conversion and then
writes the temp file directly to the volume.

Change-Id: I849b04b8aae76da068abcd2a20c1fcecca8a5caa
cinder/image/image_utils.py [new file with mode: 0644]
cinder/tests/test_volume.py
cinder/utils.py
cinder/volume/driver.py
etc/cinder/rootwrap.d/volume.filters