def api_nodes(): ''' Returns list of nodes ''' return jsonify(MasterStatus().get_hosts())
def api_status(): ''' Fetches status info ''' return jsonify(MasterStatus().get_status())
def api_shutdown_node(node): ''' Shutdown one node ''' return jsonify(MasterStatus().shutdown(node))
def api_reboot_node(node): ''' Reboot one node ''' return jsonify(MasterStatus().reboot(node))
def api_shutdown(): ''' Shutdown all nodes ''' return jsonify(MasterStatus().shutdown())
def api_reboot(): ''' Reboot all nodes ''' return jsonify(MasterStatus().reboot())
def api_debug_by_node(node): ''' Fetches status info with debug info for one node ''' return jsonify(MasterStatus().get_status(node), True)
def api_status_by_node(node): ''' Fetches status info for one node ''' return jsonify(MasterStatus().get_status(node))
def api_status_line_by_node(line_type, node): ''' Fetches status info for one node ''' return jsonify(MasterStatus().get_status_line(line_type, node))
def api_status_lines(): ''' Fetches status info for one node ''' return jsonify(MasterStatus().get_status_line())
def api_status_debug(): ''' Fetches status info with debug info ''' return jsonify(MasterStatus().get_status(True))