Added cpu_info report to HyperV Compute driver

It fixes bug 1082275

The current version of the HyperV Compute driver wasn't returning
CPU information when it reported its resources.

In order to solve it, this patch extracts the cpu properties
from WMI and Win32 calls.

Change-Id: I5c2a89b5e432f4e958354a15582258d4cff83658
This commit is contained in:
Luis Fernandez Alvarez 2012-11-23 09:46:52 +01:00
parent 9bc12d301b
commit 96967ed6f4
6 changed files with 3 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
fake_image.stub_out_image_service(self.stubs) fake_image.stub_out_image_service(self.stubs)
fake_network.stub_out_nw_api_get_instance_nw_info(self.stubs) fake_network.stub_out_nw_api_get_instance_nw_info(self.stubs)
def fake_dumps(msg): def fake_dumps(msg, default=None, **kwargs):
return '""' return '""'
self.stubs.Set(json, 'dumps', fake_dumps) self.stubs.Set(json, 'dumps', fake_dumps)
@ -108,7 +108,8 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
'multiprocessing', 'multiprocessing',
'_winreg', '_winreg',
'nova.virt.configdrive', 'nova.virt.configdrive',
'nova.utils' 'nova.utils',
'ctypes'
] ]
# Modules in which the mocks are going to be injected # Modules in which the mocks are going to be injected