search for: vm_conn

Displaying 1 result from an estimated 1 matches for "vm_conn".

2012 Aug 26
1
question about using openAuth with Python
...cred[0] == libvirt.VIR_CRED_AUTHNAME: cred[4] = "root" elif cred == libvirt.VIR_CRED_PASSPHRASE: cred[4] = "123456" return 0 class connection: def __init__(self, uri): self.uri = uri def open(self): auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE], authcb, None] vm_conn = libvirt.openAuth(self.uri, auth, 0); print self.uri if vm_conn == None: print 'Failed to open connection to %s' % self.uri for name in vm_conn.listDefinedDomains(): print name vm = vm_conn.lookupByName(name) if __name__ == '__main__': conn = connection('qemu+ssh://root at 1...