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