Bug 5540 - ConvertorManager base
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / action / ActionSetNwSrcConvertorImpl.java
index 6702c0524ac89587a446340cad1e4904c16c2c37..0b58ae0c5dd5ad7f2d10051d7e954bb56c3d9689 100644 (file)
@@ -8,8 +8,7 @@
 
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action;
 
-import java.math.BigInteger;
-
+import com.google.common.base.Splitter;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Convertor;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
@@ -18,8 +17,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.addr
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv4;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.address.address.Ipv6;
 
-import com.google.common.base.Splitter;
-
 /**
  * Utility class for converting a MD-SAL action subelement into the OF subelement
  */
@@ -28,7 +25,12 @@ public class ActionSetNwSrcConvertorImpl implements Convertor<SetNwSrcActionCase
     private static final Splitter PREFIX_SPLITTER = Splitter.on('/');
 
     @Override
-    public Object convert(final SetNwSrcActionCase source, final BigInteger datapathid) {
+    public Class<?> getType() {
+        return SetNwSrcActionCase.class;
+    }
+
+    @Override
+    public Object convert(final SetNwSrcActionCase source) {
         Address address = source.getSetNwSrcAction().getAddress();
         if (address instanceof Ipv4) {
             Iterable<String> addressParts = PREFIX_SPLITTER.split(((Ipv4) address).getIpv4Address().getValue());