BUG:6997 supporting OXM_OF_MPLS_LABEL in nicira extensiona
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / main / java / org / opendaylight / openflowjava / nx / NiciraExtensionsRegistrator.java
index ee74ca551fd1b25b42bb115c0a99047b9fc7606d..f182d8f5039ec2ca14c85792412435bdc1ea92cc 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowjava.nx;
 
 import org.opendaylight.openflowjava.nx.api.NiciraExtensionCodecRegistrator;
 import org.opendaylight.openflowjava.nx.codec.action.ConntrackCodec;
+import org.opendaylight.openflowjava.nx.codec.action.LearnCodec;
 import org.opendaylight.openflowjava.nx.codec.action.MultipathCodec;
 import org.opendaylight.openflowjava.nx.codec.action.NiciraActionCodecs;
 import org.opendaylight.openflowjava.nx.codec.action.OutputRegCodec;
@@ -55,6 +56,8 @@ import org.opendaylight.openflowjava.nx.codec.match.TunIpv4DstCodec;
 import org.opendaylight.openflowjava.nx.codec.match.TunIpv4SrcCodec;
 import org.opendaylight.openflowjava.nx.codec.match.UdpDstCodec;
 import org.opendaylight.openflowjava.nx.codec.match.UdpSrcCodec;
+import org.opendaylight.openflowjava.nx.codec.match.InPortCodec;
+import org.opendaylight.openflowjava.nx.codec.match.MplsLabelCodec;
 
 import com.google.common.base.Preconditions;
 
@@ -88,6 +91,8 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
 
         registrator.registerActionSerializer(ConntrackCodec.SERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
         registrator.registerActionDeserializer(ConntrackCodec.DESERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
+        registrator.registerActionSerializer(LearnCodec.SERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
+        registrator.registerActionDeserializer(LearnCodec.DESERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
         //Continue
 
 
@@ -119,6 +124,10 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.registerMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_THA_CODEC);
         registrator.registerMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
         registrator.registerMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
+        registrator.registerMatchEntrySerializer(InPortCodec.SERIALIZER_KEY, NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
+        registrator.registerMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
+        registrator.registerMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY, NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
+        registrator.registerMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY, NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
         registrator.registerMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
         registrator.registerMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
         registrator.registerMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_SRC_CODEC);
@@ -185,6 +194,8 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.unregisterActionSerializer(PopNshCodec.SERIALIZER_KEY);
         registrator.unregisterActionSerializer(ConntrackCodec.SERIALIZER_KEY);
         registrator.unregisterActionDeserializer(ConntrackCodec.DESERIALIZER_KEY);
+        registrator.unregisterActionSerializer(LearnCodec.SERIALIZER_KEY);
+        registrator.unregisterActionDeserializer(LearnCodec.DESERIALIZER_KEY);
         //CONTINUE
         registrator.unregisterMatchEntrySerializer(Reg0Codec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(Reg0Codec.DESERIALIZER_KEY);
@@ -214,6 +225,10 @@ public class NiciraExtensionsRegistrator implements AutoCloseable {
         registrator.unregisterMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(InPortCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY);
+        registrator.unregisterMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY);
+        registrator.unregisterMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY);
         registrator.unregisterMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY);
         registrator.unregisterMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY);