def discoverhostparams():
command_host_name = utils.hostnameCmdPath.cmd
result_dict = {}
resultString = ""
hostname = commands.getoutput(command_host_name)
result_dict['hostname'] = hostname
resultString = json.dumps(result_dict)
print resultString
sys.exit(utils.PluginStatusCode.OK)
###
# This plugin discovers all the host specific parameters
# Currently it gets only the hostname from the node
# but when we add support for discovering physical
# components like cpu,network,disk etc, all those will be
# addded as part of this module
###
discoverhostparams.py 文件源码
python
阅读 15
收藏 0
点赞 0
评论 0
评论列表
文章目录