]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMDK copy_image_to_volume and copy_volume_to_image
authorSubramanian Neelakantan <subramanian.neelakantan@gmail.com>
Fri, 23 Aug 2013 12:19:17 +0000 (17:49 +0530)
committerJohn Griffith <john.griffith@solidfire.com>
Wed, 4 Sep 2013 23:56:27 +0000 (17:56 -0600)
commitb9d33d44cb1456b63f731f23b21245ecaa75f497
treeb2240c209ed5b461f1464b68dfd663768fcb7ec7
parent7647ce8c4d3878002ae9898c7449a03fbf6c74b4
VMDK copy_image_to_volume and copy_volume_to_image

Implemented copy_image_to_volume that creates a new volume backing (vm) and
copies over the vmdk file from the glance image. Only glance images of disk
format 'vmdk' can be used to create a volume using this driver.

Also implemented copy_volume_to_image that creates a new glance image using
the volume's vmdk file. The steps involved are to take a snapshot of volume
vmdk, take a copy of this read only file and upload to glance.

Cleaned up docstrings as pointed out in earlier reviews.

Added timeout to avoid blocking wait on read/write threads and also fixed a
bug to upload image from copy of vmdk instead of from original vmdk during
upload to glance.

Implements: blueprint vmware-vmdk-cinder-driver
Change-Id: I00d22861f4e01ae0862dbf4b60af314c475b7d38
cinder/image/glance.py
cinder/tests/test_vmware_vmdk.py
cinder/volume/drivers/vmware/io_util.py [new file with mode: 0644]
cinder/volume/drivers/vmware/read_write_util.py [new file with mode: 0644]
cinder/volume/drivers/vmware/vmdk.py
cinder/volume/drivers/vmware/vmware_images.py [new file with mode: 0644]
cinder/volume/drivers/vmware/volumeops.py
etc/cinder/cinder.conf.sample