ctrlapi.py 文件源码

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

项目:tool 作者: PathDump 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号