]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Implement ability to Clone volumes in Cinder.
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 12 Dec 2012 22:23:56 +0000 (15:23 -0700)
committerJohn Griffith <john.griffith@solidfire.com>
Wed, 2 Jan 2013 15:55:12 +0000 (08:55 -0700)
commitd99fb6011cc610b78d42891800189feed0391742
treeab746c1cd9786f47dc1f21750e3b109f0c8fd1ea
parent18269eaad82bae89a21929ece49f145f299e4632
Implement ability to Clone volumes in Cinder.

This implements the capability to create usable volume clones in Cinder,
for the LVM case we create a temporary snapshot to copy from so that
volumes can remain attached during cloning.  This works by passing
in a source-volume-id to the create command (similar to create-from-snapshot).

Currently we limit clone to the same Cinder node, and only for the base LVM driver.
All other drivers should raise NotImplemented, most inherit from the SANISCSIDriver,
so move the function there and raise until we have a general implementation
for SANISCSI based drivers.

Those drivers that inherit from ISCSI directly instead of SANISCSI,
add the function explicitly and raise NotImplementedError there as well.

Implements blueprint add-cloning-support-to-cinder

Change-Id: I72bf90baf22bec2d4806d00e2b827a594ed213f4
23 files changed:
cinder/api/v1/volumes.py
cinder/api/v2/views/volumes.py
cinder/api/v2/volumes.py
cinder/db/sqlalchemy/migrate_repo/versions/005_add_source_volume_column.py [new file with mode: 0644]
cinder/db/sqlalchemy/models.py
cinder/tests/api/v1/stubs.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/stubs.py
cinder/tests/api/v2/test_volumes.py
cinder/tests/test_migrations.py
cinder/tests/test_volume_rpcapi.py
cinder/volume/api.py
cinder/volume/driver.py
cinder/volume/drivers/netapp.py
cinder/volume/drivers/nexenta/volume.py
cinder/volume/drivers/nfs.py
cinder/volume/drivers/rbd.py
cinder/volume/drivers/san/san.py
cinder/volume/drivers/sheepdog.py
cinder/volume/drivers/xenapi/sm.py
cinder/volume/drivers/zadara.py
cinder/volume/manager.py
cinder/volume/rpcapi.py