def GET(self, **params):
""" Execute command on remote host. """
target = parse_params_target(params)
cmd = params.pop('cmd', None)
if cmd == None:
raise cherrypy.HTTPError(status.BAD_REQUEST, ERR_BAD_SERVPARAMS)
cmd = unquote(cmd)
result = self.handle(target, cmd)
if not result:
raise cherrypy.HTTPError(status.NOT_FOUND, ERR_NO_MATCH)
else:
return response(status.OK, result)
评论列表
文章目录