Exemplo n.º 1
0
def get_health():
    network_health = {'updateTime': int(time.time())}
    nodes_data = {}
    if globals.network is not None and globals.network.state >= globals.network.STATE_STARTED and globals.network_is_running:
        for node_id in list(globals.network.nodes):
            nodes_data[node_id] = serialization.serialize_node_to_json(node_id)
    network_health['devices'] = nodes_data
    return utils.format_json_result(data=network_health)
Exemplo n.º 2
0
def get_health():
	network_health = {'updateTime': int(time.time())}
	nodes_data = {}
	if globals.network is not None and globals.network.state >= globals.network.STATE_STARTED and globals.network_is_running:
		for node_id in list(globals.network.nodes):
			nodes_data[node_id] = serialization.serialize_node_to_json(node_id)
	network_health['devices'] = nodes_data
	return utils.format_json_result(data=network_health)
Exemplo n.º 3
0
def get_health(node_id):
    return utils.format_json_result(
        data=serialization.serialize_node_to_json(node_id))
Exemplo n.º 4
0
def get_health(node_id):
	return utils.format_json_result(data=serialization.serialize_node_to_json(node_id))