]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Complete switch to snapshot objects
authorThang Pham <thang.g.pham@gmail.com>
Thu, 12 Mar 2015 17:18:05 +0000 (13:18 -0400)
committerrick.chen <rick.chen@prophetstor.com>
Fri, 5 Jun 2015 03:59:39 +0000 (11:59 +0800)
commitde4c1aad3b2d22e037f8c3cdba47d1b6d79b98c1
tree8e1b608bbefc4c5d5ca1e225cf97622c571b6e6d
parentfeef4309bbb60f196e22302a6729e711bcb6a799
Complete switch to snapshot objects

The following patch switches the remainder of cinder internals
to use snapshot object instead of direct db calls.  Note that
db calls within cinder drivers were not switched over.  This
is left to driver maintainers to do themselves and to
properly test out the changes on their hardware.

Also, note that there are three occurrences of
db.snapshot_update and one of db.snapshot_destroy left in
cinder/volume/manager.py.  This is intentional because
driver.create_cgsnapshot and driver.delete_cgsnapshot returns
a list of snapshot dicts.  Each driver needs to switched over
occurences of db.snapshot_get_all_for_cgsnapshot() to
SnapshotList.get_all_for_cgsnapshot() in create_cgsnapshot
and delete_cgsnapshot.  Once each driver has done so, a follow
up patch can be created to remove db.snapshot_update and
db.snapshot_destroy in cinder/volume/manager.py.  There are
bugs filed for these to be fixed -
https://bugs.launchpad.net/cinder/+bugs?field.tag=
cgsnapshot-objects.

Change-Id: I64004ac404f67eecee51361dc8edd3f149e1b987
Partial-Implements: blueprint cinder-objects
14 files changed:
cinder/api/contrib/admin_actions.py
cinder/api/contrib/hosts.py
cinder/api/contrib/snapshot_actions.py
cinder/cmd/volume_usage_audit.py
cinder/consistencygroup/api.py
cinder/objects/snapshot.py
cinder/tests/unit/api/contrib/test_admin_actions.py
cinder/tests/unit/api/contrib/test_snapshot_actions.py
cinder/tests/unit/api/contrib/test_volume_unmanage.py
cinder/tests/unit/objects/test_snapshot.py
cinder/tests/unit/test_cmd.py
cinder/volume/api.py
cinder/volume/flows/api/create_volume.py
cinder/volume/manager.py