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)
def get_health(node_id): return utils.format_json_result( data=serialization.serialize_node_to_json(node_id))
def get_health(node_id): return utils.format_json_result(data=serialization.serialize_node_to_json(node_id))