node.py 文件源码

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

项目:intel-manager-for-lustre 作者: intel-hpdd 项目源码 文件源码
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()}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号