- private void sendAggregateFlowsStatsFromAllTablesRequest(NodeKey targetNodeKey) throws InterruptedException, ExecutionException{
-
- List<Short> tablesId = getTablesFromNode(targetNodeKey);
-
- if(tablesId.size() != 0){
- for(Short id : tablesId){
-
- sendAggregateFlowsStatsFromTableRequest(targetNodeKey,id);
+ private void sendAggregateFlowsStatsFromAllTablesRequest(final NodeKey nodeKey) throws InterruptedException, ExecutionException{
+ FlowCapableNode node = (FlowCapableNode)dps.readOperationalData(
+ InstanceIdentifier.builder(Nodes.class).child(Node.class,nodeKey).augmentation(FlowCapableNode.class).build());
+ if (node != null) {
+ final List<Table> tables = node.getTable();
+ if (tables != null) {
+ spLogger.debug("Node {} supports {} table(s)", nodeKey, tables.size());
+ for(Table table : tables) {
+ sendAggregateFlowsStatsFromTableRequest(nodeKey, table.getId());
+ }
+ } else {
+ spLogger.debug("Node {} has no associated tables", nodeKey);