From 868374f005d7d3490f9089e045d7b35717770703 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Tue, 10 Jul 2012 14:02:52 -0600 Subject: Fixes api fails to unpack metadata using cinder Fix for bug 1023027 Change-Id: I2d19f461f3734518717b8b54d9d3428b75a2a44d --- nova/volume/cinder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/volume/cinder.py b/nova/volume/cinder.py index 0950f4113..a0900094b 100644 --- a/nova/volume/cinder.py +++ b/nova/volume/cinder.py @@ -89,10 +89,10 @@ def _untranslate_volume_summary_view(context, vol): d['snapshot_id'] = vol.snapshot_id d['vol_metadata'] = [] - for k, v in vol.metadata: + for key, value in vol.metadata.items(): item = {} - item['key'] = k - item['value'] = v + item['key'] = key + item['value'] = value d['vol_metadata'].append(item) return d -- cgit