add ironic hypervisor type

added missed hypervisor type: ironic
Closes-Bug:1436750

Change-Id: Ie66973f14c405c9ffa28a0fc6223d11d18611e20
This commit is contained in:
Vasyl Saienko 2015-03-26 14:26:56 +02:00 committed by vsaienko
parent 7f5462777b
commit 88a383571d
2 changed files with 4 additions and 1 deletions

View File

@ -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,

View File

@ -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 = [
@ -107,7 +108,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)