def execQuery (tree, query, aggcode=None):
hosts = check_source (tree, query['name'])
if send_source (hosts, tree, query['name']) == False:
return []
if aggcode:
hosts = check_source (tree, aggcode['name'])
if send_source (hosts, tree, aggcode['name']) == False:
return []
req = buildReq ('execQuery', tree, query, aggcode)
resp, content = r.get (controller, json.dumps (req, default=json_util.default), "pathdump")
if resp['status'] != '200':
return []
else:
return json.loads (content, object_hook=json_util.object_hook)
评论列表
文章目录