client.py 文件源码

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

项目:webkvmmgr 作者: crazw 项目源码 文件源码
def build_host_hw(sn, uri = "qemu:///system"):

    conn = None
    try:
        conn = libvirt.open(uri)
    except Exception, e:
        logger.exception(e)

    ret_dict = {}
    ret_dict['req'] = "host.hw"
    ret_dict['sn'] = sn

    chost = vmmhost(sn, conn)

    ret_dict['body'] = [ chost.get_hw_info() ]

    if conn:
        conn.close()

    return ret_dict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号