Yuta HIGUCHI

Register FlowId to Kryo

Change-Id: Ic6bff17cff78f8b95350a97e89782e9c6ae8ce7e
......@@ -26,6 +26,7 @@ import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.device.DefaultDeviceDescription;
import org.onlab.onos.net.device.DefaultPortDescription;
import org.onlab.onos.net.flow.DefaultFlowRule;
import org.onlab.onos.net.flow.FlowId;
import org.onlab.onos.net.host.DefaultHostDescription;
import org.onlab.onos.net.host.HostDescription;
import org.onlab.onos.net.link.DefaultLinkDescription;
......@@ -86,7 +87,8 @@ public final class KryoNamespaces {
HostId.class,
HostDescription.class,
DefaultHostDescription.class,
DefaultFlowRule.class
DefaultFlowRule.class,
FlowId.class
)
.register(URI.class, new URISerializer())
.register(NodeId.class, new NodeIdSerializer())
......
......@@ -25,6 +25,7 @@ import org.onlab.onos.net.Link;
import org.onlab.onos.net.LinkKey;
import org.onlab.onos.net.PortNumber;
import org.onlab.onos.net.SparseAnnotations;
import org.onlab.onos.net.flow.FlowId;
import org.onlab.onos.net.provider.ProviderId;
import org.onlab.packet.ChassisId;
import org.onlab.packet.IpAddress;
......@@ -192,6 +193,11 @@ public class KryoSerializerTest {
}
@Test
public void testFlowId() {
testSerialized(FlowId.valueOf(0x12345678L));
}
@Test
public void testAnnotations() {
// Annotations does not have equals defined, manually test equality
final byte[] a1Bytes = serializer.encode(A1);
......