]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Include volume_metadata with object on vol create
authorJohn Griffith <john.griffith@solidfire.com>
Sat, 28 Jul 2012 04:30:47 +0000 (22:30 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Sat, 28 Jul 2012 04:43:22 +0000 (22:43 -0600)
commit5b605b6b8ae00f51deac5e0531f7aeda9bd11019
tree16408af0907f11f112f23cf6d08547f9c739ecde
parent95262bb692746ca89dc01337357c4329766df5e5
Include volume_metadata with object on vol create

Fix for Bug 1029762

The symptom of this bug is that the response data of an
OSAPI create call always shows and empty dict for volume_metadata
regardless of what was passed in to created and actually used.

Upon the db create_volume call a reference to the volume
object is all that was being returned.  Since metadata is
specified and set, it should also be returned with the
create reference object.

This will result in the the osapi create call returning
a body with correct metdata info rather than always showing
and empty dict as it was previously.

Change-Id: I9ae9c737bd2aa5bfa14c19fe8b8b2a7a5aa4d43a
cinder/db/sqlalchemy/api.py
cinder/tests/test_volume.py