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
评论列表
文章目录