From 9733b4eb9f3aeadd29f8dd8b00a37ce3d454edb8 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Sat, 28 Jul 2012 10:02:42 -0600 Subject: 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: I469e06941f446526bae39168f3b1ebfea851e0ef --- nova/db/sqlalchemy/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index ea8d7cbec..533298bee 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -2931,7 +2931,7 @@ def volume_create(context, values): with session.begin(): volume_ref.save(session=session) - return volume_ref + return volume_get(context, values['id'], session=session) @require_admin_context -- cgit