fix for BUG-709 - mixed up flow cookie and connection cookie 60/6260/2
authorMichal Rehak <mirehak@cisco.com>
Thu, 17 Apr 2014 15:15:59 +0000 (17:15 +0200)
committerMichal Rehak <mirehak@cisco.com>
Wed, 23 Apr 2014 11:44:45 +0000 (13:44 +0200)
- flow cookie [64b] is present at receivedPacket (to distinguish responsible flow)
- connection cookie [32b] is present at receivedPacket and is expected
  to be copied into corresponding transmitPacketInput (to distinguish auxiliary connection)
- offtopic: felix generated META-INF moved to target (drop-test, test-provider)
- hotfix - InstanceIdentifier API changes adaptation

requires controller change: https://git.opendaylight.org/gerrit/#/c/6259/

Change-Id: I76d30ba6ba16bf6ac57977288ee30ab059c12659
Signed-off-by: Michal Rehak <mirehak@cisco.com>
16 files changed:
drop-test/pom.xml
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestCommiter.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestRpcSender.java
drop-test/src/main/java/org/opendaylight/openflowplugin/outputtest/OutputTestCommandProvider.java
drop-test/src/main/java/org/opendaylight/openflowplugin/outputtest/OutputTestUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/ModelDrivenSwitchImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/FlowConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/FlowStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/FlowRemovedTranslator.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/translator/PacketInTranslator.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/InventoryDataServiceUtil.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/LearningSwitchHandlerSimpleImpl.java
test-provider/pom.xml
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index a156f625e93eb3390f93b90fbe515e61f62a8441..03daaf21ef2750ac615e2c57ce6772baaf7eb9eb 100644 (file)
@@ -68,7 +68,6 @@
                         <Embed-Dependency>commons-lang</Embed-Dependency>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                     </instructions>
-                    <manifestLocation>${project.basedir}/META-INF</manifestLocation>
                 </configuration>
             </plugin>
         </plugins>
