summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-09 16:13:17 +0000
committerGerrit Code Review <review@openstack.org>2015-04-09 16:13:17 +0000
commitc99d7ab0384d9b7bbcc78c9cf6086aac9baaee6b (patch)
treeed8c4388cf4064a52f2e8dc8af9c486b374b198e
parent74ca660ab688e15ccd59ddfbfcdc9e1cecdc553d (diff)
parent88a383571d28eca2fb2f81f20f78f4d6e3bf9281 (diff)
downloadnova-c99d7ab0384d9b7bbcc78c9cf6086aac9baaee6b.tar.gz
Merge "add ironic hypervisor type"
-rw-r--r--nova/compute/hv_type.py2
-rw-r--r--nova/scheduler/ironic_host_manager.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/nova/compute/hv_type.py b/nova/compute/hv_type.py
index 92cb980b90..22e32b2751 100644
--- a/nova/compute/hv_type.py
+++ b/nova/compute/hv_type.py
@@ -31,6 +31,7 @@ BAREMETAL = "baremetal"
BHYVE = "bhyve"
FAKE = "fake"
HYPERV = "hyperv"
+IRONIC = "ironic"
KQEMU = "kqemu"
KVM = "kvm"
LXC = "lxc"
@@ -50,6 +51,7 @@ ALL = (
BHYVE,
FAKE,
HYPERV,
+ IRONIC,
KQEMU,
KVM,
LXC,
diff --git a/nova/scheduler/ironic_host_manager.py b/nova/scheduler/ironic_host_manager.py
index d30a1bee6b..664ecbf40e 100644
--- a/nova/scheduler/ironic_host_manager.py
+++ b/nova/scheduler/ironic_host_manager.py
@@ -26,6 +26,7 @@ from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import timeutils
+from nova.compute import hv_type
from nova.scheduler import host_manager
host_manager_opts = [
@@ -106,7 +107,7 @@ class IronicHostManager(host_manager.HostManager):
def host_state_cls(self, host, node, **kwargs):
"""Factory function/property to create a new HostState."""
compute = kwargs.get('compute')
- if compute and compute.get('hypervisor_type') == 'ironic':
+ if compute and compute.get('hypervisor_type') == hv_type.IRONIC:
return IronicNodeState(host, node, **kwargs)
else:
return host_manager.HostState(host, node, **kwargs)