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
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