Revision e69d05fd lib/hypervisor/__init__.py
b/lib/hypervisor/__init__.py | ||
---|---|---|
39 | 39 |
} |
40 | 40 |
|
41 | 41 |
|
42 |
def GetHypervisor(cfg):
|
|
42 |
def GetHypervisor(ht_kind):
|
|
43 | 43 |
"""Return a Hypervisor instance. |
44 | 44 |
|
45 | 45 |
This function parses the cluster hypervisor configuration file and |
46 | 46 |
instantiates a class based on the value of this file. |
47 | 47 |
|
48 |
@param cfg: Configuration object |
|
48 |
@type ht_kind: string |
|
49 |
@param ht_kind: The requested hypervisor type |
|
49 | 50 |
|
50 | 51 |
""" |
51 |
ht_kind = cfg.GetHypervisorType() |
|
52 |
|
|
53 | 52 |
if ht_kind not in _HYPERVISOR_MAP: |
54 | 53 |
raise errors.HypervisorError("Unknown hypervisor type '%s'" % ht_kind) |
55 | 54 |
|
Also available in: Unified diff