Exemple #1
0
def get():
    request_debug(r, logger)
    res = r.args.get('res')
    if res == 'host':
        result = stat_handler.hosts()
    elif res == 'cluster':
        result = stat_handler.clusters()
    else:
        result = {'example': '/api/stat?res=host'}

    return jsonify(result), CODE_OK
Exemple #2
0
def get():
    request_debug(r, logger)
    res = r.args.get('res')
    if res == 'host':
        result = stat_handler.hosts()
    elif res == 'cluster':
        result = stat_handler.clusters()
    else:
        result = {
            'example': '/api/stat?res=host'
        }

    return jsonify(result), CODE_OK