def get_host_info():
""" Returns an object with unique information about the host """
obj = {}
# uuid.getnode() can return a random number, we need to fix it
obj['uuid'] = str(uuid.uuid3(uuid.NAMESPACE_DNS, str(uuid.getnode())))
obj['host_name'] = socket.gethostname()
obj['operative_system'] = '{0}-{1}'.format(
platform.system(),
platform.release()
)
return obj
评论列表
文章目录