X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcompatibility%2Fsal-compatibility%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcompatibility%2FInventoryAndReadAdapter.xtend;h=6d209f3b172f5f90b1d075190b4be4fa31fdfb6d;hb=5a33a4fe140497f02177963131a128e4852f637a;hp=21af047c3d79a5cb2d6c2508e05f9121b119be71;hpb=d575edf655b58bb5aafd88c113ace7d41a813d7c;p=controller.git diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.xtend b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.xtend index 21af047c3d..6d209f3b17 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.xtend +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.xtend @@ -142,11 +142,11 @@ class InventoryAndReadAdapter implements IPluginInReadService, val table= it.readConfigurationData(tableRef) as Table; if(table != null){ - LOG.info("Number of flows installed in table 0 of node {} : {}",node,table.flow.size); + LOG.trace("Number of flows installed in table 0 of node {} : {}",node,table.flow.size); for(flow : table.flow){ - val adsalFlow = ToSalConversionsUtils.toFlow(flow); + val adsalFlow = ToSalConversionsUtils.toFlow(flow,node); val statsFromDataStore = flow.getAugmentation(FlowStatisticsData); if(statsFromDataStore != null){ @@ -248,7 +248,7 @@ class InventoryAndReadAdapter implements IPluginInReadService, val table= it.readConfigurationData(tableRef) as Table; if(table != null){ - LOG.info("Number of flows installed in table 0 of node {} : {}",node,table.flow.size); + LOG.trace("Number of flows installed in table 0 of node {} : {}",node,table.flow.size); for(mdsalFlow : table.flow){ if(FromSalConversionsUtils.flowEquals(mdsalFlow, MDFlowMapping.toMDSalflow(targetFlow))){ @@ -517,14 +517,14 @@ class InventoryAndReadAdapter implements IPluginInReadService, override onFlowsStatisticsUpdate(FlowsStatisticsUpdate notification) { val adsalFlowsStatistics = new ArrayList(); + val nodeRef = InstanceIdentifier.builder(Nodes).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node,new NodeKey(notification.id)).toInstance; for(flowStats : notification.flowAndStatisticsMapList){ if(flowStats.tableId == 0) - adsalFlowsStatistics.add(toFlowOnNode(flowStats)); + adsalFlowsStatistics.add(toFlowOnNode(flowStats,nodeRef.toADNode)); } for (statsPublisher : statisticsPublisher){ - val nodeRef = InstanceIdentifier.builder(Nodes).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node,new NodeKey(notification.id)).toInstance; statsPublisher.nodeFlowStatisticsUpdated(nodeRef.toADNode,adsalFlowsStatistics); } @@ -569,9 +569,9 @@ class InventoryAndReadAdapter implements IPluginInReadService, } - private static def toFlowOnNode (FlowAndStatisticsMapList flowAndStatsMap){ + private static def toFlowOnNode (FlowAndStatisticsMapList flowAndStatsMap,Node node){ - val it = new FlowOnNode(ToSalConversionsUtils.toFlow(flowAndStatsMap)); + val it = new FlowOnNode(ToSalConversionsUtils.toFlow(flowAndStatsMap,node)); byteCount = flowAndStatsMap.byteCount.value.longValue; packetCount = flowAndStatsMap.packetCount.value.longValue;