From 97f0ec7039611e4c9a7c543ea4631d7182a5ec99 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Fri, 11 Jan 2013 00:40:57 +0000 Subject: Access instance as dict, not object in xenapi get_all_bw_counters() in XenAPI was accessing instances as objects instead of dicts. Fixes bug 1098382 Change-Id: I9a783c0f403b60d392dc26a25b93683e7c145600 --- nova/virt/xenapi/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/virt') diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py index bdb73b28f..0acc360e8 100644 --- a/nova/virt/xenapi/driver.py +++ b/nova/virt/xenapi/driver.py @@ -311,7 +311,7 @@ class XenAPIDriver(driver.ComputeDriver): # we only care about VMs that correspond to a nova-managed # instance: - imap = dict([(inst.name, inst.uuid) for inst in instances]) + imap = dict([(inst['name'], inst['uuid']) for inst in instances]) bwcounters = [] # get a dictionary of instance names. values are dictionaries -- cgit