]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Use snapshot object in create_volume flow
authorThang Pham <thang.g.pham@gmail.com>
Thu, 5 Mar 2015 23:18:33 +0000 (18:18 -0500)
committerThang Pham <thang.g.pham@gmail.com>
Fri, 6 Mar 2015 18:51:11 +0000 (18:51 +0000)
commite75e2f14de49ff89bdcc4f0feffa0dcb5833482d
tree98384f2005e13f4b02681e2bf99dd63f68fe5c08
parent35b1a03a4539d2e7c61d261ce800a241e603d65c
Use snapshot object in create_volume flow

create_volume flow was making a call to db.snapshot_get to get
a snapshot dict and passing it onto drivers in
create_volume_from_snapshot() instead of an object. This causes
a conflict for some drivers, since create_snapshot and
create_volume_from_snapshot methods have two different snapshot
types (object vs. dict). The following patch fixes this by using
objects in create_volume flow and allows drivers to be updated
appropriately to use snapshot objects.

Change-Id: I262eaef9ac9f5f03d3f00f9a2c1fbfbd6c418676
Closes-Bug: #1428609
cinder/tests/test_create_volume_flow.py
cinder/volume/flows/manager/create_volume.py