Added cubby-holes for new projects.
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFActionBsnSetTunnelDstVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFActionBsnSetTunnelDstVer10Test.java
new file mode 100644
index 0000000..328d5b7
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFActionBsnSetTunnelDstVer10Test.java
@@ -0,0 +1,66 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionBsnSetTunnelDstVer10Test {
+ OFActions factory;
+
+ final static byte[] ACTION_BSN_SET_TUNNEL_DST_SERIALIZED =
+ new byte[] { (byte) 0xff, (byte) 0xff, 0x0, 0x10, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_BSN_SET_TUNNEL_DST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionBsnSetTunnelDst actionBsnSetTunnelDst = OFActionBsnSetTunnelDstVer10.READER.readFrom(input);
+ assertEquals(ACTION_BSN_SET_TUNNEL_DST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionBsnSetTunnelDst.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_BSN_SET_TUNNEL_DST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFDescStatsReplyVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFDescStatsReplyVer10Test.java
new file mode 100644
index 0000000..8b95216
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFDescStatsReplyVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFDescStatsReplyVer10Test {
+ OFFactory factory;
+
+ final static byte[] DESC_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x1, 0x11, 0x4, 0x2c, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x1, 0x54, 0x68, 0x65, 0x20, 0x49, 0x6e, 0x64, 0x69, 0x67, 0x6f, 0x2d, 0x32, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x6e, 0x64, 0x69, 0x67, 0x6f, 0x2d, 0x32, 0x20, 0x4c, 0x52, 0x49, 0x20, 0x70, 0x72, 0x65, 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, 0x31, 0x32, 0x33, 0x35, 0x38, 0x31, 0x33, 0x32, 0x31, 0x33, 0x34, 0x35, 0x35, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49, 0x6e, 0x64, 0x69, 0x67, 0x6f, 0x2d, 0x32, 0x20, 0x4c, 0x52, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFDescStatsReply descStatsReply = OFDescStatsReplyVer10.READER.readFrom(input);
+ assertEquals(DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ descStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(DESC_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFEchoRequestVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFEchoRequestVer10Test.java
new file mode 100644
index 0000000..1619f47
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFEchoRequestVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFEchoRequestVer10Test {
+ OFFactory factory;
+
+ final static byte[] ECHO_REQUEST_SERIALIZED =
+ new byte[] { 0x1, 0x2, 0x0, 0xb, 0x12, 0x34, 0x56, 0x78, 0x61, 0x62, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ECHO_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFEchoRequest echoRequest = OFEchoRequestVer10.READER.readFrom(input);
+ assertEquals(ECHO_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ echoRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ECHO_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowAddVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowAddVer10Test.java
new file mode 100644
index 0000000..730f325
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowAddVer10Test.java
@@ -0,0 +1,138 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.EnumSet;
+import java.util.Set;
+import com.google.common.collect.Sets;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowAddVer10Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_ADD_SERIALIZED =
+ new byte[] { 0x1, 0xe, 0x0, 0x70, 0x12, 0x34, 0x56, 0x78, 0x0, 0x30, 0x0, (byte) 0xe2, 0x0, 0x3, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x1, 0x23, 0x45, 0x67, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xc0, (byte) 0xa8, 0x3, 0x7f, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, (byte) 0xff, (byte) 0xfb, 0x0, 0x0, (byte) 0xff, (byte) 0xff, 0x0, 0x10, 0x0, 0x0, 0x23, 0x20, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, 0x0, 0x10, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowAdd.Builder builder = factory.buildFlowAdd();
+ builder.setXid(0x12345678)
+ .setMatch(
+ factory.buildMatch()
+ .setExact(MatchField.IN_PORT, OFPort.of(3))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv4)
+ .setExact(MatchField.IPV4_SRC, IPv4Address.of(0xc0a8037f))
+ .setExact(MatchField.IPV4_DST, IPv4Address.of(0xffffffff))
+ .setExact(MatchField.ETH_SRC, MacAddress.of("01:23:45:67:89:ab"))
+ .setExact(MatchField.ETH_DST, MacAddress.of("cd:ef:01:23:45:67"))
+ .build()
+ )
+ .setIdleTimeout(5)
+ .setFlags(Sets.immutableEnumSet(OFFlowModFlags.CHECK_OVERLAP))
+ .setBufferId(OFBufferId.of(0))
+ .setOutPort(OFPort.of(0)) // doesn't make that much sense, but is in the example
+ .setActions(
+ ImmutableList.of(
+ factory.actions().output(OFPort.FLOOD, 0),
+ factory.actions().niciraDecTtl(),
+ factory.actions().bsnSetTunnelDst(0)
+ )
+ );;
+ OFFlowAdd flowAdd = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_ADD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowAdd.Builder builder = factory.buildFlowAdd();
+ builder.setXid(0x12345678)
+ .setMatch(
+ factory.buildMatch()
+ .setExact(MatchField.IN_PORT, OFPort.of(3))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv4)
+ .setExact(MatchField.IPV4_SRC, IPv4Address.of(0xc0a8037f))
+ .setExact(MatchField.IPV4_DST, IPv4Address.of(0xffffffff))
+ .setExact(MatchField.ETH_SRC, MacAddress.of("01:23:45:67:89:ab"))
+ .setExact(MatchField.ETH_DST, MacAddress.of("cd:ef:01:23:45:67"))
+ .build()
+ )
+ .setIdleTimeout(5)
+ .setFlags(Sets.immutableEnumSet(OFFlowModFlags.CHECK_OVERLAP))
+ .setBufferId(OFBufferId.of(0))
+ .setOutPort(OFPort.of(0)) // doesn't make that much sense, but is in the example
+ .setActions(
+ ImmutableList.of(
+ factory.actions().output(OFPort.FLOOD, 0),
+ factory.actions().niciraDecTtl(),
+ factory.actions().bsnSetTunnelDst(0)
+ )
+ );;
+ OFFlowAdd flowAddBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowAdd flowAddRead = OFFlowAddVer10.READER.readFrom(input);
+ assertEquals(FLOW_ADD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowAddBuilt, flowAddRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowAdd flowAdd = OFFlowAddVer10.READER.readFrom(input);
+ assertEquals(FLOW_ADD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_ADD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsEntryVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsEntryVer10Test.java
new file mode 100644
index 0000000..3710ef8
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsEntryVer10Test.java
@@ -0,0 +1,143 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowStatsEntryVer10Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_STATS_ENTRY_SERIALIZED =
+ new byte[] { 0x0, 0x68, 0x3, 0x0, 0x0, 0x30, 0x0, (byte) 0xe2, 0x0, 0x3, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x1, 0x23, 0x45, 0x67, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xc0, (byte) 0xa8, 0x3, 0x7f, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x64, 0x0, 0x5, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, (byte) 0xe8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x2, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowStatsEntry.Builder builder = factory.buildFlowStatsEntry();
+ builder
+ .setTableId(TableId.of(3))
+ .setMatch(
+ factory.buildMatch()
+ .setExact(MatchField.IN_PORT, OFPort.of(3))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv4)
+ .setExact(MatchField.IPV4_SRC, IPv4Address.of(0xc0a8037f))
+ .setExact(MatchField.IPV4_DST, IPv4Address.of(0xffffffff))
+ .setExact(MatchField.ETH_SRC, MacAddress.of("01:23:45:67:89:ab"))
+ .setExact(MatchField.ETH_DST, MacAddress.of("cd:ef:01:23:45:67"))
+ .build()
+ )
+ .setDurationSec(1)
+ .setDurationNsec(2)
+ .setPriority(100)
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setCookie(U64.of(0x0123456789abcdefL))
+ .setPacketCount(U64.of(10))
+ .setByteCount(U64.of(1000))
+ .setActions(
+ ImmutableList.<OFAction>of(
+ factory.actions().output(OFPort.of(1), 0),
+ factory.actions().output(OFPort.of(2), 0)
+ )
+ );;
+ OFFlowStatsEntry flowStatsEntry = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowStatsEntry.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_STATS_ENTRY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowStatsEntry.Builder builder = factory.buildFlowStatsEntry();
+ builder
+ .setTableId(TableId.of(3))
+ .setMatch(
+ factory.buildMatch()
+ .setExact(MatchField.IN_PORT, OFPort.of(3))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv4)
+ .setExact(MatchField.IPV4_SRC, IPv4Address.of(0xc0a8037f))
+ .setExact(MatchField.IPV4_DST, IPv4Address.of(0xffffffff))
+ .setExact(MatchField.ETH_SRC, MacAddress.of("01:23:45:67:89:ab"))
+ .setExact(MatchField.ETH_DST, MacAddress.of("cd:ef:01:23:45:67"))
+ .build()
+ )
+ .setDurationSec(1)
+ .setDurationNsec(2)
+ .setPriority(100)
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setCookie(U64.of(0x0123456789abcdefL))
+ .setPacketCount(U64.of(10))
+ .setByteCount(U64.of(1000))
+ .setActions(
+ ImmutableList.<OFAction>of(
+ factory.actions().output(OFPort.of(1), 0),
+ factory.actions().output(OFPort.of(2), 0)
+ )
+ );;
+ OFFlowStatsEntry flowStatsEntryBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_STATS_ENTRY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowStatsEntry flowStatsEntryRead = OFFlowStatsEntryVer10.READER.readFrom(input);
+ assertEquals(FLOW_STATS_ENTRY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowStatsEntryBuilt, flowStatsEntryRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_STATS_ENTRY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowStatsEntry flowStatsEntry = OFFlowStatsEntryVer10.READER.readFrom(input);
+ assertEquals(FLOW_STATS_ENTRY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowStatsEntry.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_STATS_ENTRY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsReplyVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsReplyVer10Test.java
new file mode 100644
index 0000000..f4d6539
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFFlowStatsReplyVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowStatsReplyVer10Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x1, 0x11, 0x0, (byte) 0xe4, 0x0, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x0, 0x0, 0x68, 0x3, 0x0, 0x0, 0x3f, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x64, 0x0, 0x5, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, (byte) 0xe8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x2, 0x0, 0x0, 0x0, 0x70, 0x4, 0x0, 0x0, 0x3f, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x64, 0x0, 0x5, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, (byte) 0xe8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x3, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowStatsReply flowStatsReply = OFFlowStatsReplyVer10.READER.readFrom(input);
+ assertEquals(FLOW_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFHelloVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFHelloVer10Test.java
new file mode 100644
index 0000000..f2bc4af
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFHelloVer10Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFHelloVer10Test {
+ OFFactory factory;
+
+ final static byte[] HELLO_SERIALIZED =
+ new byte[] { 0x1, 0x0, 0x0, 0x8, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFHello.Builder builder = factory.buildHello();
+ builder.setXid(0x12345678);
+ OFHello hello = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ hello.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(HELLO_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFHello.Builder builder = factory.buildHello();
+ builder.setXid(0x12345678);
+ OFHello helloBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(HELLO_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFHello helloRead = OFHelloVer10.READER.readFrom(input);
+ assertEquals(HELLO_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(helloBuilt, helloRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(HELLO_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFHello hello = OFHelloVer10.READER.readFrom(input);
+ assertEquals(HELLO_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ hello.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(HELLO_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketInVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketInVer10Test.java
new file mode 100644
index 0000000..288dcd4
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketInVer10Test.java
@@ -0,0 +1,103 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPacketInVer10Test {
+ OFFactory factory;
+
+ final static byte[] PACKET_IN_SERIALIZED =
+ new byte[] { 0x1, 0xa, 0x0, 0x15, 0x12, 0x34, 0x56, 0x78, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x1, 0x0, 0x9, (byte) 0xff, (byte) 0xfe, 0x1, 0x0, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFPacketIn.Builder builder = factory.buildPacketIn();
+ builder
+ .setXid(0x12345678)
+ .setBufferId(OFBufferId.of(0xabcdef01))
+ .setTotalLen(9)
+ .setInPort(OFPort.LOCAL)
+ .setReason(OFPacketInReason.ACTION)
+ .setData(new byte[] { 0x61, 0x62, 0x63 } );;
+ OFPacketIn packetIn = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetIn.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_IN_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFPacketIn.Builder builder = factory.buildPacketIn();
+ builder
+ .setXid(0x12345678)
+ .setBufferId(OFBufferId.of(0xabcdef01))
+ .setTotalLen(9)
+ .setInPort(OFPort.LOCAL)
+ .setReason(OFPacketInReason.ACTION)
+ .setData(new byte[] { 0x61, 0x62, 0x63 } );;
+ OFPacketIn packetInBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_IN_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketIn packetInRead = OFPacketInVer10.READER.readFrom(input);
+ assertEquals(PACKET_IN_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(packetInBuilt, packetInRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_IN_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketIn packetIn = OFPacketInVer10.READER.readFrom(input);
+ assertEquals(PACKET_IN_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetIn.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_IN_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketOutVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketOutVer10Test.java
new file mode 100644
index 0000000..b8d5074
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPacketOutVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPacketOutVer10Test {
+ OFFactory factory;
+
+ final static byte[] PACKET_OUT_SERIALIZED =
+ new byte[] { 0x1, 0xd, 0x0, 0x23, 0x12, 0x34, 0x56, 0x78, (byte) 0xab, (byte) 0xcd, (byte) 0xef, 0x1, (byte) 0xff, (byte) 0xfe, 0x0, 0x10, 0x0, 0x0, 0x0, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x2, 0x0, 0x0, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_OUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketOut packetOut = OFPacketOutVer10.READER.readFrom(input);
+ assertEquals(PACKET_OUT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetOut.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_OUT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortDescVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortDescVer10Test.java
new file mode 100644
index 0000000..9d6378b
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortDescVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPortDescVer10Test {
+ OFFactory factory;
+
+ final static byte[] PORT_DESC_SERIALIZED =
+ new byte[] { (byte) 0xff, (byte) 0xfd, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PORT_DESC_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPortDesc portDesc = OFPortDescVer10.READER.readFrom(input);
+ assertEquals(PORT_DESC_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ portDesc.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PORT_DESC_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortModVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortModVer10Test.java
new file mode 100644
index 0000000..7ccbc4b
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortModVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPortModVer10Test {
+ OFFactory factory;
+
+ final static byte[] PORT_MOD_SERIALIZED =
+ new byte[] { 0x1, 0xf, 0x0, 0x20, 0x0, 0x0, 0x0, 0x2, (byte) 0xff, (byte) 0xfd, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, (byte) 0x90, (byte) 0xab, (byte) 0xcd, (byte) 0xef, (byte) 0xff, 0x11, (byte) 0xff, 0x11, (byte) 0xca, (byte) 0xfe, 0x67, (byte) 0x89, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PORT_MOD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPortMod portMod = OFPortModVer10.READER.readFrom(input);
+ assertEquals(PORT_MOD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ portMod.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PORT_MOD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatsReplyVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatsReplyVer10Test.java
new file mode 100644
index 0000000..03fa8b2
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatsReplyVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPortStatsReplyVer10Test {
+ OFFactory factory;
+
+ final static byte[] PORT_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x1, 0x11, 0x0, (byte) 0xdc, 0x0, 0x0, 0x0, 0x5, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, (byte) 0xff, (byte) 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PORT_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPortStatsReply portStatsReply = OFPortStatsReplyVer10.READER.readFrom(input);
+ assertEquals(PORT_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ portStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PORT_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatusVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatusVer10Test.java
new file mode 100644
index 0000000..798c65d
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFPortStatusVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPortStatusVer10Test {
+ OFFactory factory;
+
+ final static byte[] PORT_STATUS_SERIALIZED =
+ new byte[] { 0x1, 0xc, 0x0, 0x40, 0x0, 0x0, 0x0, 0x4, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xfd, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x8, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PORT_STATUS_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPortStatus portStatus = OFPortStatusVer10.READER.readFrom(input);
+ assertEquals(PORT_STATUS_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ portStatus.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PORT_STATUS_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFQueueGetConfigReplyVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFQueueGetConfigReplyVer10Test.java
new file mode 100644
index 0000000..da60313
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFQueueGetConfigReplyVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFQueueGetConfigReplyVer10Test {
+ OFFactory factory;
+
+ final static byte[] QUEUE_GET_CONFIG_REPLY_SERIALIZED =
+ new byte[] { 0x1, 0x15, 0x0, 0x50, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x18, 0x0, 0x0, 0x0, 0x1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x28, 0x0, 0x0, 0x0, 0x1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(QUEUE_GET_CONFIG_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFQueueGetConfigReply queueGetConfigReply = OFQueueGetConfigReplyVer10.READER.readFrom(input);
+ assertEquals(QUEUE_GET_CONFIG_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ queueGetConfigReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(QUEUE_GET_CONFIG_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFTableStatsEntryVer10Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFTableStatsEntryVer10Test.java
new file mode 100644
index 0000000..3eb91bf
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver10/OFTableStatsEntryVer10Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver10;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFTableStatsEntryVer10Test {
+ OFFactory factory;
+
+ final static byte[] TABLE_STATS_ENTRY_SERIALIZED =
+ new byte[] { 0x3, 0x0, 0x0, 0x0, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x81, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer10.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(TABLE_STATS_ENTRY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFTableStatsEntry tableStatsEntry = OFTableStatsEntryVer10.READER.readFrom(input);
+ assertEquals(TABLE_STATS_ENTRY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ tableStatsEntry.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(TABLE_STATS_ENTRY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortMaskedVer12Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortMaskedVer12Test.java
new file mode 100644
index 0000000..59f6f2e
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortMaskedVer12Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver12;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmInPhyPortMaskedVer12Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IN_PHY_PORT_MASKED_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x3, 0x8, 0x0, 0x0, 0x0, 0x2a, (byte) 0xaa, (byte) 0xbb, (byte) 0xcc, (byte) 0xdd };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer12.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IN_PHY_PORT_MASKED_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmInPhyPortMasked oxmInPhyPortMasked = OFOxmInPhyPortMaskedVer12.READER.readFrom(input);
+ assertEquals(OXM_IN_PHY_PORT_MASKED_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmInPhyPortMasked.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IN_PHY_PORT_MASKED_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortVer12Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortVer12Test.java
new file mode 100644
index 0000000..9d55855
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmInPhyPortVer12Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver12;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmInPhyPortVer12Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IN_PHY_PORT_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x2, 0x4, 0x0, 0x0, 0x0, 0x2a };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer12.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IN_PHY_PORT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmInPhyPort oxmInPhyPort = OFOxmInPhyPortVer12.READER.readFrom(input);
+ assertEquals(OXM_IN_PHY_PORT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmInPhyPort.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IN_PHY_PORT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmIpv6DstVer12Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmIpv6DstVer12Test.java
new file mode 100644
index 0000000..1be7fbc
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver12/OFOxmIpv6DstVer12Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver12;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmIpv6DstVer12Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IPV6_DST_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x36, 0x10, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer12.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IPV6_DST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmIpv6Dst oxmIpv6Dst = OFOxmIpv6DstVer12.READER.readFrom(input);
+ assertEquals(OXM_IPV6_DST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmIpv6Dst.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IPV6_DST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13Test.java
new file mode 100644
index 0000000..a43d1d8
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionIdOutputVer13Test.java
@@ -0,0 +1,87 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionIdOutputVer13Test {
+ OFActionIds factory;
+
+ final static byte[] ACTION_ID_OUTPUT_SERIALIZED =
+ new byte[] { 0x0, 0x0, 0x0, 0x4 };
+
+ @Before
+ public void setup() {
+ factory = OFActionIdsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionIdOutput actionIdOutput = factory.output();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionIdOutput.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_ID_OUTPUT_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionIdOutput actionIdOutputBuilt = factory.output();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_ID_OUTPUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionIdOutput actionIdOutputRead = OFActionIdOutputVer13.READER.readFrom(input);
+ assertEquals(ACTION_ID_OUTPUT_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionIdOutputBuilt, actionIdOutputRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_ID_OUTPUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionIdOutput actionIdOutput = OFActionIdOutputVer13.READER.readFrom(input);
+ assertEquals(ACTION_ID_OUTPUT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionIdOutput.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_ID_OUTPUT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13Test.java
new file mode 100644
index 0000000..321df67
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionOutputVer13Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionOutputVer13Test {
+ OFActions factory;
+
+ final static byte[] ACTION_OUTPUT_SERIALIZED =
+ new byte[] { 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x32, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionOutput.Builder builder = factory.buildOutput();
+ builder.setPort(OFPort.of(50)).setMaxLen(65535);
+ OFActionOutput actionOutput = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionOutput.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_OUTPUT_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionOutput.Builder builder = factory.buildOutput();
+ builder.setPort(OFPort.of(50)).setMaxLen(65535);
+ OFActionOutput actionOutputBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_OUTPUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionOutput actionOutputRead = OFActionOutputVer13.READER.readFrom(input);
+ assertEquals(ACTION_OUTPUT_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionOutputBuilt, actionOutputRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_OUTPUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionOutput actionOutput = OFActionOutputVer13.READER.readFrom(input);
+ assertEquals(ACTION_OUTPUT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionOutput.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_OUTPUT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13BsnLagIdTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13BsnLagIdTest.java
new file mode 100644
index 0000000..00313fb
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13BsnLagIdTest.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionSetFieldVer13BsnLagIdTest {
+ OFActions factory;
+
+ final static byte[] ACTION_SET_FIELD_SERIALIZED =
+ new byte[] { 0x0, 0x19, 0x0, 0x10, 0x0, 0x3, 0x2, 0x4, 0x12, 0x34, 0x56, 0x78, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.bsnLagId(LagId.of(0x12345678)));
+ OFActionSetField actionSetField = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.bsnLagId(LagId.of(0x12345678)));
+ OFActionSetField actionSetFieldBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetFieldRead = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionSetFieldBuilt, actionSetFieldRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetField = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13EthDstTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13EthDstTest.java
new file mode 100644
index 0000000..8cc7e76
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13EthDstTest.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionSetFieldVer13EthDstTest {
+ OFActions factory;
+
+ final static byte[] ACTION_SET_FIELD_SERIALIZED =
+ new byte[] { 0x0, 0x19, 0x0, 0x10, (byte) 0x80, 0x0, 0x6, 0x6, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.ethDst(MacAddress.of("00:01:02:03:04:05")));
+ OFActionSetField actionSetField = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.ethDst(MacAddress.of("00:01:02:03:04:05")));
+ OFActionSetField actionSetFieldBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetFieldRead = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionSetFieldBuilt, actionSetFieldRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetField = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13Ipv6SrcTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13Ipv6SrcTest.java
new file mode 100644
index 0000000..342663d
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13Ipv6SrcTest.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionSetFieldVer13Ipv6SrcTest {
+ OFActions factory;
+
+ final static byte[] ACTION_SET_FIELD_SERIALIZED =
+ new byte[] { 0x0, 0x19, 0x0, 0x18, (byte) 0x80, 0x0, 0x34, 0x10, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.ipv6Src(IPv6Address.of("0001:0203:0405:0607:0809:0a0b:0c0d:0e0f")));
+ OFActionSetField actionSetField = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.ipv6Src(IPv6Address.of("0001:0203:0405:0607:0809:0a0b:0c0d:0e0f")));
+ OFActionSetField actionSetFieldBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetFieldRead = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionSetFieldBuilt, actionSetFieldRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetField = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13TcpSrcTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13TcpSrcTest.java
new file mode 100644
index 0000000..b01a93a
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFActionSetFieldVer13TcpSrcTest.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFActionSetFieldVer13TcpSrcTest {
+ OFActions factory;
+
+ final static byte[] ACTION_SET_FIELD_SERIALIZED =
+ new byte[] { 0x0, 0x19, 0x0, 0x10, (byte) 0x80, 0x0, 0x1a, 0x2, 0x0, 0x32, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFActionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.tcpSrc(TransportPort.of(50)));
+ OFActionSetField actionSetField = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFActionSetField.Builder builder = factory.buildSetField();
+ OFOxms oxms = OFFactories.getFactory(OFVersion.OF_13).oxms();
+builder.setField(oxms.tcpSrc(TransportPort.of(50)));
+ OFActionSetField actionSetFieldBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetFieldRead = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(actionSetFieldBuilt, actionSetFieldRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ACTION_SET_FIELD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFActionSetField actionSetField = OFActionSetFieldVer13.READER.readFrom(input);
+ assertEquals(ACTION_SET_FIELD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ actionSetField.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ACTION_SET_FIELD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13Test.java
new file mode 100644
index 0000000..9ccbe31
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadMatchErrorMsgVer13Test.java
@@ -0,0 +1,95 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBadMatchErrorMsgVer13Test {
+ OFErrorMsgs factory;
+
+ final static byte[] BAD_MATCH_ERROR_MSG_SERIALIZED =
+ new byte[] { 0x4, 0x1, 0x0, 0xf, 0x12, 0x34, 0x56, 0x78, 0x0, 0x4, 0x0, 0x8, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFErrorMsgsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBadMatchErrorMsg.Builder builder = factory.buildBadMatchErrorMsg();
+ builder.setXid(0x12345678)
+ .setCode(OFBadMatchCode.BAD_MASK)
+ .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13));;
+ OFBadMatchErrorMsg badMatchErrorMsg = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ badMatchErrorMsg.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BAD_MATCH_ERROR_MSG_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBadMatchErrorMsg.Builder builder = factory.buildBadMatchErrorMsg();
+ builder.setXid(0x12345678)
+ .setCode(OFBadMatchCode.BAD_MASK)
+ .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13));;
+ OFBadMatchErrorMsg badMatchErrorMsgBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BAD_MATCH_ERROR_MSG_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBadMatchErrorMsg badMatchErrorMsgRead = OFBadMatchErrorMsgVer13.READER.readFrom(input);
+ assertEquals(BAD_MATCH_ERROR_MSG_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(badMatchErrorMsgBuilt, badMatchErrorMsgRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BAD_MATCH_ERROR_MSG_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBadMatchErrorMsg badMatchErrorMsg = OFBadMatchErrorMsgVer13.READER.readFrom(input);
+ assertEquals(BAD_MATCH_ERROR_MSG_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ badMatchErrorMsg.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BAD_MATCH_ERROR_MSG_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13Test.java
new file mode 100644
index 0000000..08b0a77
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBadRequestErrorMsgVer13Test.java
@@ -0,0 +1,95 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBadRequestErrorMsgVer13Test {
+ OFErrorMsgs factory;
+
+ final static byte[] BAD_REQUEST_ERROR_MSG_SERIALIZED =
+ new byte[] { 0x4, 0x1, 0x0, 0xf, 0x12, 0x34, 0x56, 0x78, 0x0, 0x1, 0x0, 0x8, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFErrorMsgsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBadRequestErrorMsg.Builder builder = factory.buildBadRequestErrorMsg();
+ builder.setXid(0x12345678)
+ .setCode(OFBadRequestCode.BUFFER_UNKNOWN)
+ .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13));;
+ OFBadRequestErrorMsg badRequestErrorMsg = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ badRequestErrorMsg.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BAD_REQUEST_ERROR_MSG_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBadRequestErrorMsg.Builder builder = factory.buildBadRequestErrorMsg();
+ builder.setXid(0x12345678)
+ .setCode(OFBadRequestCode.BUFFER_UNKNOWN)
+ .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_13));;
+ OFBadRequestErrorMsg badRequestErrorMsgBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BAD_REQUEST_ERROR_MSG_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBadRequestErrorMsg badRequestErrorMsgRead = OFBadRequestErrorMsgVer13.READER.readFrom(input);
+ assertEquals(BAD_REQUEST_ERROR_MSG_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(badRequestErrorMsgBuilt, badRequestErrorMsgRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BAD_REQUEST_ERROR_MSG_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBadRequestErrorMsg badRequestErrorMsg = OFBadRequestErrorMsgVer13.READER.readFrom(input);
+ assertEquals(BAD_REQUEST_ERROR_MSG_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ badRequestErrorMsg.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BAD_REQUEST_ERROR_MSG_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13Test.java
new file mode 100644
index 0000000..6d593cd
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnFlowIdleVer13Test.java
@@ -0,0 +1,109 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnFlowIdleVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_FLOW_IDLE_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x38, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x28, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, 0x42, 0x68, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x16, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0x2a, 0x2, 0x0, 0x1, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnFlowIdle.Builder builder = factory.buildBsnFlowIdle();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setPriority(17000)
+ .setTableId(TableId.of(20))
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ARP_OP, ArpOpcode.of(1))
+ .build()
+ );;
+ OFBsnFlowIdle bsnFlowIdle = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnFlowIdle.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_FLOW_IDLE_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnFlowIdle.Builder builder = factory.buildBsnFlowIdle();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setPriority(17000)
+ .setTableId(TableId.of(20))
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ARP_OP, ArpOpcode.of(1))
+ .build()
+ );;
+ OFBsnFlowIdle bsnFlowIdleBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_FLOW_IDLE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnFlowIdle bsnFlowIdleRead = OFBsnFlowIdleVer13.READER.readFrom(input);
+ assertEquals(BSN_FLOW_IDLE_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnFlowIdleBuilt, bsnFlowIdleRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_FLOW_IDLE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnFlowIdle bsnFlowIdle = OFBsnFlowIdleVer13.READER.readFrom(input);
+ assertEquals(BSN_FLOW_IDLE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnFlowIdle.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_FLOW_IDLE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13Test.java
new file mode 100644
index 0000000..a9bacd6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsReplyVer13Test.java
@@ -0,0 +1,105 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableBucketStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x38, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x5, (byte) 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, (byte) 0xff, (byte) 0xee, (byte) 0xdd, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, (byte) 0x88, 0x12, 0x34, 0x23, 0x45, 0x34, 0x56, 0x45, 0x67, 0x56, 0x78, 0x67, (byte) 0x89, 0x78, (byte) 0x9a, (byte) 0x89, (byte) 0xab };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableBucketStatsReply.Builder builder = factory.buildBsnGentableBucketStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableBucketStatsEntry>of(
+ factory.bsnGentableBucketStatsEntry(U128.of(0x8877665544332211L, 0xFFEEDDCCBBAA9988L)),
+ factory.bsnGentableBucketStatsEntry(U128.of(0x1234234534564567L, 0x56786789789A89ABL))
+ )
+ );
+ OFBsnGentableBucketStatsReply bsnGentableBucketStatsReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableBucketStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableBucketStatsReply.Builder builder = factory.buildBsnGentableBucketStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableBucketStatsEntry>of(
+ factory.bsnGentableBucketStatsEntry(U128.of(0x8877665544332211L, 0xFFEEDDCCBBAA9988L)),
+ factory.bsnGentableBucketStatsEntry(U128.of(0x1234234534564567L, 0x56786789789A89ABL))
+ )
+ );
+ OFBsnGentableBucketStatsReply bsnGentableBucketStatsReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableBucketStatsReply bsnGentableBucketStatsReplyRead = OFBsnGentableBucketStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableBucketStatsReplyBuilt, bsnGentableBucketStatsReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableBucketStatsReply bsnGentableBucketStatsReply = OFBsnGentableBucketStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableBucketStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_BUCKET_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13Test.java
new file mode 100644
index 0000000..b89c812
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableBucketStatsRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableBucketStatsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_BUCKET_STATS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x12, 0x0, 0x1a, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x5, 0x12, 0x34 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_BUCKET_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableBucketStatsRequest bsnGentableBucketStatsRequest = OFBsnGentableBucketStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_BUCKET_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableBucketStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_BUCKET_STATS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13Test.java
new file mode 100644
index 0000000..83217a8
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableClearRequestVer13Test.java
@@ -0,0 +1,97 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableClearRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x34, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x30, 0x0, 0x14, 0x0, 0x0, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableClearRequest.Builder builder = factory.buildBsnGentableClearRequest();
+ builder.setXid(0x12345678)
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA990000L))
+ .setChecksumMask(U128.of(0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFF0000L))
+ .setTableId(GenTableId.of(20));
+ OFBsnGentableClearRequest bsnGentableClearRequest = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableClearRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableClearRequest.Builder builder = factory.buildBsnGentableClearRequest();
+ builder.setXid(0x12345678)
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA990000L))
+ .setChecksumMask(U128.of(0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFF0000L))
+ .setTableId(GenTableId.of(20));
+ OFBsnGentableClearRequest bsnGentableClearRequestBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableClearRequest bsnGentableClearRequestRead = OFBsnGentableClearRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableClearRequestBuilt, bsnGentableClearRequestRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableClearRequest bsnGentableClearRequest = OFBsnGentableClearRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableClearRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_CLEAR_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13Test.java
new file mode 100644
index 0000000..b401c59
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsReplyVer13Test.java
@@ -0,0 +1,125 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableDescStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x78, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x4, 0x0, 0x30, 0x0, 0x0, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x31, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, (byte) 0x80, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableDescStatsReply.Builder builder = factory.buildBsnGentableDescStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableDescStatsEntry>of(
+ factory.buildBsnGentableDescStatsEntry()
+ .setTableId(GenTableId.of(0))
+ .setName("table 0")
+ .setBucketsSize(32)
+ .setMaxEntries(64)
+ .build(),
+ factory.buildBsnGentableDescStatsEntry()
+ .setTableId(GenTableId.of(1))
+ .setName("table 1.........................")
+ .setBucketsSize(64)
+ .setMaxEntries(128)
+ .build()
+ )
+ );
+ OFBsnGentableDescStatsReply bsnGentableDescStatsReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableDescStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableDescStatsReply.Builder builder = factory.buildBsnGentableDescStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableDescStatsEntry>of(
+ factory.buildBsnGentableDescStatsEntry()
+ .setTableId(GenTableId.of(0))
+ .setName("table 0")
+ .setBucketsSize(32)
+ .setMaxEntries(64)
+ .build(),
+ factory.buildBsnGentableDescStatsEntry()
+ .setTableId(GenTableId.of(1))
+ .setName("table 1.........................")
+ .setBucketsSize(64)
+ .setMaxEntries(128)
+ .build()
+ )
+ );
+ OFBsnGentableDescStatsReply bsnGentableDescStatsReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableDescStatsReply bsnGentableDescStatsReplyRead = OFBsnGentableDescStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableDescStatsReplyBuilt, bsnGentableDescStatsReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableDescStatsReply bsnGentableDescStatsReply = OFBsnGentableDescStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableDescStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_DESC_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13Test.java
new file mode 100644
index 0000000..dc5a452
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableDescStatsRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableDescStatsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_DESC_STATS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x12, 0x0, 0x18, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x4 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_DESC_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableDescStatsRequest bsnGentableDescStatsRequest = OFBsnGentableDescStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_DESC_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableDescStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_DESC_STATS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13Test.java
new file mode 100644
index 0000000..c7d7dda
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryAddVer13Test.java
@@ -0,0 +1,121 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryAddVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_ADD_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x48, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2e, 0x0, 0x14, 0x0, 0x12, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, (byte) 0x88, 0x77, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x5, 0x0, 0x1, 0x0, 0xa, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0xa, (byte) 0xff, (byte) 0xee, (byte) 0xdd, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableEntryAdd.Builder builder = factory.buildBsnGentableEntryAdd();
+ builder.setXid(0x12345678)
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998877L))
+ .setTableId(GenTableId.of(20))
+ .setKey(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5)),
+ factory.bsnTlvs().mac(MacAddress.of("01:23:45:67:89:ab"))
+ )
+ )
+ .setValue(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6)),
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:aa"))
+ )
+ );
+ OFBsnGentableEntryAdd bsnGentableEntryAdd = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_ADD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableEntryAdd.Builder builder = factory.buildBsnGentableEntryAdd();
+ builder.setXid(0x12345678)
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998877L))
+ .setTableId(GenTableId.of(20))
+ .setKey(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5)),
+ factory.bsnTlvs().mac(MacAddress.of("01:23:45:67:89:ab"))
+ )
+ )
+ .setValue(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6)),
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:aa"))
+ )
+ );
+ OFBsnGentableEntryAdd bsnGentableEntryAddBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryAdd bsnGentableEntryAddRead = OFBsnGentableEntryAddVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_ADD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableEntryAddBuilt, bsnGentableEntryAddRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryAdd bsnGentableEntryAdd = OFBsnGentableEntryAddVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_ADD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_ADD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13Test.java
new file mode 100644
index 0000000..bea5123
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDeleteVer13Test.java
@@ -0,0 +1,107 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryDeleteVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_DELETE_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x24, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2f, 0x0, 0x14, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x5, 0x0, 0x1, 0x0, 0xa, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableEntryDelete.Builder builder = factory.buildBsnGentableEntryDelete();
+ builder.setXid(0x12345678)
+ .setTableId(GenTableId.of(20))
+ .setKey(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5)),
+ factory.bsnTlvs().mac(MacAddress.of("01:23:45:67:89:ab"))
+ )
+ );
+ OFBsnGentableEntryDelete bsnGentableEntryDelete = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryDelete.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableEntryDelete.Builder builder = factory.buildBsnGentableEntryDelete();
+ builder.setXid(0x12345678)
+ .setTableId(GenTableId.of(20))
+ .setKey(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5)),
+ factory.bsnTlvs().mac(MacAddress.of("01:23:45:67:89:ab"))
+ )
+ );
+ OFBsnGentableEntryDelete bsnGentableEntryDeleteBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryDelete bsnGentableEntryDeleteRead = OFBsnGentableEntryDeleteVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableEntryDeleteBuilt, bsnGentableEntryDeleteRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryDelete bsnGentableEntryDelete = OFBsnGentableEntryDeleteVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryDelete.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_DELETE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13Test.java
new file mode 100644
index 0000000..f71edae
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsReplyVer13Test.java
@@ -0,0 +1,137 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryDescStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x64, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2, 0x0, 0x26, 0x0, 0x8, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, (byte) 0x88, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x5, 0x0, 0x1, 0x0, 0xa, (byte) 0xff, (byte) 0xee, (byte) 0xdd, (byte) 0xcc, (byte) 0xbb, 0x0, 0x0, 0x26, 0x0, 0x8, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, (byte) 0x88, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0xa, (byte) 0xff, (byte) 0xee, (byte) 0xdd, (byte) 0xcc, (byte) 0xbb, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableEntryDescStatsReply.Builder builder = factory.buildBsnGentableEntryDescStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableEntryDescStatsEntry>of(
+ factory.buildBsnGentableEntryDescStatsEntry()
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998800L))
+ .setKey(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5))
+ ))
+ .setValue(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:00"))
+ ))
+ .build(),
+ factory.buildBsnGentableEntryDescStatsEntry()
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998801L))
+ .setKey(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6))
+ ))
+ .setValue(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:01"))
+ ))
+ .build()
+ )
+ );
+ OFBsnGentableEntryDescStatsReply bsnGentableEntryDescStatsReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryDescStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableEntryDescStatsReply.Builder builder = factory.buildBsnGentableEntryDescStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableEntryDescStatsEntry>of(
+ factory.buildBsnGentableEntryDescStatsEntry()
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998800L))
+ .setKey(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5))
+ ))
+ .setValue(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:00"))
+ ))
+ .build(),
+ factory.buildBsnGentableEntryDescStatsEntry()
+ .setChecksum(U128.of(0xFEDCBA9876543210L, 0xFFEECCBBAA998801L))
+ .setKey(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6))
+ ))
+ .setValue(ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().mac(MacAddress.of("ff:ee:dd:cc:bb:01"))
+ ))
+ .build()
+ )
+ );
+ OFBsnGentableEntryDescStatsReply bsnGentableEntryDescStatsReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryDescStatsReply bsnGentableEntryDescStatsReplyRead = OFBsnGentableEntryDescStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableEntryDescStatsReplyBuilt, bsnGentableEntryDescStatsReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryDescStatsReply bsnGentableEntryDescStatsReply = OFBsnGentableEntryDescStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryDescStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_DESC_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13Test.java
new file mode 100644
index 0000000..7f889c1
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryDescStatsRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryDescStatsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_DESC_STATS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x12, 0x0, 0x3c, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x2, 0x0, 0x14, 0x0, 0x0, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_DESC_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryDescStatsRequest bsnGentableEntryDescStatsRequest = OFBsnGentableEntryDescStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_DESC_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryDescStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_DESC_STATS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13Test.java
new file mode 100644
index 0000000..28c85b2
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsReplyVer13Test.java
@@ -0,0 +1,137 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x60, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x3, 0x0, 0x24, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x5, 0x0, 0x2, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x3, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65, 0x0, 0x24, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x6, 0x0, 0x2, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x3, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x65 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnGentableEntryStatsReply.Builder builder = factory.buildBsnGentableEntryStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableEntryStatsEntry>of(
+ factory.bsnGentableEntryStatsEntry(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5))
+ ),
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().rxPackets(U64.of(100)),
+ factory.bsnTlvs().txPackets(U64.of(101))
+ )
+ ),
+ factory.bsnGentableEntryStatsEntry(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6))
+ ),
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().rxPackets(U64.of(100)),
+ factory.bsnTlvs().txPackets(U64.of(101))
+ )
+ )
+ )
+ );
+ OFBsnGentableEntryStatsReply bsnGentableEntryStatsReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnGentableEntryStatsReply.Builder builder = factory.buildBsnGentableEntryStatsReply();
+ builder.setXid(0x12345678)
+ .setEntries(
+ ImmutableList.<OFBsnGentableEntryStatsEntry>of(
+ factory.bsnGentableEntryStatsEntry(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(5))
+ ),
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().rxPackets(U64.of(100)),
+ factory.bsnTlvs().txPackets(U64.of(101))
+ )
+ ),
+ factory.bsnGentableEntryStatsEntry(
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().port(OFPort.of(6))
+ ),
+ ImmutableList.<OFBsnTlv>of(
+ factory.bsnTlvs().rxPackets(U64.of(100)),
+ factory.bsnTlvs().txPackets(U64.of(101))
+ )
+ )
+ )
+ );
+ OFBsnGentableEntryStatsReply bsnGentableEntryStatsReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryStatsReply bsnGentableEntryStatsReplyRead = OFBsnGentableEntryStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnGentableEntryStatsReplyBuilt, bsnGentableEntryStatsReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryStatsReply bsnGentableEntryStatsReply = OFBsnGentableEntryStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13Test.java
new file mode 100644
index 0000000..8fb2165
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableEntryStatsRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableEntryStatsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_ENTRY_STATS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x12, 0x0, 0x3c, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x3, 0x0, 0x14, 0x0, 0x0, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, (byte) 0xee, (byte) 0xcc, (byte) 0xbb, (byte) 0xaa, (byte) 0x99, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_ENTRY_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableEntryStatsRequest bsnGentableEntryStatsRequest = OFBsnGentableEntryStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_ENTRY_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableEntryStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_ENTRY_STATS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13Test.java
new file mode 100644
index 0000000..80b54f1
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnGentableSetBucketsSizeVer13Test.java
@@ -0,0 +1,66 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnGentableSetBucketsSizeVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_GENTABLE_SET_BUCKETS_SIZE_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x18, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x32, 0x0, 0x14, 0x0, 0x0, 0x0, 0x11, 0x22, 0x33 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_GENTABLE_SET_BUCKETS_SIZE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnGentableSetBucketsSize bsnGentableSetBucketsSize = OFBsnGentableSetBucketsSizeVer13.READER.readFrom(input);
+ assertEquals(BSN_GENTABLE_SET_BUCKETS_SIZE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnGentableSetBucketsSize.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_GENTABLE_SET_BUCKETS_SIZE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13Test.java
new file mode 100644
index 0000000..a0019e6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnLacpStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_LACP_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x3c, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, (byte) 0xf1, 0x11, (byte) 0xf2, 0x22, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, (byte) 0xf3, 0x33, (byte) 0xf4, 0x44, (byte) 0xf5, 0x55, 0x2, 0x0, (byte) 0xf6, 0x66, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, (byte) 0xf7, 0x77, (byte) 0xf8, (byte) 0x88, (byte) 0xf9, (byte) 0x99, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_LACP_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnLacpStatsReply bsnLacpStatsReply = OFBsnLacpStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_LACP_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnLacpStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_LACP_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13Test.java
new file mode 100644
index 0000000..28f054c
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnLacpStatsRequestVer13Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnLacpStatsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_LACP_STATS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x12, 0x0, 0x18, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnLacpStatsRequest.Builder builder = factory.buildBsnLacpStatsRequest();
+ builder.setXid(0x12345678);
+ OFBsnLacpStatsRequest bsnLacpStatsRequest = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnLacpStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_LACP_STATS_REQUEST_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnLacpStatsRequest.Builder builder = factory.buildBsnLacpStatsRequest();
+ builder.setXid(0x12345678);
+ OFBsnLacpStatsRequest bsnLacpStatsRequestBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_LACP_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnLacpStatsRequest bsnLacpStatsRequestRead = OFBsnLacpStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_LACP_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnLacpStatsRequestBuilt, bsnLacpStatsRequestRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_LACP_STATS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnLacpStatsRequest bsnLacpStatsRequest = OFBsnLacpStatsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_LACP_STATS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnLacpStatsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_LACP_STATS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13Test.java
new file mode 100644
index 0000000..b0528e6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnPortCounterStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnPortCounterStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_PORT_COUNTER_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x50, 0x12, 0x34, 0x56, 0x78, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x8, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x12, 0x34, 0x56, 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x12, 0x34, 0x56, 0x78, (byte) 0x9a, (byte) 0xbc, (byte) 0xde, (byte) 0xf0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_PORT_COUNTER_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnPortCounterStatsReply bsnPortCounterStatsReply = OFBsnPortCounterStatsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_PORT_COUNTER_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnPortCounterStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_PORT_COUNTER_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13Test.java
new file mode 100644
index 0000000..39331d0
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsReplyVer13Test.java
@@ -0,0 +1,96 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnSetAuxCxnsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_SET_AUX_CXNS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x18, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x3b, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnSetAuxCxnsReply.Builder builder = factory.buildBsnSetAuxCxnsReply();
+ builder.setXid(0x12345678)
+ .setNumAux(1)
+ .setStatus(0);
+ OFBsnSetAuxCxnsReply bsnSetAuxCxnsReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnSetAuxCxnsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_SET_AUX_CXNS_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnSetAuxCxnsReply.Builder builder = factory.buildBsnSetAuxCxnsReply();
+ builder.setXid(0x12345678)
+ .setNumAux(1)
+ .setStatus(0);
+ OFBsnSetAuxCxnsReply bsnSetAuxCxnsReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_SET_AUX_CXNS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnSetAuxCxnsReply bsnSetAuxCxnsReplyRead = OFBsnSetAuxCxnsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_SET_AUX_CXNS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnSetAuxCxnsReplyBuilt, bsnSetAuxCxnsReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_SET_AUX_CXNS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnSetAuxCxnsReply bsnSetAuxCxnsReply = OFBsnSetAuxCxnsReplyVer13.READER.readFrom(input);
+ assertEquals(BSN_SET_AUX_CXNS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnSetAuxCxnsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_SET_AUX_CXNS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13Test.java
new file mode 100644
index 0000000..1dca579
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnSetAuxCxnsRequestVer13Test.java
@@ -0,0 +1,94 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnSetAuxCxnsRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] BSN_SET_AUX_CXNS_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x14, 0x12, 0x34, 0x56, 0x78, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x3a, 0x0, 0x0, 0x0, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnSetAuxCxnsRequest.Builder builder = factory.buildBsnSetAuxCxnsRequest();
+ builder.setXid(0x12345678)
+ .setNumAux(1);
+ OFBsnSetAuxCxnsRequest bsnSetAuxCxnsRequest = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnSetAuxCxnsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnSetAuxCxnsRequest.Builder builder = factory.buildBsnSetAuxCxnsRequest();
+ builder.setXid(0x12345678)
+ .setNumAux(1);
+ OFBsnSetAuxCxnsRequest bsnSetAuxCxnsRequestBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnSetAuxCxnsRequest bsnSetAuxCxnsRequestRead = OFBsnSetAuxCxnsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnSetAuxCxnsRequestBuilt, bsnSetAuxCxnsRequestRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnSetAuxCxnsRequest bsnSetAuxCxnsRequest = OFBsnSetAuxCxnsRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnSetAuxCxnsRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_SET_AUX_CXNS_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13Test.java
new file mode 100644
index 0000000..b310306
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnTlvPortVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnTlvPortVer13Test {
+ OFBsnTlvs factory;
+
+ final static byte[] BSN_TLV_PORT_SERIALIZED =
+ new byte[] { 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x5 };
+
+ @Before
+ public void setup() {
+ factory = OFBsnTlvsVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_TLV_PORT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnTlvPort bsnTlvPort = OFBsnTlvPortVer13.READER.readFrom(input);
+ assertEquals(BSN_TLV_PORT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnTlvPort.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_TLV_PORT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13L2GreTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13L2GreTest.java
new file mode 100644
index 0000000..686c414
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13L2GreTest.java
@@ -0,0 +1,139 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnVirtualPortCreateRequestVer13L2GreTest {
+ OFFactory factory;
+
+ final static byte[] BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x50, 0x1, 0x2, 0x3, 0x4, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0xf, 0x0, 0x1, 0x0, 0x40, 0x0, 0x0, 0x0, 0x1b, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, (byte) 0xc0, 0x0, 0x0, 0x2, (byte) 0xc0, 0x0, 0x10, 0x2, 0x1, 0x40, 0x0, 0x0, 0x0, 0x0, (byte) 0xbe, (byte) 0xef, 0x0, 0x0, 0x4, 0x0, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnVirtualPortCreateRequest.Builder builder = factory.buildBsnVirtualPortCreateRequest();
+ builder.setXid(0x01020304)
+ .setVport(
+ factory.buildBsnVportL2Gre()
+ .setFlags(
+ ImmutableSet.<OFBsnVportL2GreFlags>of(
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_DSCP_ASSIGN,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOOPBACK_IS_VALID,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID
+ )
+ )
+ .setPortNo(OFPort.of(1))
+ .setLoopbackPortNo(OFPort.of(2))
+ .setLocalMac(MacAddress.of("0a:0b:0c:0d:0e:0f"))
+ .setNhMac(MacAddress.of("01:02:03:04:05:06"))
+ .setSrcIp(IPv4Address.of("192.0.0.2"))
+ .setDstIp(IPv4Address.of("192.0.16.2"))
+ .setDscp((short)1)
+ .setTtl((short)64)
+ .setVpn(0xbeef)
+ .setRateLimit(0x400)
+ .setIfName("foo")
+ .build()
+ );;
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequest = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnVirtualPortCreateRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnVirtualPortCreateRequest.Builder builder = factory.buildBsnVirtualPortCreateRequest();
+ builder.setXid(0x01020304)
+ .setVport(
+ factory.buildBsnVportL2Gre()
+ .setFlags(
+ ImmutableSet.<OFBsnVportL2GreFlags>of(
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOCAL_MAC_IS_VALID,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_DSCP_ASSIGN,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_LOOPBACK_IS_VALID,
+ OFBsnVportL2GreFlags.BSN_VPORT_L2GRE_RATE_LIMIT_IS_VALID
+ )
+ )
+ .setPortNo(OFPort.of(1))
+ .setLoopbackPortNo(OFPort.of(2))
+ .setLocalMac(MacAddress.of("0a:0b:0c:0d:0e:0f"))
+ .setNhMac(MacAddress.of("01:02:03:04:05:06"))
+ .setSrcIp(IPv4Address.of("192.0.0.2"))
+ .setDstIp(IPv4Address.of("192.0.16.2"))
+ .setDscp((short)1)
+ .setTtl((short)64)
+ .setVpn(0xbeef)
+ .setRateLimit(0x400)
+ .setIfName("foo")
+ .build()
+ );;
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequestBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequestRead = OFBsnVirtualPortCreateRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnVirtualPortCreateRequestBuilt, bsnVirtualPortCreateRequestRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequest = OFBsnVirtualPortCreateRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnVirtualPortCreateRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13QInQTest.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13QInQTest.java
new file mode 100644
index 0000000..b36d99f
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFBsnVirtualPortCreateRequestVer13QInQTest.java
@@ -0,0 +1,111 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFBsnVirtualPortCreateRequestVer13QInQTest {
+ OFFactory factory;
+
+ final static byte[] BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x4, 0x0, 0x30, 0x1, 0x2, 0x3, 0x4, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0xf, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x1, 0x0, 0x2, 0x0, 0x3, 0x0, 0x4, 0x0, 0x5, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFBsnVirtualPortCreateRequest.Builder builder = factory.buildBsnVirtualPortCreateRequest();
+ builder.setXid(0x01020304)
+ .setVport(
+ factory.buildBsnVportQInQ()
+ .setPortNo(1)
+ .setIngressTpid(2)
+ .setIngressVlanId(3)
+ .setEgressTpid(4)
+ .setEgressVlanId(5)
+ .setIfName("foo")
+ .build()
+ );;
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequest = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnVirtualPortCreateRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFBsnVirtualPortCreateRequest.Builder builder = factory.buildBsnVirtualPortCreateRequest();
+ builder.setXid(0x01020304)
+ .setVport(
+ factory.buildBsnVportQInQ()
+ .setPortNo(1)
+ .setIngressTpid(2)
+ .setIngressVlanId(3)
+ .setEgressTpid(4)
+ .setEgressVlanId(5)
+ .setIfName("foo")
+ .build()
+ );;
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequestBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequestRead = OFBsnVirtualPortCreateRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(bsnVirtualPortCreateRequestBuilt, bsnVirtualPortCreateRequestRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFBsnVirtualPortCreateRequest bsnVirtualPortCreateRequest = OFBsnVirtualPortCreateRequestVer13.READER.readFrom(input);
+ assertEquals(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ bsnVirtualPortCreateRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(BSN_VIRTUAL_PORT_CREATE_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13Test.java
new file mode 100644
index 0000000..f1afdb4
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFEchoReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] ECHO_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x3, 0x0, 0xb, 0x12, 0x34, 0x56, 0x78, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ECHO_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFEchoReply echoReply = OFEchoReplyVer13.READER.readFrom(input);
+ assertEquals(ECHO_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ echoReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ECHO_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13Test.java
new file mode 100644
index 0000000..a546e9c
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFEchoRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFEchoRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] ECHO_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x2, 0x0, 0xb, 0x12, 0x34, 0x56, 0x78, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(ECHO_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFEchoRequest echoRequest = OFEchoRequestVer13.READER.readFrom(input);
+ assertEquals(ECHO_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ echoRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(ECHO_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13Test.java
new file mode 100644
index 0000000..89606ee
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFeaturesReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] FEATURES_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x6, 0x0, 0x20, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, 0x0, 0x0, 0x0, 0x40, (byte) 0xc8, 0x5, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FEATURES_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFeaturesReply featuresReply = OFFeaturesReplyVer13.READER.readFrom(input);
+ assertEquals(FEATURES_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ featuresReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FEATURES_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13Test.java
new file mode 100644
index 0000000..6fd5a74
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFeaturesRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFeaturesRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] FEATURES_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x5, 0x0, 0x8, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FEATURES_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFeaturesRequest featuresRequest = OFFeaturesRequestVer13.READER.readFrom(input);
+ assertEquals(FEATURES_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ featuresRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FEATURES_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13Test.java
new file mode 100644
index 0000000..7797c1d
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowAddVer13Test.java
@@ -0,0 +1,147 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowAddVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_ADD_SERIALIZED =
+ new byte[] { 0x4, 0xe, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, 0x3, 0x0, 0x0, 0x5, 0x0, 0xa, 0x17, 0x70, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3f, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0xa, 0x2, (byte) 0x86, (byte) 0xdd, (byte) 0x80, 0x0, 0x14, 0x1, 0x6, (byte) 0x80, 0x0, 0x35, 0x20, 0x1c, (byte) 0xca, (byte) 0xfe, 0x1c, (byte) 0xb1, 0x10, 0x1c, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf0, (byte) 0xff, (byte) 0xff, 0x1c, 0x2c, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x7, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowAdd.Builder builder = factory.buildFlowAdd();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowAdd flowAdd = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_ADD_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowAdd.Builder builder = factory.buildFlowAdd();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowAdd flowAddBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowAdd flowAddRead = OFFlowAddVer13.READER.readFrom(input);
+ assertEquals(FLOW_ADD_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowAddBuilt, flowAddRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_ADD_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowAdd flowAdd = OFFlowAddVer13.READER.readFrom(input);
+ assertEquals(FLOW_ADD_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowAdd.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_ADD_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13Test.java
new file mode 100644
index 0000000..f260e52
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteStrictVer13Test.java
@@ -0,0 +1,147 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowDeleteStrictVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_DELETE_STRICT_SERIALIZED =
+ new byte[] { 0x4, 0xe, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, 0x3, 0x4, 0x0, 0x5, 0x0, 0xa, 0x17, 0x70, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3f, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0xa, 0x2, (byte) 0x86, (byte) 0xdd, (byte) 0x80, 0x0, 0x14, 0x1, 0x6, (byte) 0x80, 0x0, 0x35, 0x20, 0x1c, (byte) 0xca, (byte) 0xfe, 0x1c, (byte) 0xb1, 0x10, 0x1c, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf0, (byte) 0xff, (byte) 0xff, 0x1c, 0x2c, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x7, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowDeleteStrict.Builder builder = factory.buildFlowDeleteStrict();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowDeleteStrict flowDeleteStrict = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowDeleteStrict.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_DELETE_STRICT_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowDeleteStrict.Builder builder = factory.buildFlowDeleteStrict();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowDeleteStrict flowDeleteStrictBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_DELETE_STRICT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowDeleteStrict flowDeleteStrictRead = OFFlowDeleteStrictVer13.READER.readFrom(input);
+ assertEquals(FLOW_DELETE_STRICT_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowDeleteStrictBuilt, flowDeleteStrictRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_DELETE_STRICT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowDeleteStrict flowDeleteStrict = OFFlowDeleteStrictVer13.READER.readFrom(input);
+ assertEquals(FLOW_DELETE_STRICT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowDeleteStrict.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_DELETE_STRICT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13Test.java
new file mode 100644
index 0000000..84b7964
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowDeleteVer13Test.java
@@ -0,0 +1,147 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowDeleteVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_DELETE_SERIALIZED =
+ new byte[] { 0x4, 0xe, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, 0x3, 0x3, 0x0, 0x5, 0x0, 0xa, 0x17, 0x70, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3f, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0xa, 0x2, (byte) 0x86, (byte) 0xdd, (byte) 0x80, 0x0, 0x14, 0x1, 0x6, (byte) 0x80, 0x0, 0x35, 0x20, 0x1c, (byte) 0xca, (byte) 0xfe, 0x1c, (byte) 0xb1, 0x10, 0x1c, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf0, (byte) 0xff, (byte) 0xff, 0x1c, 0x2c, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x7, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowDelete.Builder builder = factory.buildFlowDelete();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowDelete flowDelete = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowDelete.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_DELETE_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowDelete.Builder builder = factory.buildFlowDelete();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowDelete flowDeleteBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_DELETE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowDelete flowDeleteRead = OFFlowDeleteVer13.READER.readFrom(input);
+ assertEquals(FLOW_DELETE_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowDeleteBuilt, flowDeleteRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_DELETE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowDelete flowDelete = OFFlowDeleteVer13.READER.readFrom(input);
+ assertEquals(FLOW_DELETE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowDelete.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_DELETE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13Test.java
new file mode 100644
index 0000000..311b3df
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyStrictVer13Test.java
@@ -0,0 +1,147 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowModifyStrictVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_MODIFY_STRICT_SERIALIZED =
+ new byte[] { 0x4, 0xe, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, 0x3, 0x2, 0x0, 0x5, 0x0, 0xa, 0x17, 0x70, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3f, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0xa, 0x2, (byte) 0x86, (byte) 0xdd, (byte) 0x80, 0x0, 0x14, 0x1, 0x6, (byte) 0x80, 0x0, 0x35, 0x20, 0x1c, (byte) 0xca, (byte) 0xfe, 0x1c, (byte) 0xb1, 0x10, 0x1c, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf0, (byte) 0xff, (byte) 0xff, 0x1c, 0x2c, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x7, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowModifyStrict.Builder builder = factory.buildFlowModifyStrict();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowModifyStrict flowModifyStrict = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowModifyStrict.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_MODIFY_STRICT_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowModifyStrict.Builder builder = factory.buildFlowModifyStrict();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowModifyStrict flowModifyStrictBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_MODIFY_STRICT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowModifyStrict flowModifyStrictRead = OFFlowModifyStrictVer13.READER.readFrom(input);
+ assertEquals(FLOW_MODIFY_STRICT_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowModifyStrictBuilt, flowModifyStrictRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_MODIFY_STRICT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowModifyStrict flowModifyStrict = OFFlowModifyStrictVer13.READER.readFrom(input);
+ assertEquals(FLOW_MODIFY_STRICT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowModifyStrict.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_MODIFY_STRICT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13Test.java
new file mode 100644
index 0000000..75cb4be
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowModifyVer13Test.java
@@ -0,0 +1,147 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowModifyVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_MODIFY_SERIALIZED =
+ new byte[] { 0x4, 0xe, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, (byte) 0xff, 0x0, 0x3, 0x1, 0x0, 0x5, 0x0, 0xa, 0x17, 0x70, 0x0, 0x0, 0x0, 0x32, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3f, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0xa, 0x2, (byte) 0x86, (byte) 0xdd, (byte) 0x80, 0x0, 0x14, 0x1, 0x6, (byte) 0x80, 0x0, 0x35, 0x20, 0x1c, (byte) 0xca, (byte) 0xfe, 0x1c, (byte) 0xb1, 0x10, 0x1c, 0x0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf0, (byte) 0xff, (byte) 0xff, 0x1c, 0x2c, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x8, 0x7, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFFlowModify.Builder builder = factory.buildFlowModify();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowModify flowModify = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowModify.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_MODIFY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFFlowModify.Builder builder = factory.buildFlowModify();
+ builder.setXid(0x12345678)
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+ .setTableId(TableId.of(3))
+ .setIdleTimeout(5)
+ .setHardTimeout(10)
+ .setPriority(6000)
+ .setBufferId(OFBufferId.of(50))
+ .setOutPort(OFPort.of(6))
+ .setOutGroup(OFGroup.of(8))
+ .setFlags(ImmutableSet.<OFFlowModFlags>of())
+ .setMatch(
+ factory.buildMatch()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+ .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+ .setMasked(MatchField.IPV6_SRC,
+ IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+ IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+ .build()
+ )
+ .setInstructions(
+ ImmutableList.<OFInstruction>of(
+ factory.instructions().gotoTable(TableId.of(4)),
+ factory.instructions().gotoTable(TableId.of(7))
+ )
+ );;
+ OFFlowModify flowModifyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_MODIFY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowModify flowModifyRead = OFFlowModifyVer13.READER.readFrom(input);
+ assertEquals(FLOW_MODIFY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(flowModifyBuilt, flowModifyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_MODIFY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowModify flowModify = OFFlowModifyVer13.READER.readFrom(input);
+ assertEquals(FLOW_MODIFY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowModify.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_MODIFY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13Test.java
new file mode 100644
index 0000000..2f5862b
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFFlowRemovedVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFFlowRemovedVer13Test {
+ OFFactory factory;
+
+ final static byte[] FLOW_REMOVED_SERIALIZED =
+ new byte[] { 0x4, 0xb, 0x0, 0x48, 0x12, 0x34, 0x56, 0x78, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, 0x42, 0x68, 0x2, 0x14, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x3, (byte) 0xe8, 0x0, 0x5, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 0x16, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0x2a, 0x2, 0x0, 0x1, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(FLOW_REMOVED_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFFlowRemoved flowRemoved = OFFlowRemovedVer13.READER.readFrom(input);
+ assertEquals(FLOW_REMOVED_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ flowRemoved.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(FLOW_REMOVED_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13Test.java
new file mode 100644
index 0000000..c9f9933
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigReplyVer13Test.java
@@ -0,0 +1,100 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.EnumSet;
+import java.util.Set;
+import com.google.common.collect.Sets;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFGetConfigReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] GET_CONFIG_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x8, 0x0, 0xc, 0x12, 0x34, 0x56, 0x78, 0x0, 0x2, (byte) 0xff, (byte) 0xff };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFGetConfigReply.Builder builder = factory.buildGetConfigReply();
+ builder.setXid(0x12345678)
+ .setFlags(Sets.immutableEnumSet(OFConfigFlags.FRAG_REASM))
+ .setMissSendLen(0xffff)
+ .build();
+ OFGetConfigReply getConfigReply = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ getConfigReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GET_CONFIG_REPLY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFGetConfigReply.Builder builder = factory.buildGetConfigReply();
+ builder.setXid(0x12345678)
+ .setFlags(Sets.immutableEnumSet(OFConfigFlags.FRAG_REASM))
+ .setMissSendLen(0xffff)
+ .build();
+ OFGetConfigReply getConfigReplyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GET_CONFIG_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGetConfigReply getConfigReplyRead = OFGetConfigReplyVer13.READER.readFrom(input);
+ assertEquals(GET_CONFIG_REPLY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(getConfigReplyBuilt, getConfigReplyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GET_CONFIG_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGetConfigReply getConfigReply = OFGetConfigReplyVer13.READER.readFrom(input);
+ assertEquals(GET_CONFIG_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ getConfigReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GET_CONFIG_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13Test.java
new file mode 100644
index 0000000..8ad0cdd
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGetConfigRequestVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFGetConfigRequestVer13Test {
+ OFFactory factory;
+
+ final static byte[] GET_CONFIG_REQUEST_SERIALIZED =
+ new byte[] { 0x4, 0x7, 0x0, 0x8, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GET_CONFIG_REQUEST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGetConfigRequest getConfigRequest = OFGetConfigRequestVer13.READER.readFrom(input);
+ assertEquals(GET_CONFIG_REQUEST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ getConfigRequest.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GET_CONFIG_REQUEST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13Test.java
new file mode 100644
index 0000000..e5e12e6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupDescStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFGroupDescStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] GROUP_DESC_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, 0x0, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x3, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x30, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x3, 0x0, 0x0, 0x0, 0x0, 0x2 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GROUP_DESC_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGroupDescStatsReply groupDescStatsReply = OFGroupDescStatsReplyVer13.READER.readFrom(input);
+ assertEquals(GROUP_DESC_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ groupDescStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GROUP_DESC_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13Test.java
new file mode 100644
index 0000000..2e5fe81
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupModifyVer13Test.java
@@ -0,0 +1,145 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import java.util.List;
+import com.google.common.collect.ImmutableList;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFGroupModifyVer13Test {
+ OFFactory factory;
+
+ final static byte[] GROUP_MODIFY_SERIALIZED =
+ new byte[] { 0x4, 0xf, 0x0, 0x70, 0x12, 0x34, 0x56, 0x78, 0x0, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x30, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFGroupModify.Builder builder = factory.buildGroupModify();
+ OFActions actions = factory.actions();
+ builder
+ .setXid(0x12345678)
+ .setGroupType(OFGroupType.FF)
+ .setGroup(OFGroup.of(5))
+ .setBuckets(ImmutableList.<OFBucket>of(
+ factory.buildBucket()
+ .setWeight(1)
+ .setWatchPort(OFPort.of(5))
+ .setWatchGroup(OFGroup.ANY)
+ .setActions(ImmutableList.<OFAction>of(
+ actions.output(OFPort.of(5), 0),
+ actions.output(OFPort.of(6), 0)
+ ))
+ .build(),
+ factory.buildBucket()
+ .setWeight(1)
+ .setWatchPort(OFPort.of(6))
+ .setWatchGroup(OFGroup.ANY)
+ .setActions(ImmutableList.<OFAction>of(
+ actions.output(OFPort.of(5), 0),
+ actions.output(OFPort.of(6), 0)
+ ))
+ .build()
+ )
+ )
+ .build();;
+ OFGroupModify groupModify = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ groupModify.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GROUP_MODIFY_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFGroupModify.Builder builder = factory.buildGroupModify();
+ OFActions actions = factory.actions();
+ builder
+ .setXid(0x12345678)
+ .setGroupType(OFGroupType.FF)
+ .setGroup(OFGroup.of(5))
+ .setBuckets(ImmutableList.<OFBucket>of(
+ factory.buildBucket()
+ .setWeight(1)
+ .setWatchPort(OFPort.of(5))
+ .setWatchGroup(OFGroup.ANY)
+ .setActions(ImmutableList.<OFAction>of(
+ actions.output(OFPort.of(5), 0),
+ actions.output(OFPort.of(6), 0)
+ ))
+ .build(),
+ factory.buildBucket()
+ .setWeight(1)
+ .setWatchPort(OFPort.of(6))
+ .setWatchGroup(OFGroup.ANY)
+ .setActions(ImmutableList.<OFAction>of(
+ actions.output(OFPort.of(5), 0),
+ actions.output(OFPort.of(6), 0)
+ ))
+ .build()
+ )
+ )
+ .build();;
+ OFGroupModify groupModifyBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GROUP_MODIFY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGroupModify groupModifyRead = OFGroupModifyVer13.READER.readFrom(input);
+ assertEquals(GROUP_MODIFY_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(groupModifyBuilt, groupModifyRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GROUP_MODIFY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGroupModify groupModify = OFGroupModifyVer13.READER.readFrom(input);
+ assertEquals(GROUP_MODIFY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ groupModify.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GROUP_MODIFY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13Test.java
new file mode 100644
index 0000000..7a71ee6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFGroupStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFGroupStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] GROUP_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x48, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x64 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(GROUP_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFGroupStatsReply groupStatsReply = OFGroupStatsReplyVer13.READER.readFrom(input);
+ assertEquals(GROUP_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ groupStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(GROUP_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13Test.java
new file mode 100644
index 0000000..a7eab1c2
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloElemVersionbitmapVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFHelloElemVersionbitmapVer13Test {
+ OFFactory factory;
+
+ final static byte[] HELLO_ELEM_VERSIONBITMAP_SERIALIZED =
+ new byte[] { 0x0, 0x1, 0x0, 0xc, 0x1, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(HELLO_ELEM_VERSIONBITMAP_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFHelloElemVersionbitmap helloElemVersionbitmap = OFHelloElemVersionbitmapVer13.READER.readFrom(input);
+ assertEquals(HELLO_ELEM_VERSIONBITMAP_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ helloElemVersionbitmap.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(HELLO_ELEM_VERSIONBITMAP_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13Test.java
new file mode 100644
index 0000000..587f8d0
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFHelloVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFHelloVer13Test {
+ OFFactory factory;
+
+ final static byte[] HELLO_SERIALIZED =
+ new byte[] { 0x4, 0x0, 0x0, 0x20, 0x12, 0x34, 0x56, 0x78, 0x0, 0x1, 0x0, 0xc, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x1, 0x0, 0xc, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(HELLO_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFHello hello = OFHelloVer13.READER.readFrom(input);
+ assertEquals(HELLO_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ hello.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(HELLO_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13Test.java
new file mode 100644
index 0000000..e578baa
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionBsnDisableSrcMacCheckVer13Test.java
@@ -0,0 +1,87 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFInstructionBsnDisableSrcMacCheckVer13Test {
+ OFInstructions factory;
+
+ final static byte[] INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED =
+ new byte[] { (byte) 0xff, (byte) 0xff, 0x0, 0x10, 0x0, 0x5c, 0x16, (byte) 0xc7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFInstructionsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFInstructionBsnDisableSrcMacCheck instructionBsnDisableSrcMacCheck = factory.bsnDisableSrcMacCheck();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ instructionBsnDisableSrcMacCheck.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFInstructionBsnDisableSrcMacCheck instructionBsnDisableSrcMacCheckBuilt = factory.bsnDisableSrcMacCheck();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFInstructionBsnDisableSrcMacCheck instructionBsnDisableSrcMacCheckRead = OFInstructionBsnDisableSrcMacCheckVer13.READER.readFrom(input);
+ assertEquals(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(instructionBsnDisableSrcMacCheckBuilt, instructionBsnDisableSrcMacCheckRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFInstructionBsnDisableSrcMacCheck instructionBsnDisableSrcMacCheck = OFInstructionBsnDisableSrcMacCheckVer13.READER.readFrom(input);
+ assertEquals(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ instructionBsnDisableSrcMacCheck.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13Test.java
new file mode 100644
index 0000000..60c2e6a
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionGotoTableVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFInstructionGotoTableVer13Test {
+ OFInstructions factory;
+
+ final static byte[] INSTRUCTION_GOTO_TABLE_SERIALIZED =
+ new byte[] { 0x0, 0x1, 0x0, 0x8, 0x5, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFInstructionsVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(INSTRUCTION_GOTO_TABLE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFInstructionGotoTable instructionGotoTable = OFInstructionGotoTableVer13.READER.readFrom(input);
+ assertEquals(INSTRUCTION_GOTO_TABLE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ instructionGotoTable.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(INSTRUCTION_GOTO_TABLE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13Test.java
new file mode 100644
index 0000000..3e7139a
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFInstructionIdGotoTableVer13Test.java
@@ -0,0 +1,87 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFInstructionIdGotoTableVer13Test {
+ OFInstructionIds factory;
+
+ final static byte[] INSTRUCTION_ID_GOTO_TABLE_SERIALIZED =
+ new byte[] { 0x0, 0x1, 0x0, 0x4 };
+
+ @Before
+ public void setup() {
+ factory = OFInstructionIdsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFInstructionIdGotoTable instructionIdGotoTable = factory.gotoTable();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ instructionIdGotoTable.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFInstructionIdGotoTable instructionIdGotoTableBuilt = factory.gotoTable();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFInstructionIdGotoTable instructionIdGotoTableRead = OFInstructionIdGotoTableVer13.READER.readFrom(input);
+ assertEquals(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(instructionIdGotoTableBuilt, instructionIdGotoTableRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFInstructionIdGotoTable instructionIdGotoTable = OFInstructionIdGotoTableVer13.READER.readFrom(input);
+ assertEquals(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ instructionIdGotoTable.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(INSTRUCTION_ID_GOTO_TABLE_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13Test.java
new file mode 100644
index 0000000..8aadb17
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMatchV3Ver13Test.java
@@ -0,0 +1,101 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFMatchV3Ver13Test {
+ OFFactory factory;
+
+ final static byte[] MATCH_V3_SERIALIZED =
+ new byte[] { 0x0, 0x1, 0x0, 0x3c, (byte) 0x80, 0x0, 0x5, 0x10, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x12, 0x14, 0x12, 0x10, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, 0x12, 0x34, 0x56, 0x78, (byte) 0x80, 0x0, 0x8, 0x6, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, (byte) 0x80, 0x0, 0x20, 0x2, 0x0, 0x35, (byte) 0x80, 0x0, 0x36, 0x10, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x0, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFMatchV3.Builder builder = factory.buildMatchV3();
+ builder
+ .setMasked(MatchField.METADATA, OFMetadata.ofRaw(0xFEDCBA9812141210l), OFMetadata.ofRaw(0xFFFFFFFF12345678l))
+ .setExact(MatchField.ETH_SRC, MacAddress.of(new byte[] {1,2,3,4,5,6}))
+ .setExact(MatchField.UDP_DST, TransportPort.of(53))
+ .setExact(MatchField.IPV6_DST, IPv6Address.of(new byte[] { 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
+ 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 }));
+ OFMatchV3 matchV3 = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ matchV3.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(MATCH_V3_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFMatchV3.Builder builder = factory.buildMatchV3();
+ builder
+ .setMasked(MatchField.METADATA, OFMetadata.ofRaw(0xFEDCBA9812141210l), OFMetadata.ofRaw(0xFFFFFFFF12345678l))
+ .setExact(MatchField.ETH_SRC, MacAddress.of(new byte[] {1,2,3,4,5,6}))
+ .setExact(MatchField.UDP_DST, TransportPort.of(53))
+ .setExact(MatchField.IPV6_DST, IPv6Address.of(new byte[] { 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
+ 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 }));
+ OFMatchV3 matchV3Built = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(MATCH_V3_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFMatchV3 matchV3Read = OFMatchV3Ver13.READER.readFrom(input);
+ assertEquals(MATCH_V3_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(matchV3Built, matchV3Read);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(MATCH_V3_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFMatchV3 matchV3 = OFMatchV3Ver13.READER.readFrom(input);
+ assertEquals(MATCH_V3_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ matchV3.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(MATCH_V3_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13Test.java
new file mode 100644
index 0000000..23cb0f3
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterConfigStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFMeterConfigStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] METER_CONFIG_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, 0x30, 0x12, 0x34, 0x56, 0x78, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x10, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x10, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4, 0x5, 0x0, 0x0, 0x0 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(METER_CONFIG_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFMeterConfigStatsReply meterConfigStatsReply = OFMeterConfigStatsReplyVer13.READER.readFrom(input);
+ assertEquals(METER_CONFIG_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ meterConfigStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(METER_CONFIG_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13Test.java
new file mode 100644
index 0000000..91dfe09
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFMeterStatsReplyVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFMeterStatsReplyVer13Test {
+ OFFactory factory;
+
+ final static byte[] METER_STATS_REPLY_SERIALIZED =
+ new byte[] { 0x4, 0x13, 0x0, (byte) 0x80, 0x12, 0x34, 0x56, 0x78, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x48, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2, 0x0, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x64 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(METER_STATS_REPLY_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFMeterStatsReply meterStatsReply = OFMeterStatsReplyVer13.READER.readFrom(input);
+ assertEquals(METER_STATS_REPLY_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ meterStatsReply.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(METER_STATS_REPLY_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13Test.java
new file mode 100644
index 0000000..3b0ae82
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnGlobalVrfAllowedVer13Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmBsnGlobalVrfAllowedVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED =
+ new byte[] { 0x0, 0x3, 0x6, 0x1, 0x1 };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFOxmBsnGlobalVrfAllowed.Builder builder = factory.buildBsnGlobalVrfAllowed();
+ builder.setValue(OFBooleanValue.TRUE);
+ OFOxmBsnGlobalVrfAllowed oxmBsnGlobalVrfAllowed = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnGlobalVrfAllowed.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFOxmBsnGlobalVrfAllowed.Builder builder = factory.buildBsnGlobalVrfAllowed();
+ builder.setValue(OFBooleanValue.TRUE);
+ OFOxmBsnGlobalVrfAllowed oxmBsnGlobalVrfAllowedBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnGlobalVrfAllowed oxmBsnGlobalVrfAllowedRead = OFOxmBsnGlobalVrfAllowedVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(oxmBsnGlobalVrfAllowedBuilt, oxmBsnGlobalVrfAllowedRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnGlobalVrfAllowed oxmBsnGlobalVrfAllowed = OFOxmBsnGlobalVrfAllowedVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnGlobalVrfAllowed.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_GLOBAL_VRF_ALLOWED_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13Test.java
new file mode 100644
index 0000000..b4bd1be
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnL3SrcClassIdVer13Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmBsnL3SrcClassIdVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED =
+ new byte[] { 0x0, 0x3, 0xa, 0x4, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFOxmBsnL3SrcClassId.Builder builder = factory.buildBsnL3SrcClassId();
+ builder.setValue(ClassId.of(0x12345678));
+ OFOxmBsnL3SrcClassId oxmBsnL3SrcClassId = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnL3SrcClassId.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFOxmBsnL3SrcClassId.Builder builder = factory.buildBsnL3SrcClassId();
+ builder.setValue(ClassId.of(0x12345678));
+ OFOxmBsnL3SrcClassId oxmBsnL3SrcClassIdBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnL3SrcClassId oxmBsnL3SrcClassIdRead = OFOxmBsnL3SrcClassIdVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(oxmBsnL3SrcClassIdBuilt, oxmBsnL3SrcClassIdRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnL3SrcClassId oxmBsnL3SrcClassId = OFOxmBsnL3SrcClassIdVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnL3SrcClassId.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_L3_SRC_CLASS_ID_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13Test.java
new file mode 100644
index 0000000..390b37d
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmBsnLagIdVer13Test.java
@@ -0,0 +1,91 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmBsnLagIdVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_BSN_LAG_ID_SERIALIZED =
+ new byte[] { 0x0, 0x3, 0x2, 0x4, 0x12, 0x34, 0x56, 0x78 };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFOxmBsnLagId.Builder builder = factory.buildBsnLagId();
+ builder.setValue(LagId.of(0x12345678));
+ OFOxmBsnLagId oxmBsnLagId = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnLagId.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_LAG_ID_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFOxmBsnLagId.Builder builder = factory.buildBsnLagId();
+ builder.setValue(LagId.of(0x12345678));
+ OFOxmBsnLagId oxmBsnLagIdBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_LAG_ID_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnLagId oxmBsnLagIdRead = OFOxmBsnLagIdVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_LAG_ID_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(oxmBsnLagIdBuilt, oxmBsnLagIdRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_BSN_LAG_ID_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmBsnLagId oxmBsnLagId = OFOxmBsnLagIdVer13.READER.readFrom(input);
+ assertEquals(OXM_BSN_LAG_ID_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmBsnLagId.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_BSN_LAG_ID_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13Test.java
new file mode 100644
index 0000000..efd963d
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortMaskedVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmInPhyPortMaskedVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IN_PHY_PORT_MASKED_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x3, 0x8, 0x0, 0x0, 0x0, 0x2a, (byte) 0xaa, (byte) 0xbb, (byte) 0xcc, (byte) 0xdd };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IN_PHY_PORT_MASKED_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmInPhyPortMasked oxmInPhyPortMasked = OFOxmInPhyPortMaskedVer13.READER.readFrom(input);
+ assertEquals(OXM_IN_PHY_PORT_MASKED_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmInPhyPortMasked.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IN_PHY_PORT_MASKED_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13Test.java
new file mode 100644
index 0000000..06ed4ee
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmInPhyPortVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmInPhyPortVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IN_PHY_PORT_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x2, 0x4, 0x0, 0x0, 0x0, 0x2a };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IN_PHY_PORT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmInPhyPort oxmInPhyPort = OFOxmInPhyPortVer13.READER.readFrom(input);
+ assertEquals(OXM_IN_PHY_PORT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmInPhyPort.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IN_PHY_PORT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13Test.java
new file mode 100644
index 0000000..eb469f6
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFOxmIpv6DstVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFOxmIpv6DstVer13Test {
+ OFOxms factory;
+
+ final static byte[] OXM_IPV6_DST_SERIALIZED =
+ new byte[] { (byte) 0x80, 0x0, 0x36, 0x10, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf };
+
+ @Before
+ public void setup() {
+ factory = OFOxmsVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(OXM_IPV6_DST_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFOxmIpv6Dst oxmIpv6Dst = OFOxmIpv6DstVer13.READER.readFrom(input);
+ assertEquals(OXM_IPV6_DST_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ oxmIpv6Dst.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(OXM_IPV6_DST_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13Test.java
new file mode 100644
index 0000000..4463de8
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketInVer13Test.java
@@ -0,0 +1,117 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPacketInVer13Test {
+ OFFactory factory;
+
+ final static byte[] PACKET_IN_SERIALIZED =
+ new byte[] { 0x4, 0xa, 0x0, 0x35, 0x12, 0x34, 0x56, 0x78, 0x0, 0x0, 0x0, 0x64, 0x42, 0x68, 0x1, 0x14, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, 0x76, 0x54, 0x32, 0x10, 0x0, 0x1, 0x0, 0x16, (byte) 0x80, 0x0, 0x1, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x5, (byte) 0x80, 0x0, 0x2a, 0x2, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ @Test
+ public void testWrite() {
+ OFPacketIn.Builder builder = factory.buildPacketIn();
+ builder
+ .setXid(0x12345678)
+ .setBufferId(OFBufferId.of(100))
+ .setTotalLen(17000)
+ .setReason(OFPacketInReason.ACTION)
+ .setTableId(TableId.of(20))
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setMatch(
+ factory.buildMatchV3()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
+ .build()
+ )
+ .setData(new byte[] { 97, 98, 99 } );;
+ OFPacketIn packetIn = builder.build();
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetIn.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_IN_SERIALIZED));
+ }
+
+ @Test
+ public void testRead() throws Exception {
+ OFPacketIn.Builder builder = factory.buildPacketIn();
+ builder
+ .setXid(0x12345678)
+ .setBufferId(OFBufferId.of(100))
+ .setTotalLen(17000)
+ .setReason(OFPacketInReason.ACTION)
+ .setTableId(TableId.of(20))
+ .setCookie(U64.parseHex("FEDCBA9876543210"))
+ .setMatch(
+ factory.buildMatchV3()
+ .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+ .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
+ .build()
+ )
+ .setData(new byte[] { 97, 98, 99 } );;
+ OFPacketIn packetInBuilt = builder.build();
+
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_IN_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketIn packetInRead = OFPacketInVer13.READER.readFrom(input);
+ assertEquals(PACKET_IN_SERIALIZED.length, input.readerIndex());
+
+ assertEquals(packetInBuilt, packetInRead);
+ }
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_IN_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketIn packetIn = OFPacketInVer13.READER.readFrom(input);
+ assertEquals(PACKET_IN_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetIn.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_IN_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13Test.java
new file mode 100644
index 0000000..faef63f
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPacketOutVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPacketOutVer13Test {
+ OFFactory factory;
+
+ final static byte[] PACKET_OUT_SERIALIZED =
+ new byte[] { 0x4, 0xd, 0x0, 0x33, 0x12, 0x34, 0x56, 0x78, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x0, 0x4, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2, (byte) 0xff, (byte) 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x61, 0x62, 0x63 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PACKET_OUT_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPacketOut packetOut = OFPacketOutVer13.READER.readFrom(input);
+ assertEquals(PACKET_OUT_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ packetOut.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PACKET_OUT_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13Test.java
new file mode 100644
index 0000000..b37030b
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFPortStatusVer13Test.java
@@ -0,0 +1,65 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFPortStatusVer13Test {
+ OFFactory factory;
+
+ final static byte[] PORT_STATUS_SERIALIZED =
+ new byte[] { 0x4, 0xc, 0x0, 0x50, 0x12, 0x34, 0x56, 0x78, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x0, 0x0, 0x66, 0x6f, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x14 };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(PORT_STATUS_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFPortStatus portStatus = OFPortStatusVer13.READER.readFrom(input);
+ assertEquals(PORT_STATUS_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ portStatus.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(PORT_STATUS_SERIALIZED));
+ }
+
+}
diff --git a/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13Test.java b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13Test.java
new file mode 100644
index 0000000..aeeb935
--- /dev/null
+++ b/of-save/lib/gen-src/test/java/org/projectfloodlight/openflow/protocol/ver13/OFSetConfigVer13Test.java
@@ -0,0 +1,66 @@
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+// This library was generated by the LoxiGen Compiler.
+// See the file LICENSE.txt which should have been included in the source distribution
+
+// Automatically generated by LOXI from template unit_test.java
+// Do not modify
+
+package org.projectfloodlight.openflow.protocol.ver13;
+
+import org.projectfloodlight.openflow.protocol.*;
+import org.projectfloodlight.openflow.protocol.action.*;
+import org.projectfloodlight.openflow.protocol.actionid.*;
+import org.projectfloodlight.openflow.protocol.bsntlv.*;
+import org.projectfloodlight.openflow.protocol.errormsg.*;
+import org.projectfloodlight.openflow.protocol.meterband.*;
+import org.projectfloodlight.openflow.protocol.instruction.*;
+import org.projectfloodlight.openflow.protocol.instructionid.*;
+import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.queueprop.*;
+import org.projectfloodlight.openflow.types.*;
+import org.projectfloodlight.openflow.util.*;
+import org.projectfloodlight.openflow.exceptions.*;
+import static org.junit.Assert.*;
+import java.util.Set;
+import org.junit.Test;
+import org.junit.Before;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffers;
+import org.hamcrest.CoreMatchers;
+
+
+
+public class OFSetConfigVer13Test {
+ OFFactory factory;
+
+ final static byte[] SET_CONFIG_SERIALIZED =
+ new byte[] { 0x4, 0x9, 0x0, 0xc, 0x12, 0x34, 0x56, 0x78, 0x0, 0x2, (byte) 0xff, (byte) 0xff };
+
+ @Before
+ public void setup() {
+ factory = OFFactoryVer13.INSTANCE;
+ }
+
+ // FIXME: No java stanza in test_data for this class. Add for more comprehensive unit testing
+
+ @Test
+ public void testReadWrite() throws Exception {
+ ChannelBuffer input = ChannelBuffers.copiedBuffer(SET_CONFIG_SERIALIZED);
+
+ // FIXME should invoke the overall reader once implemented
+ OFSetConfig setConfig = OFSetConfigVer13.READER.readFrom(input);
+ assertEquals(SET_CONFIG_SERIALIZED.length, input.readerIndex());
+
+ // write message again
+ ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+ setConfig.writeTo(bb);
+ byte[] written = new byte[bb.readableBytes()];
+ bb.readBytes(written);
+
+ assertThat(written, CoreMatchers.equalTo(SET_CONFIG_SERIALIZED));
+ }
+
+}