_HYPERVISOR_MAP = {
- constants.HT_XEN_PVM: hv_xen.XenPvmHypervisor,
- constants.HT_XEN_HVM: hv_xen.XenHvmHypervisor,
- constants.HT_FAKE: hv_fake.FakeHypervisor,
- constants.HT_KVM: hv_kvm.KVMHypervisor,
- }
+ constants.HT_XEN_PVM: hv_xen.XenPvmHypervisor,
+ constants.HT_XEN_HVM: hv_xen.XenHvmHypervisor,
+ constants.HT_FAKE: hv_fake.FakeHypervisor,
+ constants.HT_KVM: hv_kvm.KVMHypervisor,
+ constants.HT_CHROOT: hv_chroot.ChrootManager,
+ }
- def GetHypervisor(ht_kind):
- """Return a Hypervisor instance.
+ def GetHypervisorClass(ht_kind):
+ """Return a Hypervisor class.
- This function parses the cluster hypervisor configuration file and
- instantiates a class based on the value of this file.
+ This function returns the hypervisor class corresponding to the
+ given hypervisor name.
@type ht_kind: string
@param ht_kind: The requested hypervisor type