index 1b645c21022c3c486e79ad1010e79cbca294d3f5..1726cedfb04f360b39e359472a36069c6aed3824 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
@@ -129,8 +130,8 @@ public class DropTestCommiter implements PacketProcessingListener {
         fb.setPriority(4);
         fb.setBufferId(0L);
         final BigInteger value = new BigInteger("10", 10);
-        fb.setCookie(value);
-        fb.setCookieMask(value);
+        fb.setCookie(new FlowCookie(value));
+        fb.setCookieMask(new FlowCookie(value));
 
         fb.setTableId(Short.valueOf(((short) 0)));
         fb.setHardTimeout(300);
index c05077eda90124d1137764b84af2dd01497dacaa..a9d8dc43a1236ea61d357bb8f2a186261e0dd25e 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
@@ -133,8 +134,8 @@ public class DropTestRpcSender implements PacketProcessingListener {
         fb.setPriority(4);
         fb.setBufferId(0L);
         final BigInteger value = new BigInteger("10", 10);
-        fb.setCookie(value);
-        fb.setCookieMask(value);
+        fb.setCookie(new FlowCookie(value));
+        fb.setCookieMask(new FlowCookie(value));
         fb.setTableId(Short.valueOf(((short) 0)));
         fb.setHardTimeout(300);
         fb.setIdleTimeout(240);
index de52411d232d26410496667900827e1020ae2dd6..a3dc93946dc06ad10376740bda2b8a29ce90beb4 100644 (file)
@@ -133,7 +133,7 @@ public class OutputTestCommandProvider implements CommandProvider {
             ab.setKey(new ActionKey(0));
             actionList.add(ab.build());
 
-            packet_out.setCookie(null);
+            packet_out.setConnectionCookie(null);
             packet_out.setAction(actionList);
             packet_out.setPayload(_primitive);
             packet_out.setNode(ref);
index 975e0942b042ba778482e04145b3e41c8557a999..ef6132d1d27f753bfbc8381a27a3932514d7974f 100644 (file)
@@ -30,6 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
@@ -88,7 +89,7 @@ public class OutputTestUtil {
 
         tPackBuilder.setNode(ref);
         // TODO VD P2 missing cookies in Test
-        tPackBuilder.setCookie(null);
+        tPackBuilder.setConnectionCookie(null);
         tPackBuilder.setEgress(nEgressConfRef);
         tPackBuilder.setIngress(nIngressConRef);
         return tPackBuilder.build();
@@ -164,8 +165,8 @@ public class OutputTestUtil {
         fBuild.setBarrier(false);
         // flow.setBufferId(new Long(12));
         BigInteger value = new BigInteger("10", 10);
-        fBuild.setCookie(value);
-        fBuild.setCookieMask(value);
+        fBuild.setCookie(new FlowCookie(value));
+        fBuild.setCookieMask(new FlowCookie(value));
         fBuild.setHardTimeout(0);
         fBuild.setIdleTimeout(0);
         fBuild.setInstallHw(false);
index 5d64e284e68c9f0e76259c64fb06121093d81530..0ffddbe2baf6c8f234d329289d94a30320df16e4 100644 (file)
@@ -558,7 +558,7 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
 
     private FlowModInputBuilder toFlowModInputBuilder(Flow source) {
         FlowModInputBuilder target = new FlowModInputBuilder();
-        target.setCookie(source.getCookie());
+        target.setCookie(source.getCookie().getValue());
         target.setIdleTimeout(source.getIdleTimeout());
         target.setHardTimeout(source.getHardTimeout());
         target.setMatch(toMatch(source.getMatch()));
@@ -1448,12 +1448,12 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
             mprFlowRequestBuilder.setOutGroup(OFConstants.OFPG_ANY);
 
         if (arg0.getCookie() != null)
-            mprFlowRequestBuilder.setCookie(arg0.getCookie());
+            mprFlowRequestBuilder.setCookie(arg0.getCookie().getValue());
         else
             mprFlowRequestBuilder.setCookie(OFConstants.DEFAULT_COOKIE);
 
         if (arg0.getCookieMask() != null)
-            mprFlowRequestBuilder.setCookieMask(arg0.getCookieMask());
+            mprFlowRequestBuilder.setCookieMask(arg0.getCookieMask().getValue());
         else
             mprFlowRequestBuilder.setCookieMask(OFConstants.DEFAULT_COOKIE_MASK);
 
@@ -1556,8 +1556,8 @@ public class ModelDrivenSwitchImpl extends AbstractModelDrivenSwitch {
                 this.getSessionContext().getFeatures().getDatapathId());
         // TODO: repeating code
         if (version == OFConstants.OFP_VERSION_1_3) {
-            mprAggregateRequestBuilder.setCookie(arg0.getCookie());
-            mprAggregateRequestBuilder.setCookieMask(arg0.getCookieMask());
+            mprAggregateRequestBuilder.setCookie(arg0.getCookie().getValue());
+            mprAggregateRequestBuilder.setCookieMask(arg0.getCookieMask().getValue());
             mprAggregateRequestBuilder.setOutGroup(arg0.getOutGroup());
         }
 
index 562a67451b9431b5a96c5b31ffdbfba53f4abe3b..ee7d66eab1f6710fb45d0159c7f38b3825975ec1 100644 (file)
@@ -93,7 +93,7 @@ public class FlowConvertor {
     public static FlowModInputBuilder toFlowModInput(Flow flow, short version,BigInteger datapathid) {
         FlowModInputBuilder flowMod = new FlowModInputBuilder();
         if (flow.getCookie() != null) {
-            flowMod.setCookie(flow.getCookie());
+            flowMod.setCookie(flow.getCookie().getValue());
         } else {
             flowMod.setCookie(DEFAULT_COOKIE);
         }
index 63458723a7c596dfa2c832f584ec366ae15f512f..4dbcd265bf214c2e487e4aec70d78d09df2206cf 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.Counter64;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.duration.DurationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.multipart.reply.flow.FlowStats;
@@ -54,7 +55,7 @@ public class FlowStatsResponseConvertor {
     public FlowAndStatisticsMapList toSALFlowStats(FlowStats flowStats,BigInteger datapathid){
         FlowAndStatisticsMapListBuilder salFlowStatsBuilder = new FlowAndStatisticsMapListBuilder();
         salFlowStatsBuilder.setByteCount(new Counter64(flowStats.getByteCount()));
-        salFlowStatsBuilder.setCookie(flowStats.getCookie());
+        salFlowStatsBuilder.setCookie(new FlowCookie(flowStats.getCookie()));
 
         DurationBuilder time = new DurationBuilder();
         time.setSecond(new Counter32(flowStats.getDurationSec()));
index 3bf76a1773c3d77f42b443f4d247a7b9a7fff893..e70743603e34eba44e00284607ecf4edea34235f 100644 (file)
@@ -30,6 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemovedBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.RemovedReasonFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.mod.removed.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.mod.removed.MatchBuilder;
@@ -148,7 +149,7 @@ public class FlowRemovedTranslator implements IMDMessageTranslator<OfHeader, Lis
 
             SwitchFlowRemovedBuilder salFlowRemoved = new SwitchFlowRemovedBuilder();
 
-            salFlowRemoved.setCookie(ofFlow.getCookie());
+            salFlowRemoved.setCookie(new FlowCookie(ofFlow.getCookie()));
             salFlowRemoved.setPriority(ofFlow.getPriority());
 
             if (ofFlow.getTableId() != null) {
index 1200fde81884f206939ce052e5deb59ef3e22056..245ecb5b095609d239b46b9d37c5f249a504a718 100644 (file)
@@ -18,13 +18,13 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.Matc
 import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
 import org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil;
 import org.opendaylight.openflowplugin.openflow.md.util.PacketInUtil;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.PortNumberMatchEntry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.Cookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceivedBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.packet.received.MatchBuilder;
@@ -65,8 +65,10 @@ public class PacketInTranslator implements IMDMessageTranslator<OfHeader, List<D
     
                // get the Cookie if it exists
                if(message.getCookie() != null) {
-                   pktInBuilder.setCookie(new Cookie(message.getCookie().longValue()));
+                   pktInBuilder.setFlowCookie(new FlowCookie(message.getCookie()));
                }
+               //TODO: use either canonical mapping or suitable hash -> 32b
+               //pktInBuilder.setConnectionCookie(cookie);
     
                // extract the port number
                Long port = null;
index efb6848cb1626d79e3004d13c99c1442f9856146..7aadc6c12f716203ef2318b86e78a4a98e24bc32 100644 (file)
@@ -36,7 +36,7 @@ public class InventoryDataServiceUtil {
      * Get an InstanceIdentifier for the Nodes class that is the root of the
      * inventory tree We use this alot, so its worth keeping around
      */
-    private static InstanceIdentifier<Nodes> nodesIdentifier = InstanceIdentifier.builder().node(Nodes.class)
+    private static InstanceIdentifier<Nodes> nodesIdentifier = InstanceIdentifier.builder(Nodes.class)
             .toInstance();
 
     public static Nodes checkForNodes() {
index 080f6d1ff4c1e8b8a008693f4c8fbcd0e8fccebd..88fdcffe92c861a073d9425ba6c353021241d355 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
@@ -211,7 +212,7 @@ public class LearningSwitchHandlerSimpleImpl implements LearningSwitchHandler, P
                 Short tableId = InstanceIdentifierUtils.getTableId(tablePath);
                 FlowBuilder srcToDstFlow = FlowUtils.createDirectMacToMacFlow(tableId, DIRECT_FLOW_PRIORITY, srcMac,
                         dstMac, destNodeConnector);
-                srcToDstFlow.setCookie(BigInteger.valueOf(flowCookieInc.getAndIncrement()));
+                srcToDstFlow.setCookie(new FlowCookie(BigInteger.valueOf(flowCookieInc.getAndIncrement())));
 
                 dataStoreAccessor.writeFlowToConfig(flowPath, srcToDstFlow.build());
             }
index c094c43a40a00fe9668563c6dff38c00bc9443fe..7ace9785575f2ba09847bbc225e4598b8070e9a2 100644 (file)
@@ -74,7 +74,6 @@
                         <Embed-Dependency>commons-lang</Embed-Dependency>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                     </instructions>
-                    <manifestLocation>${project.basedir}/META-INF</manifestLocation>
                 </configuration>
             </plugin>
             <plugin>
index 2c00a586edc99584fcedab829812f801af6ae666..9e670fe58464a7f9092cda9baeb92740f67718e7 100644 (file)
@@ -53,6 +53,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.Fl
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
@@ -143,7 +144,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
     private static NodeRef createNodeRef(String string) {
         NodeKey key = new NodeKey(new NodeId(string));
-        InstanceIdentifier<Node> path = InstanceIdentifier.builder().node(Nodes.class).node(Node.class, key)
+        InstanceIdentifier<Node> path = InstanceIdentifier.builder(Nodes.class).child(Node.class, key)
                 .toInstance();
 
         return new NodeRef(path);
@@ -543,8 +544,8 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         // flow.setBufferId(new Long(12));
         BigInteger value = new BigInteger("10", 10);
         BigInteger outputPort = new BigInteger("4294967295", 10);
-        flow.setCookie(value);
-        flow.setCookieMask(value);
+        flow.setCookie(new FlowCookie(value));
+        flow.setCookieMask(new FlowCookie(value));
         flow.setHardTimeout(0);
         flow.setIdleTimeout(0);
         flow.setInstallHw(false);
index 824a9ba3ac333b3e8f00f9b09f518d138d6ebda7..05ae9ec2e819bd7e939a96a1007a504b5d14745c 100644 (file)
@@ -65,6 +65,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.OutputPortValues;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
@@ -153,7 +154,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
 
     private static NodeRef createNodeRef(String string) {
         NodeKey key = new NodeKey(new NodeId(string));
-        InstanceIdentifier<Node> path = InstanceIdentifier.builder().node(Nodes.class).node(Node.class, key)
+        InstanceIdentifier<Node> path = InstanceIdentifier.builder(Nodes.class).child(Node.class, key)
                 .toInstance();
 
         return new NodeRef(path);
@@ -412,8 +413,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         // flow.setBufferId(new Long(12));
         BigInteger value = new BigInteger("10", 10);
         BigInteger outputPort = new BigInteger("4294967295", 10);
-        flow.setCookie(value);
-        flow.setCookieMask(value);
+        flow.setCookie(new FlowCookie(value));
+        flow.setCookieMask(new FlowCookie(value));
         flow.setHardTimeout(0);
         flow.setIdleTimeout(0);
         flow.setInstallHw(false);
index a36d4716d13c109cd122512160cc906260126a15..3f2ecb7f1a1d22966d27b59ac5da34857cf5d13f 100644 (file)
@@ -116,6 +116,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.ta
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.OutputPortValues;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
@@ -658,8 +659,8 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         // flow.setBufferId(new Long(12));
         BigInteger value = new BigInteger("10", 10);
         // BigInteger outputPort = new BigInteger("65535", 10);
-        flow.setCookie(value);
-        flow.setCookieMask(value);
+        flow.setCookie(new FlowCookie(value));
+        flow.setCookieMask(new FlowCookie(value));
         flow.setHardTimeout(0);
         flow.setIdleTimeout(0);
         flow.setInstallHw(false);
@@ -3133,7 +3134,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
 
     private static NodeRef createNodeRef(String string) {
         NodeKey key = new NodeKey(new NodeId(string));
-        InstanceIdentifier<Node> path = InstanceIdentifier.builder().node(Nodes.class).node(Node.class, key)
+        InstanceIdentifier<Node> path = InstanceIdentifier.builder(Nodes.class).child(Node.class, key)
                 .toInstance();
 
         return new NodeRef(path);