def main(argv):
"""
Used to fetch the snabb instance information from the JET app.
:param argv: Arguments for the command
:return: Dictionary of instances state information
"""
try:
server = xmlrpclib.ServerProxy('http://127.0.0.1:9191', verbose=False)
output = server.lwaftr()
except Exception as e:
output = "Failed to connect to jetapp " + e.message+ " user: "+ str(os.geteuid())
print "<snabb><instance><rpc_error>"+output+"</rpc_error></instance></snabb>"
return
if (output != None):
snabb_state(output)
else:
print "<snabb><instance><rpc_error>"+output+"</rpc_error></instance></snabb>"
test_rpc_get_lwaftr_state.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录