

def info(self, name):
    (dom, host) = self.get_active_domain(name)
    cmdline = ['virsh', '--connect', self.uri(host), 'vncdisplay', name]
    p = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
    out = p.stdout.readline().rstrip()
    return {
        'name': name,
        'host': host,
        'vncport': (5900 + int(out.replace(':', ''))),
    }

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