Use full instance in virt driver volume usage

Right now, the virt driver method get_all_volume_usage() returns
a list of items, including the instance uuid. In order to pass
the results of this over to conductor (which will demand a full
instance), this patch converts the structure to include it.

It appears that only libvirt implements this method, and the change
is fairly trivial.

Related to blueprint no-db-compute-manager

Change-Id: Ia8001727b57442ef0ecc2c161201f1a617e199d4
This commit is contained in:
Dan Smith
2013-01-04 08:48:03 -08:00
committed by Gerrit Code Review
parent cdc5e4efcc
commit 53bcf60b93

View File

@@ -4419,12 +4419,12 @@ class LibvirtVolumeUsageTestCase(test.TestCase):
[dict(instance=self.ins_ref, instance_bdms=self.bdms)])
expected_usage = [{'volume': 1,
'instance_id': 1,
'instance': self.ins_ref,
'rd_bytes': 688640L, 'wr_req': 0L,
'flush_operations': -1L, 'rd_req': 169L,
'wr_bytes': 0L},
{'volume': 2,
'instance_id': 1,
'instance': self.ins_ref,
'rd_bytes': 688640L, 'wr_req': 0L,
'flush_operations': -1L, 'rd_req': 169L,
'wr_bytes': 0L}]