diff options
| author | Dan Prince <dprince@redhat.com> | 2012-08-07 08:48:31 -0400 |
|---|---|---|
| committer | Dan Prince <dprince@redhat.com> | 2012-08-07 09:14:44 -0400 |
| commit | 79a2ea2f5f83dc401d089e357bf35dbdfb8be959 (patch) | |
| tree | 993dabcca7860adbc2fb1c7d9a517c8151899afd /nova/virt | |
| parent | 5f983299a31056f20a03e8acf5418360977a2111 (diff) | |
Update vmops to access metadata as dict.
Updates the inject_instance_metadata in xenapi/vmops.py so
that it accesses metadata as a dict instead of an object.
This resolves issues causing exceptions when booting instances
on XenServer.
Fixes LP Bug #1033963
Change-Id: I58810764abd32d9d292f8282b54c126bf1f4de18
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/xenapi/vmops.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index a61659eab..8d443f498 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -852,8 +852,8 @@ class VMOps(object): """Inject instance metadata into xenstore.""" def store_meta(topdir, data_list): for item in data_list: - key = self._sanitize_xenstore_key(item.key) - value = item.value or '' + key = self._sanitize_xenstore_key(item['key']) + value = item['value'] or '' self._add_to_param_xenstore(vm_ref, '%s/%s' % (topdir, key), jsonutils.dumps(value)) |
