

def get_active_domains(self):
    vms = []
    for host in self.hosts:
        conn = host['conn']
        ids = conn.listDomainsID()
        for id in ids:
            dom = conn.lookupByID(id)
            vms.append({
                'name': dom.name(),
                'state': 'running',
                'host': host['name'],
            })
    return vms

dataset/ETHPy150Open mizzy/maglica/maglica/virt.py Virt.get_active_domains/original