def GetWantedInstances(lu, short_inst_names):
  if short_inst_names:
    inst_uuids = [ExpandInstanceUuidAndName(lu.cfg, None, name)[0]
                  for name in short_inst_names]
  else:
    inst_uuids = lu.cfg.GetInstanceList()
  return (inst_uuids, [lu.cfg.GetInstanceName(uuid) for uuid in inst_uuids])
Create dm device for each partition of disk image.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/GetWantedInstances--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/utils/storage.py/CreateBdevPartitionMapping