def _lookup(self, i):
        vms = self._conn.Msvm_ComputerSystem(ElementName=i)
        n = len(vms)
        if n == 0:
            return None
        elif n > 1:
            raise Exception(_('duplicate name found: %s') % i)
        else:
            return vms[0].ElementName
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/virt/hyperv.py/HyperVConnection._lookup/original