From 79a2ea2f5f83dc401d089e357bf35dbdfb8be959 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 7 Aug 2012 08:48:31 -0400 Subject: 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 --- nova/virt/xenapi/vmops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/virt') 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)) -- cgit