def GetInstanceListForHypervisor(hname, hvparams=None,
                                 get_hv_fn=hypervisor.GetHypervisor):
  try:
    return get_hv_fn(hname).ListInstances(hvparams=hvparams)
  except errors.HypervisorError, err:
    _Fail("Error enumerating instances (hypervisor %s): %s",
          hname, err, exc=True)
Provides a list of instances of the given hypervisor.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/GetInstanceListForHypervisor