Merge lp:~justin-fathomdb/nova/bug724623-fix-2 into lp:~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Merged
Approved by: Rick Harris
Approved revision: 803
Merged at revision: 820
Proposed branch: lp:~justin-fathomdb/nova/bug724623-fix-2
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 18 lines (+9/-0)
1 file modified
nova/db/sqlalchemy/api.py (+9/-0)
To merge this branch: bzr merge lp:~justin-fathomdb/nova/bug724623-fix-2
Reviewer Review Type Date Requested Status
Rick Harris (community) Approve
Devin Carlen (community) Approve
Review via email: mp+53368@code.launchpad.net

Description of the change

Backfix of bugfix of issue blocking creating servers with metadata

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Dan Prince (dan-prince) wrote :

Approve.

Revision history for this message
Rick Harris (rconradharris) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/db/sqlalchemy/api.py'
2--- nova/db/sqlalchemy/api.py 2011-03-14 17:59:41 +0000
3+++ nova/db/sqlalchemy/api.py 2011-03-15 04:31:24 +0000
4@@ -746,6 +746,15 @@
5 context - request context object
6 values - dict containing column values.
7 """
8+ metadata = values.get('metadata')
9+ metadata_refs = []
10+ if metadata:
11+ for metadata_item in metadata:
12+ metadata_ref = models.InstanceMetadata()
13+ metadata_ref.update(metadata_item)
14+ metadata_refs.append(metadata_ref)
15+ values['metadata'] = metadata_refs
16+
17 instance_ref = models.Instance()
18 instance_ref.update(values)
19