def __connect(self):
"""This function establishes a connection to the hypervisor."""
#create weirdo auth dict
auth = [
[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE],
self.retrieve_credentials, None
]
#authenticate
self.SESSION = libvirt.openAuth(self.URI, auth, 0)
if self.SESSION == None:
raise SessionException("Unable to establish connection to hypervisor!")
评论列表
文章目录