def get_active_domain(self, name):
        for host in self.hosts:
            conn = host["conn"]
            ids = conn.listDomainsID()
            for id in ids:
                dom = conn.lookupByID(id)
                if name == dom.name():
                    return (dom, host["name"])
        return (None, None)
dataset/ETHPy150Open mizzy/maglica/maglica/virt.py/Virt.get_active_domain/original