示例#1
0
def api_nodes():
    '''
    Returns list of nodes
    '''
    return jsonify(MasterStatus().get_hosts())
示例#2
0
def api_status():
    '''
    Fetches status info
    '''
    return jsonify(MasterStatus().get_status())
示例#3
0
def api_shutdown_node(node):
    '''
    Shutdown one node
    '''
    return jsonify(MasterStatus().shutdown(node))
示例#4
0
def api_reboot_node(node):
    '''
    Reboot one node
    '''
    return jsonify(MasterStatus().reboot(node))
示例#5
0
def api_shutdown():
    '''
    Shutdown all nodes
    '''
    return jsonify(MasterStatus().shutdown())
示例#6
0
def api_reboot():
    '''
    Reboot all nodes
    '''
    return jsonify(MasterStatus().reboot())
示例#7
0
def api_debug_by_node(node):
    '''
    Fetches status info with debug info for one node
    '''
    return jsonify(MasterStatus().get_status(node), True)
示例#8
0
def api_status_by_node(node):
    '''
    Fetches status info for one node
    '''
    return jsonify(MasterStatus().get_status(node))
示例#9
0
def api_status_line_by_node(line_type, node):
    '''
    Fetches status info for one node
    '''
    return jsonify(MasterStatus().get_status_line(line_type, node))
示例#10
0
def api_status_lines():
    '''
    Fetches status info for one node
    '''
    return jsonify(MasterStatus().get_status_line())
示例#11
0
def api_status_debug():
    '''
    Fetches status info with debug info
    '''
    return jsonify(MasterStatus().get_status(True))