kvm.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:ops 作者: xiaomatech 项目源码 文件源码
def __connect_tcp(self):
        flags = [libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE]
        auth = [flags, self.__libvirt_auth_credentials_callback, None]
        uri = 'qemu+tcp://%s/system' % self.host

        try:
            self.connection = libvirt.openAuth(uri, auth, 0)
            self.last_error = None

        except libvirtError as e:
            self.last_error = 'Connection Failed: ' + str(e)
            log_error(self.last_error)
            self.connection = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号