diff options
author | Phil Day <philip.day@hp.com> | 2014-09-17 17:12:25 +0000 |
---|---|---|
committer | Phil Day <philip.day@hp.com> | 2014-09-18 09:31:14 +0000 |
commit | 1a17d1719d163a360dfd02f9b124f8dc55a5fd0a (patch) | |
tree | c44582884bc0f78e28652a98fbe45b05d3846956 /nova/scheduler/ironic_host_manager.py | |
parent | d0fc69096be9de94a40e65d5e24692b0ff788802 (diff) | |
download | nova-1a17d1719d163a360dfd02f9b124f8dc55a5fd0a.tar.gz |
Add support for hypervisor type in IronicHostManager
Unlike the default HostManager the IronicHostManager doesn't pass
hypervisor attributes of the compute_node into the HostState.
Adding support for hypervisor_type makes it easy to use the
compute_capabilities filter in a combined Ironic/virt system
with a simple extra_specs value on flavors.
For completeness the following values are added:
hypervisor_type
hypervisor_version
hypervisor_version
cpu_info
supported_instances
Change-Id: I1c81bb9726597609c4e5918eb15b4f2a055e7912
Closes-Bug: #1370578
Diffstat (limited to 'nova/scheduler/ironic_host_manager.py')
-rw-r--r-- | nova/scheduler/ironic_host_manager.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/scheduler/ironic_host_manager.py b/nova/scheduler/ironic_host_manager.py index abcd28b864..4e5000d047 100644 --- a/nova/scheduler/ironic_host_manager.py +++ b/nova/scheduler/ironic_host_manager.py @@ -23,6 +23,7 @@ subdivided into multiple instances. """ from oslo.config import cfg +from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils import nova.scheduler.base_baremetal_host_manager as bbhm @@ -66,6 +67,13 @@ class IronicNodeState(bbhm.BaseBaremetalNodeState): super(IronicNodeState, self).update_from_compute_node(compute) self.total_usable_disk_gb = compute['local_gb'] + self.hypervisor_type = compute.get('hypervisor_type') + self.hypervisor_version = compute.get('hypervisor_version') + self.hypervisor_hostname = compute.get('hypervisor_hostname') + self.cpu_info = compute.get('cpu_info') + if compute.get('supported_instances'): + self.supported_instances = jsonutils.loads( + compute.get('supported_instances')) self.updated = compute['updated_at'] def consume_from_instance(self, context, instance): |