Revision 3707f851 lib/hypervisor/__init__.py

b/lib/hypervisor/__init__.py
23 23

  
24 24
"""
25 25

  
26
from ganeti import ssconf
27 26
from ganeti import constants
28 27
from ganeti import errors
29 28

  
......
40 39
    }
41 40

  
42 41

  
43
def GetHypervisor():
42
def GetHypervisor(cfg):
44 43
  """Return a Hypervisor instance.
45 44

  
46 45
  This function parses the cluster hypervisor configuration file and
47 46
  instantiates a class based on the value of this file.
48 47

  
48
  @param cfg: Configuration object
49

  
49 50
  """
50
  ht_kind = ssconf.SimpleStore().GetHypervisorType()
51
  ht_kind = cfg.GetHypervisorType()
51 52

  
52 53
  if ht_kind not in _HYPERVISOR_MAP:
53 54
    raise errors.HypervisorError("Unknown hypervisor type '%s'" % ht_kind)

Also available in: Unified diff