Cookie value is ignored while converting OF Flow statistics to SAL statistics 28/1228/1
authorAlessandro Boch <aboch@cisco.com>
Tue, 17 Sep 2013 15:34:53 +0000 (08:34 -0700)
committerAlessandro Boch <aboch@cisco.com>
Tue, 17 Sep 2013 15:36:36 +0000 (08:36 -0700)
Change-Id: Ia47d4e673fee0e247b49b45ae5ce55bdb387f7fe
Signed-off-by: Alessandro Boch <aboch@cisco.com>
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowStatisticsConverter.java
opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/FlowProgrammerService.java

index 82dbf670a9517ee1b998442f2d524f37628f5815..6873b528a2631f2d01480387f46be430e58b57c0 100644 (file)
@@ -59,6 +59,7 @@ public class FlowStatisticsConverter {
                     flow.setPriority(ofFlowStat.getPriority());
                     flow.setIdleTimeout(ofFlowStat.getIdleTimeout());
                     flow.setHardTimeout(ofFlowStat.getHardTimeout());
+                    flow.setId(ofFlowStat.getCookie());
                     flowOnNode = new FlowOnNode(flow);
                     flowOnNode.setByteCount(ofFlowStat.getByteCount());
                     flowOnNode.setPacketCount(ofFlowStat.getPacketCount());
@@ -74,6 +75,7 @@ public class FlowStatisticsConverter {
                     flow.setPriority(v6StatsReply.getPriority());
                     flow.setIdleTimeout(v6StatsReply.getIdleTimeout());
                     flow.setHardTimeout(v6StatsReply.getHardTimeout());
+                    flow.setId(v6StatsReply.getCookie());
                     flowOnNode = new FlowOnNode(flow);
                     flowOnNode.setByteCount(v6StatsReply.getByteCount());
                     flowOnNode.setPacketCount(v6StatsReply.getPacketCount());
index a7bdb9da8bf32072b73b45a3128b412b9f18f88a..854125b3567a196b940556363ed56c82e99d50c0 100644 (file)
@@ -432,6 +432,7 @@ public class FlowProgrammerService implements IFlowProgrammerService,
         Flow flow = new Flow(match, actions);
         flow.setPriority((short) 100);
         flow.setHardTimeout((short) 360);
+        flow.setId(1234L);
 
         return flow;
     }
@@ -489,6 +490,7 @@ public class FlowProgrammerService implements IFlowProgrammerService,
         Flow flow = new Flow(match, actions);
         flow.setPriority((short) 300);
         flow.setHardTimeout((short) 240);
+        flow.setId(65536L);
 
         return flow;
     }