Yuta HIGUCHI

Register FlowId to Kryo

Change-Id: Ic6bff17cff78f8b95350a97e89782e9c6ae8ce7e
...@@ -26,6 +26,7 @@ import org.onlab.onos.net.PortNumber; ...@@ -26,6 +26,7 @@ import org.onlab.onos.net.PortNumber;
26 import org.onlab.onos.net.device.DefaultDeviceDescription; 26 import org.onlab.onos.net.device.DefaultDeviceDescription;
27 import org.onlab.onos.net.device.DefaultPortDescription; 27 import org.onlab.onos.net.device.DefaultPortDescription;
28 import org.onlab.onos.net.flow.DefaultFlowRule; 28 import org.onlab.onos.net.flow.DefaultFlowRule;
29 +import org.onlab.onos.net.flow.FlowId;
29 import org.onlab.onos.net.host.DefaultHostDescription; 30 import org.onlab.onos.net.host.DefaultHostDescription;
30 import org.onlab.onos.net.host.HostDescription; 31 import org.onlab.onos.net.host.HostDescription;
31 import org.onlab.onos.net.link.DefaultLinkDescription; 32 import org.onlab.onos.net.link.DefaultLinkDescription;
...@@ -86,7 +87,8 @@ public final class KryoNamespaces { ...@@ -86,7 +87,8 @@ public final class KryoNamespaces {
86 HostId.class, 87 HostId.class,
87 HostDescription.class, 88 HostDescription.class,
88 DefaultHostDescription.class, 89 DefaultHostDescription.class,
89 - DefaultFlowRule.class 90 + DefaultFlowRule.class,
91 + FlowId.class
90 ) 92 )
91 .register(URI.class, new URISerializer()) 93 .register(URI.class, new URISerializer())
92 .register(NodeId.class, new NodeIdSerializer()) 94 .register(NodeId.class, new NodeIdSerializer())
......
...@@ -25,6 +25,7 @@ import org.onlab.onos.net.Link; ...@@ -25,6 +25,7 @@ import org.onlab.onos.net.Link;
25 import org.onlab.onos.net.LinkKey; 25 import org.onlab.onos.net.LinkKey;
26 import org.onlab.onos.net.PortNumber; 26 import org.onlab.onos.net.PortNumber;
27 import org.onlab.onos.net.SparseAnnotations; 27 import org.onlab.onos.net.SparseAnnotations;
28 +import org.onlab.onos.net.flow.FlowId;
28 import org.onlab.onos.net.provider.ProviderId; 29 import org.onlab.onos.net.provider.ProviderId;
29 import org.onlab.packet.ChassisId; 30 import org.onlab.packet.ChassisId;
30 import org.onlab.packet.IpAddress; 31 import org.onlab.packet.IpAddress;
...@@ -192,6 +193,11 @@ public class KryoSerializerTest { ...@@ -192,6 +193,11 @@ public class KryoSerializerTest {
192 } 193 }
193 194
194 @Test 195 @Test
196 + public void testFlowId() {
197 + testSerialized(FlowId.valueOf(0x12345678L));
198 + }
199 +
200 + @Test
195 public void testAnnotations() { 201 public void testAnnotations() {
196 // Annotations does not have equals defined, manually test equality 202 // Annotations does not have equals defined, manually test equality
197 final byte[] a1Bytes = serializer.encode(A1); 203 final byte[] a1Bytes = serializer.encode(A1);
......