]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add finish_volume_migration to volume object
authorThang Pham <thang.g.pham@gmail.com>
Tue, 15 Dec 2015 00:19:24 +0000 (16:19 -0800)
committerThang Pham <thang.g.pham@gmail.com>
Fri, 8 Jan 2016 19:20:49 +0000 (19:20 +0000)
commit08b4d136cbe6de39b1e466774a3f5c3e30a63e4b
tree4b3c6a69bc18acf4238c170712df9ba7ad7e80c0
parent2a5e47d9a0410b904a12c09e4f029e4ae6da509f
Add finish_volume_migration to volume object

The following patch adds finish_volume_migration() to
the volume object, so it could be used by
migrate_volume_completion() in cinder/volume/manager.py
to properly delete the destination volume on failure.
It also optimizes the call to finish_volume_migration
by using the existing volume objects instead of
performing additional volume lookups.

Change-Id: I02ddf2afb8643e4d3c68934627ad35193e0137ef
Closes-Bug: #1520102
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/objects/volume.py
cinder/tests/unit/db/test_finish_migration.py [deleted file]
cinder/tests/unit/objects/test_objects.py
cinder/tests/unit/objects/test_volume.py
cinder/volume/manager.py