diff options
| author | Jim Fehlig <jfehlig@suse.com> | 2013-05-01 12:35:35 -0600 |
|---|---|---|
| committer | Jim Fehlig <jfehlig@suse.com> | 2013-05-02 11:42:31 -0600 |
| commit | 7e86ab000e5b897d3b7fac6aca0c11f4db51ef7d (patch) | |
| tree | 2f219b209b6d1655495f3e9a9e895884aad581f8 | |
| parent | 423289d50d92cf4b780a11c2c3da4e1dbbd865f2 (diff) | |
| download | nova-7e86ab000e5b897d3b7fac6aca0c11f4db51ef7d.tar.gz nova-7e86ab000e5b897d3b7fac6aca0c11f4db51ef7d.tar.xz nova-7e86ab000e5b897d3b7fac6aca0c11f4db51ef7d.zip | |
vmwareapi: Add supported_instances to host state
The VMWareVCDriver uses the VCState class to report host state,
but VCState.update_status() does not include supported_instances.
Add supported_instances to the data returned by update_status(),
similar to HostState.update_status().
Change-Id: I15c0f930dd9e540f6fdb0d7246661a0c98e35ed4
| -rw-r--r-- | nova/tests/test_vmwareapi.py | 3 | ||||
| -rw-r--r-- | nova/virt/vmwareapi/host.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/nova/tests/test_vmwareapi.py b/nova/tests/test_vmwareapi.py index 60f7db72c..dbf7f73af 100644 --- a/nova/tests/test_vmwareapi.py +++ b/nova/tests/test_vmwareapi.py @@ -362,6 +362,9 @@ class VMwareAPIHostTestCase(test.TestCase): self.assertEquals(stats['disk_used'], 1024 - 500) self.assertEquals(stats['host_memory_total'], 1024) self.assertEquals(stats['host_memory_free'], 1024 - 500) + supported_instances = [('i686', 'vmware', 'hvm'), + ('x86_64', 'vmware', 'hvm')] + self.assertEquals(stats['supported_instances'], supported_instances) def _test_host_action(self, method, action, expected=None): result = method('host', action) diff --git a/nova/virt/vmwareapi/host.py b/nova/virt/vmwareapi/host.py index 95d86311c..8c62c5ce9 100644 --- a/nova/virt/vmwareapi/host.py +++ b/nova/virt/vmwareapi/host.py @@ -202,6 +202,8 @@ class VCState(object): data["hypervisor_type"] = summary.config.product.name data["hypervisor_version"] = summary.config.product.version data["hypervisor_hostname"] = self._host_name + data["supported_instances"] = [('i686', 'vmware', 'hvm'), + ('x86_64', 'vmware', 'hvm')] self._stats = data return data |
