def properties(self):
"""Returns less volatile node data suitable for host validation.
If the fetched property is expensive to compute, it should be cached / updated less frequently.
"""
zfs_not_installed, stdout, stderr = AgentShell.run_old(['which', 'zfs'])
return {'zfs_installed': not zfs_not_installed,
'distro': platform.linux_distribution()[0],
'distro_version': float('.'.join(platform.linux_distribution()[1].split('.')[:2])),
'python_version_major_minor': float("%s.%s" % (platform.python_version_tuple()[0],
platform.python_version_tuple()[1])),
'python_patchlevel': int(platform.python_version_tuple()[2]),
'kernel_version': platform.release()}
评论列表
文章目录