- mprInput.setMultipartRequestBody(multipartRequestTableCaseBuilder.build());
- return StatisticsServiceUtil.getRpcResultListenableFuture(xid, mprInput.build(), getDeviceContext());
+ final List<FlowTableAndStatisticsMap> salFlowStats = new ArrayList<>();
+ notification.setFlowTableAndStatisticsMap(salFlowStats);
+ for (MultipartReply mpReply : mpReplyList) {
+ MultipartReplyTableCase caseBody = (MultipartReplyTableCase) mpReply.getMultipartReplyBody();
+ MultipartReplyTable replyBody = caseBody.getMultipartReplyTable();
+ List<TableStats> swTablesStats = replyBody.getTableStats();
+
+ for (TableStats swTableStats : swTablesStats) {
+ FlowTableAndStatisticsMapBuilder statisticsBuilder = new FlowTableAndStatisticsMapBuilder();
+ statisticsBuilder.setActiveFlows(new Counter32(swTableStats.getActiveCount()));
+ statisticsBuilder.setPacketsLookedUp(new Counter64(swTableStats.getLookupCount()));
+ statisticsBuilder.setPacketsMatched(new Counter64(swTableStats.getMatchedCount()));
+ statisticsBuilder.setTableId(new TableId(swTableStats.getTableId()));
+ salFlowStats.add(statisticsBuilder.build());