Fix checkstyle violations in openflowplugin - part 1 22/67822/5
authorTom Pantelis <tompantelis@gmail.com>
Thu, 1 Feb 2018 01:40:55 +0000 (20:40 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 28 Feb 2018 16:43:35 +0000 (11:43 -0500)
Change-Id: Ic66142803cdbc5fcb1e27d1ba8efc62aedceba04
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
53 files changed:
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ActionExtensionHelper.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ExtensionConverterManagerImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ExtensionResolvers.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/MatchExtensionHelper.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/RegistrationCloser.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ConvertorExecutor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ConvertorManager.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ConvertorManagerFactory.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupDescStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/GroupStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/OFApprovedExperimenterIds.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/PacketOutConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/PortConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/ActionConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/ActionResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalCopyTtlInCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalCopyTtlOutCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalDecMplsTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalDecNwTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalGroupCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalOutputActionCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPopMplsCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPopPbbCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPopVlanCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPushMplsCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPushPbbCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalPushVlanCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetDlDstCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetDlSrcCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetFieldCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetMplsTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetNwDstCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetNwSrcCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetNwTosCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetNwTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetQueueCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetTpDstCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetTpSrcCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetVlanIdCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalSetVlanPcpCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/OfToSalStripVlanCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfCopyTtlInCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfCopyTtlOutCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfDecMplsTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfDecNwTtlCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfDropActionCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/cases/SalToOfGeneralExtensionGroupingCase.java

index 7ebdbe99db687f193fa309c788e215c22adb0906..fab4d004653c177ef9130bd13d035cba28ffaa2a 100644 (file)
@@ -18,26 +18,23 @@ import org.opendaylight.openflowplugin.extension.api.path.ActionPath;
 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.action.container.action.choice.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public final class ActionExtensionHelper {
 
-    private static final Logger LOG = LoggerFactory
-            .getLogger(ActionExtensionHelper.class);
-
     private ActionExtensionHelper() {
         throw new IllegalAccessError("singleton enforcement");
     }
 
     /**
+     * Processes an alien action.
+     *
      * @param action openflow action
      * @param ofVersion openflow version
      * @param actionPath openflow action path
      * @return augmentation wrapper containing augmentation depending on matchPath
      */
     public static org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action
-    processAlienAction(final Action action, final OpenflowVersion ofVersion, final ActionPath actionPath) {
+            processAlienAction(final Action action, final OpenflowVersion ofVersion, final ActionPath actionPath) {
         ConvertorActionFromOFJava<Action, ActionPath> convertor = null;
         org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action alienAction = null;
         final ExtensionConverterProvider extensionConvertorProvider = OFSessionUtil.getExtensionConvertorProvider();
@@ -46,16 +43,17 @@ public final class ActionExtensionHelper {
             return null;
         }
 
-        if(action.getActionChoice() instanceof ExperimenterIdCase) {
+        if (action.getActionChoice() instanceof ExperimenterIdCase) {
             ExperimenterIdCase actionCase = (ExperimenterIdCase) action.getActionChoice();
-            /** TODO: EXTENSION PROPOSAL (action, OFJava to MD-SAL) */
+            // TODO: EXTENSION PROPOSAL (action, OFJava to MD-SAL)
             ExperimenterActionSerializerKey key = new ExperimenterActionSerializerKey(
                     ofVersion.getVersion(),
                     actionCase.getExperimenter().getExperimenter().getValue(),
                     actionCase.getExperimenter().getSubType());
             convertor = extensionConvertorProvider.getActionConverter(key);
-        } else if (action.getActionChoice() != null){
-            ActionSerializerKey<?> key = new ActionSerializerKey(EncodeConstants.OF13_VERSION_ID, action.getActionChoice().getImplementedInterface(), null);
+        } else if (action.getActionChoice() != null) {
+            ActionSerializerKey<?> key = new ActionSerializerKey(EncodeConstants.OF13_VERSION_ID,
+                    action.getActionChoice().getImplementedInterface(), null);
             convertor = extensionConvertorProvider.getActionConverter(key);
         }
 
index 4ce824a4b28a1155f84e3d8abc85850aad23bb4b..19d61e0dbca3885dfe81e1431d5212e5fac9b3bf 100644 (file)
@@ -13,11 +13,11 @@ import org.opendaylight.openflowjava.protocol.api.keys.ActionSerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
 import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
 import org.opendaylight.openflowplugin.extension.api.ConverterExtensionKey;
+import org.opendaylight.openflowplugin.extension.api.ConverterMessageToOFJava;
 import org.opendaylight.openflowplugin.extension.api.ConvertorActionFromOFJava;
 import org.opendaylight.openflowplugin.extension.api.ConvertorActionToOFJava;
 import org.opendaylight.openflowplugin.extension.api.ConvertorFromOFJava;
 import org.opendaylight.openflowplugin.extension.api.ConvertorMessageFromOFJava;
-import org.opendaylight.openflowplugin.extension.api.ConverterMessageToOFJava;
 import org.opendaylight.openflowplugin.extension.api.ConvertorToOFJava;
 import org.opendaylight.openflowplugin.extension.api.TypeVersionKey;
 import org.opendaylight.openflowplugin.extension.api.core.extension.ExtensionConverterManager;
@@ -42,19 +42,22 @@ import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
- * simple map-based registration engine implementation
+ * Simple map-based registration engine implementation.
  */
 public class ExtensionConverterManagerImpl implements ExtensionConverterManager {
 
     private final Map<MessageTypeKey<?>, ConvertorFromOFJava<?, ?>> registryFromOFJAva;
     private final Map<ConverterExtensionKey<?>, ConvertorToOFJava<?>> registryToOFJAva;
-    private final Map<TypeVersionKey<? extends Action>, ConvertorActionToOFJava<? extends Action, ? extends DataContainer>> registryActionToOFJAva;
+    private final Map<TypeVersionKey<? extends Action>, ConvertorActionToOFJava<? extends Action,
+            ? extends DataContainer>> registryActionToOFJAva;
     private final Map<MessageTypeKey<?>, ConvertorActionFromOFJava<?, ?>> registryActionFromOFJAva;
-    private final Map<TypeVersionKey<?>, ConverterMessageToOFJava<? extends ExperimenterMessageOfChoice, ? extends DataContainer>> registryMessageToOFJAva;
-    private final Map<MessageTypeKey<?>, ConvertorMessageFromOFJava<? extends ExperimenterDataOfChoice, MessagePath>> registryMessageFromOFJAva;
+    private final Map<TypeVersionKey<?>, ConverterMessageToOFJava<? extends ExperimenterMessageOfChoice,
+            ? extends DataContainer>> registryMessageToOFJAva;
+    private final Map<MessageTypeKey<?>, ConvertorMessageFromOFJava<? extends ExperimenterDataOfChoice, MessagePath>>
+            registryMessageFromOFJAva;
 
     /**
-     * default ctor
+     * Default constructor.
      */
     public ExtensionConverterManagerImpl() {
         registryFromOFJAva = new ConcurrentHashMap<>();
@@ -66,14 +69,16 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <FROM extends DataContainer, PATH extends AugmentationPath, KEY extends MessageTypeKey<?>>
-    RegistrationCloserFromOFJava<FROM, PATH> hireJanitor(
-            final KEY key, final ConvertorFromOFJava<FROM, PATH> extConvertor) {
-        RegistrationCloserFromOFJava<FROM, PATH> janitor = new RegistrationCloser.RegistrationCloserFromOFJava<>();
+    private <F extends DataContainer, P extends AugmentationPath, K extends MessageTypeKey<?>>
+            RegistrationCloserFromOFJava<F, P> hireJanitor(final K key,
+                    final ConvertorFromOFJava<F, P> extConvertor) {
+        RegistrationCloserFromOFJava<F, P> janitor = new RegistrationCloser.RegistrationCloserFromOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -81,14 +86,17 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message type key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <FROM extends DataContainer, PATH extends AugmentationPath, KEY extends MessageTypeKey<?>>
-    RegistrationCloserActionFromOFJava<FROM, PATH> hireJanitor(
-            final KEY key, final ConvertorActionFromOFJava<FROM, PATH> extConvertor) {
-        RegistrationCloserActionFromOFJava<FROM, PATH> janitor = new RegistrationCloser.RegistrationCloserActionFromOFJava<>();
+    private <F extends DataContainer, P extends AugmentationPath, K extends MessageTypeKey<?>>
+            RegistrationCloserActionFromOFJava<F, P> hireJanitor(
+                final K key, final ConvertorActionFromOFJava<F, P> extConvertor) {
+        RegistrationCloserActionFromOFJava<F, P> janitor =
+                new RegistrationCloser.RegistrationCloserActionFromOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -96,13 +104,15 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message type key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <TO extends DataContainer> RegistrationCloserToOFJava<TO> hireJanitor(
-            final ConverterExtensionKey<? extends ExtensionKey> key, final ConvertorToOFJava<TO> extConvertor) {
-        RegistrationCloserToOFJava<TO> janitor = new RegistrationCloser.RegistrationCloserToOFJava<>();
+    private <T extends DataContainer> RegistrationCloserToOFJava<T> hireJanitor(
+            final ConverterExtensionKey<? extends ExtensionKey> key, final ConvertorToOFJava<T> extConvertor) {
+        RegistrationCloserToOFJava<T> janitor = new RegistrationCloser.RegistrationCloserToOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -110,13 +120,15 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message type key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <TO extends DataContainer> RegistrationCloserActionToOFJava<TO> hireJanitor(
-            final TypeVersionKey<? extends Action> key, final ConvertorActionToOFJava<Action, TO> extConvertor) {
-        RegistrationCloserActionToOFJava<TO> janitor = new RegistrationCloser.RegistrationCloserActionToOFJava<>();
+    private <T extends DataContainer> RegistrationCloserActionToOFJava<T> hireJanitor(
+            final TypeVersionKey<? extends Action> key, final ConvertorActionToOFJava<Action, T> extConvertor) {
+        RegistrationCloserActionToOFJava<T> janitor = new RegistrationCloser.RegistrationCloserActionToOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -124,14 +136,15 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message type key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <TO extends DataContainer, K extends ExperimenterMessageOfChoice> RegistrationCloserMessageToOFJava<TO, K> hireMessageJanitor(
-            final TypeVersionKey<K> key,
-            final ConverterMessageToOFJava<K, TO> extConvertor) {
-        RegistrationCloserMessageToOFJava<TO, K> janitor = new RegistrationCloserMessageToOFJava<>();
+    private <T extends DataContainer, K extends ExperimenterMessageOfChoice> RegistrationCloserMessageToOFJava<T, K>
+            hireMessageJanitor(final TypeVersionKey<K> key, final ConverterMessageToOFJava<K, T> extConvertor) {
+        RegistrationCloserMessageToOFJava<T, K> janitor = new RegistrationCloserMessageToOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -139,14 +152,16 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
+     * Creates a registration closer.
+     *
      * @param key message type key
      * @param extConvertor extension convertor
      * @return registration closure
      */
-    private <FROM extends DataContainer, PATH extends AugmentationPath, KEY extends MessageTypeKey<?>>
-    RegistrationCloserMessageFromOFJava<FROM, PATH> hireMessageJanitor(
-            final KEY key, final ConvertorMessageFromOFJava<FROM, PATH> extConvertor) {
-        RegistrationCloserMessageFromOFJava<FROM, PATH> janitor = new RegistrationCloserMessageFromOFJava<>();
+    private <F extends DataContainer, P extends AugmentationPath, K extends MessageTypeKey<?>>
+            RegistrationCloserMessageFromOFJava<F, P> hireMessageJanitor(
+                final K key, final ConvertorMessageFromOFJava<F, P> extConvertor) {
+        RegistrationCloserMessageFromOFJava<F, P> janitor = new RegistrationCloserMessageFromOFJava<>();
         janitor.setConverter(extConvertor);
         janitor.setKey(key);
         janitor.setRegistrator(this);
@@ -154,7 +169,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -167,7 +182,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -180,7 +195,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -193,7 +208,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -206,7 +221,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -219,7 +234,7 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     /**
-     * cancel registration of given converter
+     * Cancel registration of given converter.
      *
      * @param key message key
      * @param converter extension convertor
@@ -233,53 +248,54 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
 
     @SuppressWarnings("unchecked")
     @Override
-    public <FROM extends DataContainer> ConvertorToOFJava<FROM> getConverter(
+    public <F extends DataContainer> ConvertorToOFJava<F> getConverter(
             final ConverterExtensionKey<?> key) {
-        return (ConvertorToOFJava<FROM>) registryToOFJAva.get(key);
+        return (ConvertorToOFJava<F>) registryToOFJAva.get(key);
     }
 
     @SuppressWarnings("unchecked")
     @Override
-    public <FROM extends Action, TO extends DataContainer> ConvertorActionToOFJava<FROM, TO> getConverter(
-            final TypeVersionKey<FROM> key) {
-        return (ConvertorActionToOFJava<FROM, TO>) registryActionToOFJAva.get(key);
+    public <F extends Action, T extends DataContainer> ConvertorActionToOFJava<F, T> getConverter(
+            final TypeVersionKey<F> key) {
+        return (ConvertorActionToOFJava<F, T>) registryActionToOFJAva.get(key);
     }
 
     @SuppressWarnings("unchecked")
     @Override
-    public <FROM extends DataContainer, PATH extends AugmentationPath> ConvertorFromOFJava<FROM, PATH> getConverter(
+    public <F extends DataContainer, P extends AugmentationPath> ConvertorFromOFJava<F, P> getConverter(
             final MessageTypeKey<?> key) {
-        return (ConvertorFromOFJava<FROM, PATH>) registryFromOFJAva.get(key);
+        return (ConvertorFromOFJava<F, P>) registryFromOFJAva.get(key);
     }
 
     @SuppressWarnings("unchecked")
     @Override
-    public <FROM extends DataContainer, PATH extends AugmentationPath> ConvertorActionFromOFJava<FROM, PATH> getActionConverter(
+    public <F extends DataContainer, P extends AugmentationPath> ConvertorActionFromOFJava<F, P> getActionConverter(
             final MessageTypeKey<?> key) {
-        return (ConvertorActionFromOFJava<FROM, PATH>) registryActionFromOFJAva.get(key);
+        return (ConvertorActionFromOFJava<F, P>) registryActionFromOFJAva.get(key);
     }
 
     @Override
-    public ObjectRegistration<ConvertorActionToOFJava<Action, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action>>
-    registerActionConvertor(
-            final TypeVersionKey<? extends Action> key,
-            final ConvertorActionToOFJava<Action, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action> convertor) {
+    public ObjectRegistration<ConvertorActionToOFJava<Action, org.opendaylight.yang.gen.v1.urn.opendaylight.openflow
+            .common.action.rev150203.actions.grouping.Action>> registerActionConvertor(
+                final TypeVersionKey<? extends Action> key,final ConvertorActionToOFJava<Action, org.opendaylight
+                    .yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action> convertor) {
         registryActionToOFJAva.put(key, convertor);
         return hireJanitor(key, convertor);
     }
 
     @Override
-    public ObjectRegistration<ConvertorActionFromOFJava<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action, ActionPath>>
-    registerActionConvertor(
-            final ActionSerializerKey<?> key,
-            final ConvertorActionFromOFJava<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action, ActionPath> convertor) {
+    public ObjectRegistration<ConvertorActionFromOFJava<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common
+            .action.rev150203.actions.grouping.Action, ActionPath>> registerActionConvertor(
+                final ActionSerializerKey<?> key,
+                final ConvertorActionFromOFJava<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action
+                    .rev150203.actions.grouping.Action, ActionPath> convertor) {
         registryActionFromOFJAva.put(key, convertor);
         return hireJanitor(key, convertor);
     }
 
     @Override
-    public ObjectRegistration<ConvertorToOFJava<MatchEntry>> registerMatchConvertor(final ConverterExtensionKey<? extends ExtensionKey> key,
-                                                                                      final ConvertorToOFJava<MatchEntry> convertor) {
+    public ObjectRegistration<ConvertorToOFJava<MatchEntry>> registerMatchConvertor(
+            final ConverterExtensionKey<? extends ExtensionKey> key, final ConvertorToOFJava<MatchEntry> convertor) {
         registryToOFJAva.put(key, convertor);
         return hireJanitor(key, convertor);
     }
@@ -293,26 +309,29 @@ public class ExtensionConverterManagerImpl implements ExtensionConverterManager
     }
 
     @Override
-    public <I extends ExperimenterMessageOfChoice, O extends DataContainer> ObjectRegistration<ConverterMessageToOFJava<I, O>> registerMessageConvertor(
-            TypeVersionKey<I> key, ConverterMessageToOFJava<I, O> convertor) {
+    public <I extends ExperimenterMessageOfChoice, O extends DataContainer>
+            ObjectRegistration<ConverterMessageToOFJava<I, O>> registerMessageConvertor(
+                TypeVersionKey<I> key, ConverterMessageToOFJava<I, O> convertor) {
         registryMessageToOFJAva.put(key, convertor);
         return hireMessageJanitor(key, convertor);
     }
 
     @Override
-    public <I extends ExperimenterDataOfChoice> ObjectRegistration<ConvertorMessageFromOFJava<I, MessagePath>> registerMessageConvertor(
-            MessageTypeKey<?> key, ConvertorMessageFromOFJava<I, MessagePath> convertor) {
+    public <I extends ExperimenterDataOfChoice> ObjectRegistration<ConvertorMessageFromOFJava<I, MessagePath>>
+            registerMessageConvertor(MessageTypeKey<?> key, ConvertorMessageFromOFJava<I, MessagePath> convertor) {
         registryMessageFromOFJAva.put(key, convertor);
         return hireMessageJanitor(key, convertor);
     }
 
     @Override
-    public <F extends ExperimenterMessageOfChoice, T extends DataContainer> ConverterMessageToOFJava<F, T> getMessageConverter(TypeVersionKey<F> key) {
+    public <F extends ExperimenterMessageOfChoice, T extends DataContainer> ConverterMessageToOFJava<F, T>
+            getMessageConverter(TypeVersionKey<F> key) {
         return (ConverterMessageToOFJava<F, T>) registryMessageToOFJAva.get(key);
     }
 
     @Override
-    public <F extends DataContainer, P extends AugmentationPath> ConvertorMessageFromOFJava<F, P> getMessageConverter(MessageTypeKey<?> key) {
+    public <F extends DataContainer, P extends AugmentationPath> ConvertorMessageFromOFJava<F, P>
+           getMessageConverter(MessageTypeKey<?> key) {
         return (ConvertorMessageFromOFJava<F, P>) registryMessageFromOFJAva.get(key);
     }
 }
index 2d4bf09ea46b8c408f025635dce1a67a85026623..566f81df8d4933313baf6233a8f3cf04d883b9f2 100755 (executable)
@@ -38,7 +38,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.ge
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralAugMatchRpcUpdateGroupUpdatedSetField;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.GeneralExtensionListGrouping;
 
-public class ExtensionResolvers {
+public final class ExtensionResolvers {
+    private ExtensionResolvers() {
+    }
 
     private static GroupingLooseResolver<GeneralExtensionListGrouping> matchExtensionResolver =
             new GroupingLooseResolver<>(GeneralExtensionListGrouping.class)
@@ -73,10 +75,9 @@ public class ExtensionResolvers {
                     .add(GeneralAugMatchNotifGroupDescStatsUpdatedSetField.class);
 
     /**
-     * @return the matchExtensionResolver (covers match rpcs and inventory augmentations)
+     * Returns the matchExtensionResolver (covers match rpcs and inventory augmentations).
      */
     public static GroupingLooseResolver<GeneralExtensionListGrouping> getMatchExtensionResolver() {
         return matchExtensionResolver;
     }
-
 }
index 87c715f755a01ed1e44661e5ed5a96cf949c2c3f..9b26310f4f2bbc35dafa681709640fbac25c40dd 100644 (file)
@@ -39,7 +39,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.ge
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.grouping.ExtensionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.general.rev140714.general.extension.list.grouping.ExtensionListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.packet.received.Match;
 import org.opendaylight.yangtools.yang.binding.Augmentable;
 import org.opendaylight.yangtools.yang.binding.Augmentation;
 import org.slf4j.Logger;
@@ -54,8 +53,9 @@ public final class MatchExtensionHelper {
         throw new IllegalAccessError("singleton enforcement");
     }
 
-
     /**
+     * Injects an extension.
+     *
      * @param matchEntry match entry
      * @param ofVersion openflow version
      * @param matchPath match path
@@ -85,16 +85,17 @@ public final class MatchExtensionHelper {
     }
 
     /**
+     * Processes all extensions.
+     *
      * @param matchEntries match entries
      * @param ofVersion openflow version
      * @param matchPath match path
-     * @param <EXT_POINT> extension point
+     * @param <E> extension point
      * @return augmentation wrapper containing augmentation depending on matchPath
      */
     @SuppressWarnings("unchecked")
-    public static <EXT_POINT extends Augmentable<EXT_POINT>>
-    AugmentTuple<EXT_POINT> processAllExtensions(Collection<MatchEntry> matchEntries,
-                                                 OpenflowVersion ofVersion, MatchPath matchPath) {
+    public static <E extends Augmentable<E>> AugmentTuple<E> processAllExtensions(Collection<MatchEntry> matchEntries,
+            OpenflowVersion ofVersion, MatchPath matchPath) {
         List<ExtensionList> extensionsList = new ArrayList<>();
 
         for (MatchEntry matchEntry : matchEntries) {
@@ -106,39 +107,44 @@ public final class MatchExtensionHelper {
             extensionsList.add(extensionListBld.build());
         }
 
-        AugmentTuple<EXT_POINT> augmentTuple = null;
+        AugmentTuple<E> augmentTuple = null;
         if (!extensionsList.isEmpty()) {
             switch (matchPath) {
                 case FLOWS_STATISTICS_UPDATE_MATCH:
-                    GeneralAugMatchNotifUpdateFlowStatsBuilder generalExtMatchAugBld1 = new GeneralAugMatchNotifUpdateFlowStatsBuilder();
+                    GeneralAugMatchNotifUpdateFlowStatsBuilder generalExtMatchAugBld1 =
+                            new GeneralAugMatchNotifUpdateFlowStatsBuilder();
                     generalExtMatchAugBld1.setExtensionList(extensionsList);
-                    augmentTuple = (AugmentTuple<EXT_POINT>)
+                    augmentTuple = (AugmentTuple<E>)
                             new AugmentTuple<>(
                                     GeneralAugMatchNotifUpdateFlowStats.class, generalExtMatchAugBld1.build());
                     break;
                 case PACKET_RECEIVED_MATCH:
-                    GeneralAugMatchNotifPacketInBuilder generalExtMatchAugBld2 = new GeneralAugMatchNotifPacketInBuilder();
+                    GeneralAugMatchNotifPacketInBuilder generalExtMatchAugBld2 =
+                            new GeneralAugMatchNotifPacketInBuilder();
                     generalExtMatchAugBld2.setExtensionList(extensionsList);
-                    augmentTuple = (AugmentTuple<EXT_POINT>)
+                    augmentTuple = (AugmentTuple<E>)
                             new AugmentTuple<>(GeneralAugMatchNotifPacketIn.class, generalExtMatchAugBld2.build());
                     break;
                 case PACKET_IN_MESSAGE_MATCH:
-                    GeneralAugMatchPacketInMessageBuilder generalExtMatchAugBld5 = new GeneralAugMatchPacketInMessageBuilder();
+                    GeneralAugMatchPacketInMessageBuilder generalExtMatchAugBld5 =
+                            new GeneralAugMatchPacketInMessageBuilder();
                     generalExtMatchAugBld5.setExtensionList(extensionsList);
-                    augmentTuple = (AugmentTuple<EXT_POINT>)
+                    augmentTuple = (AugmentTuple<E>)
                             new AugmentTuple<>(GeneralAugMatchPacketInMessage.class, generalExtMatchAugBld5.build());
                     break;
                 case SWITCH_FLOW_REMOVED_MATCH:
-                    GeneralAugMatchNotifSwitchFlowRemovedBuilder generalExtMatchAugBld3 = new GeneralAugMatchNotifSwitchFlowRemovedBuilder();
+                    GeneralAugMatchNotifSwitchFlowRemovedBuilder generalExtMatchAugBld3 =
+                            new GeneralAugMatchNotifSwitchFlowRemovedBuilder();
                     generalExtMatchAugBld3.setExtensionList(extensionsList);
-                    augmentTuple = (AugmentTuple<EXT_POINT>)
+                    augmentTuple = (AugmentTuple<E>)
                             new AugmentTuple<>(
                                     GeneralAugMatchNotifSwitchFlowRemoved.class, generalExtMatchAugBld3.build());
                     break;
                 case FLOWS_STATISTICS_RPC_MATCH:
-                    GeneralAugMatchRpcOutputFlowStatsBuilder generalExtMatchAugBld4 = new GeneralAugMatchRpcOutputFlowStatsBuilder();
+                    GeneralAugMatchRpcOutputFlowStatsBuilder generalExtMatchAugBld4 =
+                           new GeneralAugMatchRpcOutputFlowStatsBuilder();
                     generalExtMatchAugBld4.setExtensionList(extensionsList);
-                    augmentTuple = (AugmentTuple<EXT_POINT>)
+                    augmentTuple = (AugmentTuple<E>)
                             new AugmentTuple<>(
                                     GeneralAugMatchRpcOutputFlowStats.class, generalExtMatchAugBld4.build());
                     break;
@@ -151,19 +157,22 @@ public final class MatchExtensionHelper {
     }
 
     /**
-     * @param ofVersion
-     * @param matchPath
-     * @param matchEntry
-     * @return
+     * Processes an extension.
+     *
+     * @param ofVersion openflow version
+     * @param matchPath match path
+     * @param matchEntry match entry
+     * @return an ExtensionListBuilder
      */
     private static ExtensionListBuilder processExtension(MatchEntry matchEntry, short ofVersion, MatchPath matchPath) {
         ExtensionListBuilder extListBld = null;
 
-        /** TODO: EXTENSION PROPOSAL (match, OFJava to MD-SAL) */
+        // TODO: EXTENSION PROPOSAL (match, OFJava to MD-SAL)
         MatchEntrySerializerKey<? extends OxmClassBase, ? extends MatchField> key = new MatchEntrySerializerKey<>(
                 ofVersion, matchEntry.getOxmClass(), matchEntry.getOxmMatchField());
         if (null != OFSessionUtil.getExtensionConvertorProvider()) {
-            ConvertorFromOFJava<MatchEntry, MatchPath> convertor = OFSessionUtil.getExtensionConvertorProvider().getConverter(key);
+            ConvertorFromOFJava<MatchEntry, MatchPath> convertor =
+                    OFSessionUtil.getExtensionConvertorProvider().getConverter(key);
             if (convertor != null) {
                 ExtensionAugment<? extends Augmentation<Extension>> extensionMatch =
                         convertor.convert(matchEntry, matchPath);
@@ -177,5 +186,4 @@ public final class MatchExtensionHelper {
         }
         return extListBld;
     }
-
 }
index c28bd917d0bce9654d3fc2bb7a0d8005ad98cb70..8bd6975333b59db1228f5febf1083220c806a7c5 100644 (file)
@@ -24,63 +24,77 @@ import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
- * @param <KEY> converter key
- * @param <CONVERTER> converter instance
+ * Closes converter registrations.
+ *
+ * @param <K> converter key
+ * @param <C> converter instance
  */
-public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegistration<CONVERTER> {
+public abstract class RegistrationCloser<K, C> implements ObjectRegistration<C> {
 
     private ExtensionConverterManagerImpl registrator;
-    private KEY key;
-    private CONVERTER converter;
+    private K key;
+    private C converter;
 
     /**
+     * Sets the registrator.
+     *
      * @param registrator the registrator to set
      */
     public void setRegistrator(ExtensionConverterManagerImpl registrator) {
         this.registrator = registrator;
     }
+
     /**
+     * Sets the key.
+     *
      * @param key the key to set
      */
-    public void setKey(KEY key) {
+    public void setKey(K key) {
         this.key = key;
     }
+
     /**
+     * Sets the converter.
+     *
      * @param converter the converter to set
      */
-    public void setConverter(CONVERTER converter) {
+    public void setConverter(C converter) {
         this.converter = converter;
     }
+
     /**
-     * @return the registrator
+     * Returns the registrator.
      */
     public ExtensionConverterManagerImpl getRegistrator() {
         return registrator;
     }
+
     /**
-     * @return the key
+     * Returns the key.
      */
-    public KEY getKey() {
+    public K getKey() {
         return key;
     }
+
     /**
-     * @return the converter
+     * Returns the converter.
      */
-    public CONVERTER getConverter() {
+    public C getConverter() {
         return converter;
     }
 
     @Override
-    public CONVERTER getInstance() {
+    public C getInstance() {
         return getConverter();
     }
 
     /**
-     * standalone deregistrator
-     * @param <TO> target type of wrapped convertor
+     * Standalone deregistrator.
+     *
+     * @param <T> target type of wrapped convertor
      */
-    public static class RegistrationCloserToOFJava<TO extends DataContainer> extends
-            RegistrationCloser<ConverterExtensionKey<? extends ExtensionKey>, ConvertorToOFJava<TO>> {
+    public static class RegistrationCloserToOFJava<T extends DataContainer> extends
+            RegistrationCloser<ConverterExtensionKey<? extends ExtensionKey>, ConvertorToOFJava<T>> {
 
         @Override
         public void close() {
@@ -89,12 +103,13 @@ public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegist
     }
 
     /**
-     * standalone deregistrator
-     * @param <FROM> source type of wrapped convertor
-     * @param <PATH> associated augmentation path
+     * Standalone deregistrator.
+     *
+     * @param <F> source type of wrapped convertor
+     * @param <P> associated augmentation path
      */
-    public static class RegistrationCloserFromOFJava<FROM extends DataContainer, PATH extends AugmentationPath> extends RegistrationCloser<MessageTypeKey<?>, ConvertorFromOFJava<FROM, PATH>> {
-
+    public static class RegistrationCloserFromOFJava<F extends DataContainer, P extends AugmentationPath>
+            extends RegistrationCloser<MessageTypeKey<?>, ConvertorFromOFJava<F, P>> {
         @Override
         public void close() {
             getRegistrator().unregister(getKey(), getConverter());
@@ -102,11 +117,12 @@ public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegist
     }
 
     /**
-     * standalone deregistrator
-     * @param <TO> target type of wrapped convertor
+     * Standalone deregistrator.
+     *
+     * @param <T> target type of wrapped convertor
      */
-    public static class RegistrationCloserActionToOFJava<TO extends DataContainer> extends
-            RegistrationCloser<TypeVersionKey<? extends Action>, ConvertorActionToOFJava<Action, TO>> {
+    public static class RegistrationCloserActionToOFJava<T extends DataContainer> extends
+            RegistrationCloser<TypeVersionKey<? extends Action>, ConvertorActionToOFJava<Action, T>> {
 
         @Override
         public void close() {
@@ -115,12 +131,13 @@ public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegist
     }
 
     /**
-     * standalone deregistrator
-     * @param <FROM> source type of wrapped convertor
-     * @param <PATH> associated augmentation path
+     * Standalone deregistrator.
+     *
+     * @param <F> source type of wrapped convertor
+     * @param <P> associated augmentation path
      */
-    public static class RegistrationCloserActionFromOFJava<FROM extends DataContainer, PATH extends AugmentationPath> extends
-            RegistrationCloser<MessageTypeKey<?>, ConvertorActionFromOFJava<FROM, PATH>> {
+    public static class RegistrationCloserActionFromOFJava<F extends DataContainer, P extends AugmentationPath> extends
+            RegistrationCloser<MessageTypeKey<?>, ConvertorActionFromOFJava<F, P>> {
 
         @Override
         public void close() {
@@ -129,12 +146,13 @@ public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegist
     }
 
     /**
-     * standalone deregistrator
+     * Standalone deregistrator.
      *
-     * @param <TO> target type of wrapped convertor
+     * @param <T> target type of wrapped convertor
      */
-    public static class RegistrationCloserMessageToOFJava<TO extends DataContainer, K extends ExperimenterMessageOfChoice> extends
-            RegistrationCloser<TypeVersionKey<K>, ConverterMessageToOFJava<K, TO>> {
+    public static class RegistrationCloserMessageToOFJava<T extends DataContainer,
+            K extends ExperimenterMessageOfChoice>
+                extends RegistrationCloser<TypeVersionKey<K>, ConverterMessageToOFJava<K, T>> {
 
         @Override
         public void close() {
@@ -143,19 +161,17 @@ public abstract class RegistrationCloser<KEY, CONVERTER> implements ObjectRegist
     }
 
     /**
-     * standalone deregistrator
+     * Standalone deregistrator.
      *
-     * @param <FROM> source type of wrapped convertor
-     * @param <PATH> associated augmentation path
+     * @param <F> source type of wrapped convertor
+     * @param <P> associated augmentation path
      */
-    public static class RegistrationCloserMessageFromOFJava<FROM extends DataContainer, PATH extends AugmentationPath> extends
-            RegistrationCloser<MessageTypeKey<?>, ConvertorMessageFromOFJava<FROM, PATH>> {
+    public static class RegistrationCloserMessageFromOFJava<F extends DataContainer, P extends AugmentationPath> extends
+            RegistrationCloser<MessageTypeKey<?>, ConvertorMessageFromOFJava<F, P>> {
 
         @Override
         public void close() {
             getRegistrator().unregister(getKey(), getConverter());
         }
     }
-
-
 }
index 7849780ce5d9c944f915f28683ab9e7611013c76..28be8e1a4eaf46470fcc37bc19b783b11de3ac73 100644 (file)
@@ -14,26 +14,26 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Con
 
 public interface ConvertorExecutor {
     /**
-     * Lookup and use convertor by specified type, then converts source and returns converted result
+     * Lookup and use convertor by specified type, then converts source and returns converted result.
      *
-     * @param <FROM> the source type
-     * @param <TO>   the result type
-     * @param <DATA> the data type
+     * @param <F> the source type
+     * @param <T>   the result type
+     * @param <D> the data type
      * @param source the source
      * @param data   convertor data
      * @return the result (can be empty, if no convertor was found)
      */
-    <FROM, TO, DATA extends ConvertorData> Optional<TO> convert(final FROM source, final DATA data);
+    <F, T, D extends ConvertorData> Optional<T> convert(final F source, final D data);
 
     /**
-     * Lookup and use convertor by specified type, then converts source collection and returns converted result
+     * Lookup and use convertor by specified type, then converts source collection and returns converted result.
      *
-     * @param <FROM> the source type
-     * @param <TO>   the result type
-     * @param <DATA> the data type
+     * @param <F> the source type
+     * @param <T>   the result type
+     * @param <D> the data type
      * @param source the source collection
      * @param data   convertor data
      * @return the result (can be empty, if no convertor was found)
      */
-    <FROM, TO, DATA extends ConvertorData> Optional<TO> convert(final Collection<FROM> source, final DATA data);
-}
\ No newline at end of file
+    <F, T, D extends ConvertorData> Optional<T> convert(final Collection<F> source, final D data);
+}
index 5c3ed315fcb1ad264918ac34dc387666861c5f62..8a3c66e4a63634863519211d31a79ec2283093c0 100644 (file)
@@ -24,7 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Manages various convertors and allows to use them all in one generic way
+ * Manages various convertors and allows to use them all in one generic way.
  */
 public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator {
     private static final Logger LOG = LoggerFactory.getLogger(ConvertorManager.class);
@@ -34,7 +34,8 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
     private Map<Short, Map<Class<?>, Convertor<?, ?, ? extends ConvertorData>>> convertors;
 
     /**
-     * Create new instance of Convertor Manager
+     * Create new instance of Convertor Manager.
+     *
      * @param supportedVersions supported versions
      */
     public ConvertorManager(final Short... supportedVersions) {
@@ -42,7 +43,8 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
 
         if (supportedVersions.length == 1) {
             final Optional<Short> versionOptional = stream.findFirst();
-            versionOptional.ifPresent(version -> convertors = Collections.singletonMap(version, new ConcurrentHashMap<>()));
+            versionOptional.ifPresent(version -> convertors =
+                    Collections.singletonMap(version, new ConcurrentHashMap<>()));
         } else {
             convertors = new ConcurrentHashMap<>();
             stream.forEach(version -> convertors.putIfAbsent(version, new ConcurrentHashMap<>()));
@@ -50,7 +52,8 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
     }
 
     @Override
-    public ConvertorManager registerConvertor(final short version, final Convertor<?, ?, ? extends ConvertorData> convertor) {
+    public ConvertorManager registerConvertor(final short version,
+            final Convertor<?, ?, ? extends ConvertorData> convertor) {
         final Map<Class<?>, Convertor<?, ?, ? extends ConvertorData>> convertorsForVersion =
                 convertors.get(version);
 
@@ -75,16 +78,15 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
 
     @Override
     @SuppressWarnings("unchecked")
-    public <FROM, TO, DATA extends ConvertorData> Optional<TO> convert(final FROM source, final DATA data) {
-        Optional<TO> result = Optional.empty();
+    public <F, T, D extends ConvertorData> Optional<T> convert(final F source, final D data) {
+        Optional<T> result = Optional.empty();
 
         if (Objects.isNull(source)) {
             LOG.trace("Cannot extract type from null source");
             return result;
         }
 
-        final Class<?> type = source instanceof DataContainer ?
-                ((DataContainer)source).getImplementedInterface()
+        final Class<?> type = source instanceof DataContainer ? ((DataContainer) source).getImplementedInterface()
                 : source.getClass();
 
         if (Objects.isNull(type)) {
@@ -92,31 +94,29 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
             return result;
         }
 
-         return findConvertor(data.getVersion(), type)
-                .map(convertor -> (TO)convertor.convert(source, data));
+        return findConvertor(data.getVersion(), type).map(convertor -> (T)convertor.convert(source, data));
     }
 
     @Override
     @SuppressWarnings("unchecked")
-    public <FROM, TO, DATA extends ConvertorData> Optional<TO> convert(final Collection<FROM> source, final DATA data) {
-        Optional<TO> result = Optional.empty();
+    public <F, T, D extends ConvertorData> Optional<T> convert(final Collection<F> source, final D data) {
+        Optional<T> result = Optional.empty();
 
         if (Objects.isNull(source)) {
             LOG.trace("Cannot extract type from null source");
             return result;
         }
 
-        final Optional<FROM> firstOptional = source.stream().findFirst();
+        final Optional<F> firstOptional = source.stream().findFirst();
 
         if (!firstOptional.isPresent()) {
             LOG.trace("Cannot extract type from empty collection");
             return result;
         }
 
-        final FROM first = firstOptional.get();
+        final F first = firstOptional.get();
 
-        final Class<?> type = first instanceof DataContainer ?
-                ((DataContainer)first).getImplementedInterface()
+        final Class<?> type = first instanceof DataContainer ? ((DataContainer) first).getImplementedInterface()
                 : first.getClass();
 
         if (Objects.isNull(type)) {
@@ -125,7 +125,7 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
         }
 
         return findConvertor(data.getVersion(), type)
-                .map(convertor -> (TO)convertor.convert(source, data));
+                .map(convertor -> (T)convertor.convert(source, data));
     }
 
     /**
@@ -148,12 +148,14 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
             if (!convertor.isPresent()) {
                 for (final Class<?> convertorType : convertorsForVersion.keySet()) {
                     if (type.isAssignableFrom(convertorType)) {
-                        final Convertor<?, ?, ? extends ConvertorData> foundConvertor = convertorsForVersion.get(convertorType);
+                        final Convertor<?, ?, ? extends ConvertorData> foundConvertor =
+                                convertorsForVersion.get(convertorType);
                         convertor = Optional.ofNullable(foundConvertor);
 
                         if (convertor.isPresent()) {
                             convertorsForVersion.put(type, foundConvertor);
-                            LOG.warn("{} for version {} is now converted by {} using last resort method", type, version, foundConvertor);
+                            LOG.warn("{} for version {} is now converted by {} using last resort method",
+                                    type, version, foundConvertor);
                             break;
                         }
                     }
@@ -169,4 +171,4 @@ public class ConvertorManager implements ConvertorExecutor, ConvertorRegistrator
 
         return convertor;
     }
-}
\ No newline at end of file
+}
index 8a336d87331eb63e7957aba4e2ac0183e0332c64..7658bdbcf7b965ecb9aa115767e1099ed7386bfd 100644 (file)
@@ -24,7 +24,10 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.Matc
 /**
  * Convertor manager factory.
  */
-public class ConvertorManagerFactory {
+public final class ConvertorManagerFactory {
+    private ConvertorManagerFactory() {
+    }
+
     /**
      * Create default convertor manager.
      *
@@ -35,7 +38,8 @@ public class ConvertorManagerFactory {
         final TableFeaturesResponseConvertor tableFeaturesResponseConvertor = new TableFeaturesResponseConvertor();
         final MeterConvertor meterConvertor = new MeterConvertor();
         final MeterStatsResponseConvertor meterStatsResponseConvertor = new MeterStatsResponseConvertor();
-        final MeterConfigStatsResponseConvertor meterConfigStatsResponseConvertor = new MeterConfigStatsResponseConvertor();
+        final MeterConfigStatsResponseConvertor meterConfigStatsResponseConvertor =
+                new MeterConfigStatsResponseConvertor();
         final PortConvertor portConvertor = new PortConvertor();
         final MatchConvertor matchConvertor = new MatchConvertor();
         final MatchV10Convertor matchV10Convertor = new MatchV10Convertor();
@@ -48,7 +52,8 @@ public class ConvertorManagerFactory {
         final GroupStatsResponseConvertor groupStatsResponseConvertor = new GroupStatsResponseConvertor();
         final PacketOutConvertor packetOutConvertor = new PacketOutConvertor();
         final FlowConvertor flowConvertor = new FlowConvertor();
-        final FlowInstructionResponseConvertor flowInstructionResponseConvertor = new FlowInstructionResponseConvertor();
+        final FlowInstructionResponseConvertor flowInstructionResponseConvertor =
+                new FlowInstructionResponseConvertor();
         final FlowStatsResponseConvertor flowStatsResponseConvertor = new FlowStatsResponseConvertor();
         final FlowFlagsConvertor flowFlagsConvertor = new FlowFlagsConvertor();
         final FlowFlagsV10Convertor flowFlagsV10Convertor = new FlowFlagsV10Convertor();
index 6290a3d8822c013f2de24312005f88da513d183d..03709c33dee9a2c80a2b0fd475697c4241f84d6f 100644 (file)
@@ -42,6 +42,7 @@ import org.slf4j.LoggerFactory;
  * Decodes the SAL - Group Mod Message and encodes into a OF
  * Library for the OFPT_GROUP_MOD Message. Input:SAL Layer Group command data.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -52,7 +53,9 @@ import org.slf4j.LoggerFactory;
  * </pre>
  */
 public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, VersionDatapathIdConvertorData> {
-    private static final List<Class<?>> TYPES = Arrays.asList(Group.class, AddGroupInput.class, RemoveGroupInput.class, UpdatedGroup.class);
+    private static final List<Class<?>> TYPES = Arrays.asList(Group.class, AddGroupInput.class,
+            RemoveGroupInput.class, UpdatedGroup.class);
+
     /**
      * Create default empty group mod input builder
      * Use this method, if result from convertor is empty.
@@ -72,7 +75,9 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
     private static final Long OFPG_ANY = Long.parseLong("ffffffff", 16);
     private static final Long DEFAULT_WATCH_GROUP = OFPG_ANY;
     private static final Comparator<Bucket> COMPARATOR = (bucket1, bucket2) -> {
-        if (bucket1.getBucketId() == null || bucket2.getBucketId() == null) return 0;
+        if (bucket1.getBucketId() == null || bucket2.getBucketId() == null) {
+            return 0;
+        }
         return bucket1.getBucketId().getValue().compareTo(bucket2.getBucketId().getValue());
     };
 
@@ -81,8 +86,8 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
         final ActionConvertorData data = new ActionConvertorData(version);
         data.setDatapathId(datapathid);
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket groupBucket : buckets
-                .getBucket()) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket groupBucket :
+                buckets.getBucket()) {
             BucketsListBuilder bucketBuilder = new BucketsListBuilder();
 
             salToOFBucketListWeight(groupBucket, bucketBuilder, groupType);
@@ -101,7 +106,8 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
 
     }
 
-    private static void salToOFBucketListWatchPort(Bucket groupBucket, BucketsListBuilder bucketBuilder, int groupType) {
+    private static void salToOFBucketListWatchPort(Bucket groupBucket, BucketsListBuilder bucketBuilder,
+            int groupType) {
         if (null != groupBucket.getWatchPort()) {
             bucketBuilder.setWatchPort(new PortNumber(groupBucket.getWatchPort()));
         } else {
@@ -112,7 +118,8 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
         }
     }
 
-    private static void salToOFBucketListWatchGroup(Bucket groupBucket, BucketsListBuilder bucketBuilder, int groupType) {
+    private static void salToOFBucketListWatchGroup(Bucket groupBucket, BucketsListBuilder bucketBuilder,
+            int groupType) {
         if (null != groupBucket.getWatchGroup()) {
             bucketBuilder.setWatchGroup(groupBucket.getWatchGroup());
         } else {
@@ -171,11 +178,12 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
         // Only if the bucket is configured for the group then add it
         // During group deletion do not push the buckets
         if (groupModInputBuilder.getCommand() != GroupModCommand.OFPGCDELETE) {
-            if ((source.getBuckets() != null) && (source.getBuckets().getBucket().size() != 0)) {
+            if (source.getBuckets() != null && source.getBuckets().getBucket().size() != 0) {
 
                 Collections.sort(source.getBuckets().getBucket(), COMPARATOR);
 
-                List<BucketsList> bucketLists = salToOFBucketList(source.getBuckets(), data.getVersion(), source.getGroupType().getIntValue(), data.getDatapathId());
+                List<BucketsList> bucketLists = salToOFBucketList(source.getBuckets(), data.getVersion(),
+                        source.getGroupType().getIntValue(), data.getDatapathId());
                 groupModInputBuilder.setBucketsList(bucketLists);
             }
         }
@@ -183,4 +191,4 @@ public class GroupConvertor extends Convertor<Group, GroupModInputBuilder, Versi
         groupModInputBuilder.setVersion(data.getVersion());
         return groupModInputBuilder;
     }
-}
\ No newline at end of file
+}
index e3e45aef817005067d0c225e4e366141872956b0..9e76d28ad1d7e63d2d4a22a04529589dc78192c0 100644 (file)
@@ -34,8 +34,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc._case.multipart.reply.group.desc.GroupDesc;
 
 /**
- * Converts GroupDesc message from library to MD SAL defined GroupDescStats
+ * Converts GroupDesc message from library to MD SAL defined GroupDescStats.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -44,11 +45,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * }
  * </pre>
  */
-public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>, List<GroupDescStats>, VersionConvertorData> {
+public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>, List<GroupDescStats>,
+        VersionConvertorData> {
 
     private static final Set<Class<?>> TYPES = Collections.singleton(GroupDesc.class);
 
-    private org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.Buckets toSALBucketsDesc(List<BucketsList> bucketDescStats, short version) {
+    private org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.Buckets toSALBucketsDesc(
+            List<BucketsList> bucketDescStats, short version) {
         final ActionResponseConvertorData data = new ActionResponseConvertorData(version);
         data.setActionPath(ActionPath.GROUP_DESC_STATS_UPDATED_BUCKET_ACTION);
 
@@ -59,17 +62,16 @@ public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>,
 
         for (BucketsList bucketDetails : bucketDescStats) {
             BucketBuilder bucketDesc = new BucketBuilder();
-            final Optional<List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>> convertedSalActions =
-                    getConvertorExecutor().convert(
-                            bucketDetails.getAction(), data);
-
+            final Optional<List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>>
+                convertedSalActions = getConvertorExecutor().convert(bucketDetails.getAction(), data);
 
             if (convertedSalActions.isPresent()) {
                 List<Action> actions = new ArrayList<>();
 
                 int actionKey = 0;
 
-                for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action action : convertedSalActions.get()) {
+                for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action action :
+                        convertedSalActions.get()) {
                     ActionBuilder wrappedAction = new ActionBuilder();
                     wrappedAction.setAction(action);
                     wrappedAction.setKey(new ActionKey(actionKey));
index a2be1e222238027b2ac05c359e2519d70faef515..792492d4d4cfbbb9661d8eb69f1cddfda0bd82b1 100644 (file)
@@ -33,6 +33,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 /**
  * Converts group related statistics messages coming from switch to MD-SAL messages.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -42,11 +43,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * </pre>
  */
 public class GroupStatsResponseConvertor extends Convertor<
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats>,
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart
+            .reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats>,
         List<GroupStats>,
         VersionConvertorData> {
 
-    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats.class);
+    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight
+            .openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart
+                .reply.group.GroupStats.class);
 
     private Buckets toSALBuckets(List<BucketStats> bucketStats) {
         BucketsBuilder salBuckets = new BucketsBuilder();
@@ -75,11 +79,13 @@ public class GroupStatsResponseConvertor extends Convertor<
     }
 
     @Override
-    public List<GroupStats> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats> source, VersionConvertorData data) {
+    public List<GroupStats> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
+            .multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats> source,
+            VersionConvertorData data) {
         List<GroupStats> convertedSALGroups = new ArrayList<>();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply
-                .multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats groupStats : source) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply
+                .body.multipart.reply.group._case.multipart.reply.group.GroupStats groupStats : source) {
             GroupStatsBuilder salGroupStats = new GroupStatsBuilder();
 
             salGroupStats.setBuckets(toSALBuckets(groupStats.getBucketStats()));
index bc63700d7746cd09d29c0b3ef23635ff5fa4a66e..800b32661f13ac82d2c4402041c20dcf96eec3f3 100644 (file)
@@ -38,11 +38,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.meter.band.experimenter._case.MeterBandExperimenter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.MeterConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.meter.config.Bands;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
  * Converts list of OF library config meter stats to MD-SAL config meter stats.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -51,7 +51,8 @@ import org.opendaylight.yangtools.yang.binding.DataContainer;
  * }
  * </pre>
  */
-public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfig>, List<MeterConfigStats>, VersionConvertorData> {
+public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfig>, List<MeterConfigStats>,
+        VersionConvertorData> {
 
     private static final Set<Class<?>> TYPES = Collections.singleton(MeterConfig.class);
 
@@ -153,4 +154,4 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
 
         return listMeterConfigStats;
     }
-}
\ No newline at end of file
+}
index 1bd059bafeb4141f50ac8a314bc4c8566d46b9a1..b3e68b4dbf4a52dd453ddab465ee17ec50e5ef67 100644 (file)
@@ -40,12 +40,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.meter.band.experimenter._case.MeterBandExperimenterBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.mod.Bands;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.mod.BandsBuilder;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Converts a MD-SAL meter mod command into the OF library meter mod command.
+ *
  * <p>
  * Example usage:
  * <pre>
@@ -57,7 +57,8 @@ import org.slf4j.LoggerFactory;
  */
 public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, VersionConvertorData> {
     private static final Logger LOG = LoggerFactory.getLogger(MeterConvertor.class);
-    private static final List<Class<?>> TYPES = Arrays.asList(Meter.class, AddMeterInput.class, RemoveMeterInput.class, UpdatedMeter.class);
+    private static final List<Class<?>> TYPES = Arrays.asList(Meter.class, AddMeterInput.class,
+            RemoveMeterInput.class, UpdatedMeter.class);
 
     /**
      * Create default empty meter mot input builder.
@@ -75,17 +76,15 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
     private static void getBandsFromSAL(MeterBandHeaders meterBandHeaders, List<Bands> bands) {
         for (MeterBandHeader meterBandHeader : meterBandHeaders.getMeterBandHeader()) {
             // The band types :drop,DSCP_Remark or experimenter.
-            if (null != meterBandHeader.getMeterBandTypes() &&
-                    null != meterBandHeader.getMeterBandTypes().getFlags()) {
-
+            if (null != meterBandHeader.getMeterBandTypes() && null != meterBandHeader.getMeterBandTypes().getFlags()) {
                 if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtDrop()) {
                     if (meterBandHeader.getBandType() != null) {
-                        MeterBandDropCaseBuilder dropCaseBuilder = new MeterBandDropCaseBuilder();
                         MeterBandDropBuilder meterBandDropBuilder = new MeterBandDropBuilder();
                         meterBandDropBuilder.setType(MeterBandType.OFPMBTDROP);
                         Drop drop = (Drop) meterBandHeader.getBandType();
                         meterBandDropBuilder.setBurstSize(drop.getDropBurstSize());
                         meterBandDropBuilder.setRate(drop.getDropRate());
+                        MeterBandDropCaseBuilder dropCaseBuilder = new MeterBandDropCaseBuilder();
                         dropCaseBuilder.setMeterBandDrop(meterBandDropBuilder.build());
                         MeterBand meterBandItem = dropCaseBuilder.build();
                         BandsBuilder bandsB = new BandsBuilder();
@@ -97,13 +96,13 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
                     }
                 } else if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtDscpRemark()) {
                     if (meterBandHeader.getBandType() != null) {
-                        MeterBandDscpRemarkCaseBuilder dscpCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
                         MeterBandDscpRemarkBuilder meterBandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
                         meterBandDscpRemarkBuilder.setType(MeterBandType.OFPMBTDSCPREMARK);
                         DscpRemark dscpRemark = (DscpRemark) meterBandHeader.getBandType();
                         meterBandDscpRemarkBuilder.setBurstSize(dscpRemark.getDscpRemarkBurstSize());
                         meterBandDscpRemarkBuilder.setRate(dscpRemark.getDscpRemarkRate());
                         meterBandDscpRemarkBuilder.setPrecLevel(dscpRemark.getPrecLevel());
+                        MeterBandDscpRemarkCaseBuilder dscpCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
                         dscpCaseBuilder.setMeterBandDscpRemark(meterBandDscpRemarkBuilder.build());
                         MeterBand meterBandItem = dscpCaseBuilder.build();
                         BandsBuilder bandsB = new BandsBuilder();
@@ -115,7 +114,6 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
                     }
                 } else if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtExperimenter()) {
                     if (meterBandHeader.getBandType() != null) {
-                        MeterBandExperimenterCaseBuilder experimenterCaseBuilder = new MeterBandExperimenterCaseBuilder();
                         MeterBandExperimenterBuilder meterBandExperimenterBuilder = new MeterBandExperimenterBuilder();
                         meterBandExperimenterBuilder.setType(MeterBandType.OFPMBTEXPERIMENTER);
                         Experimenter experimenter = (Experimenter) meterBandHeader.getBandType();
@@ -125,6 +123,8 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
                         expBuilder.setExperimenter(new ExperimenterId(experimenter.getExperimenter()));
                         meterBandExperimenterBuilder.addAugmentation(ExperimenterIdMeterBand.class, expBuilder.build());
                         // TODO - implement / finish experimenter meter band translation
+                        MeterBandExperimenterCaseBuilder experimenterCaseBuilder =
+                                new MeterBandExperimenterCaseBuilder();
                         experimenterCaseBuilder.setMeterBandExperimenter(meterBandExperimenterBuilder.build());
                         MeterBand meterBandItem = experimenterCaseBuilder.build();
                         BandsBuilder bandsB = new BandsBuilder();
index c7c6a8c6097450aa481e6442f5435c01c941ade7..62bd3c6aa9170833cd731215e2d064ee5f5d5ae6 100644 (file)
@@ -13,10 +13,10 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter64;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Convertor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionConvertorData;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter64;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.BandId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.DurationBuilder;
@@ -28,11 +28,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStatsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.reply.MeterStatsKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.meter.stats.MeterBandStats;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
  * Converts list of OF library meter stats to MD-SAL meter stats.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -47,7 +47,9 @@ public class MeterStatsResponseConvertor extends Convertor<
         List<MeterStats>,
         VersionConvertorData> {
 
-    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats.class);
+    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight
+            .openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart
+                .reply.meter.MeterStats.class);
 
     @Override
     public Collection<Class<?>> getTypes() {
@@ -55,11 +57,13 @@ public class MeterStatsResponseConvertor extends Convertor<
     }
 
     @Override
-    public List<MeterStats> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats> source, VersionConvertorData data) {
+    public List<MeterStats> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
+            .multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats> source,
+            VersionConvertorData data) {
         List<MeterStats> convertedSALMeters = new ArrayList<>();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.
-                multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats meterStats : source) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply
+                .body.multipart.reply.meter._case.multipart.reply.meter.MeterStats meterStats : source) {
             // Convert MeterStats message from library to MD SAL defined MeterStats
             MeterStatsBuilder salMeterStats = new MeterStatsBuilder();
             salMeterStats.setByteInCount(new Counter64(meterStats.getByteInCount()));
@@ -98,4 +102,4 @@ public class MeterStatsResponseConvertor extends Convertor<
 
         return convertedSALMeters;
     }
-}
\ No newline at end of file
+}
index ccb0d8c7b3d07f4fe0fed2595edcadb0e00c8371..bc143078cd16b8aad279924c3192dd5e5a0037e2 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 /**
  * Created by Anil Vishnoi (avishnoi@Brocade.com) on 8/2/16.
  */
-public class OFApprovedExperimenterIds {
+public interface OFApprovedExperimenterIds {
 
-    public static final long MATCH_TCP_FLAGS_EXP_ID = 1330529792;
+    long MATCH_TCP_FLAGS_EXP_ID = 1330529792;
 }
index b0aee3b8429954b5c683628df5dcb39eaa89b30c..0965f6159881bbf5ad311c0032beb379530258b9 100644 (file)
@@ -32,7 +32,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
 import org.slf4j.Logger;
@@ -41,6 +40,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Converts a MD-SAL packet out data into the OF library packet out input.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -90,7 +90,6 @@ public class PacketOutConvertor extends Convertor<TransmitPacketInput, PacketOut
         PortNumber inPortNr;
         Long bufferId = OFConstants.OFP_NO_BUFFER;
         Iterable<PathArgument> inArgs = null;
-        PacketOutInputBuilder builder = new PacketOutInputBuilder();
 
         if (source.getIngress() != null) {
             inArgs = source.getIngress().getValue().getPathArguments();
@@ -121,7 +120,8 @@ public class PacketOutConvertor extends Convertor<TransmitPacketInput, PacketOut
         }
 
         List<Action> actions = new ArrayList<>();
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> inputActions = source.getAction();
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> inputActions =
+                source.getAction();
 
         if (inputActions != null) {
             final ActionConvertorData actionConvertorData = new ActionConvertorData(data.getVersion());
@@ -134,16 +134,17 @@ public class PacketOutConvertor extends Convertor<TransmitPacketInput, PacketOut
 
         } else {
             // TODO VD P! wait for way to move Actions (e.g. augmentation)
-            ActionBuilder aBuild = new ActionBuilder();
             OutputActionCaseBuilder outputActionCaseBuilder = new OutputActionCaseBuilder();
             OutputActionBuilder outputActionBuilder = new OutputActionBuilder();
             outputActionBuilder.setPort(outPort);
             outputActionBuilder.setMaxLength(OFConstants.OFPCML_NO_BUFFER);
             outputActionCaseBuilder.setOutputAction(outputActionBuilder.build());
-            aBuild.setActionChoice(outputActionCaseBuilder.build());
-            actions.add(aBuild.build());
+            ActionBuilder actionBuild = new ActionBuilder();
+            actionBuild.setActionChoice(outputActionCaseBuilder.build());
+            actions.add(actionBuild.build());
         }
 
+        PacketOutInputBuilder builder = new PacketOutInputBuilder();
         builder.setAction(actions);
         builder.setData(source.getPayload());
         builder.setVersion(data.getVersion());
@@ -153,4 +154,4 @@ public class PacketOutConvertor extends Convertor<TransmitPacketInput, PacketOut
 
         return builder.build();
     }
-}
\ No newline at end of file
+}
index f0041a49ffd08b0d22c844049fe7bd69b58d7d63..df49ccd844465bb534981bccbc5d71b3e3ca3c2c 100644 (file)
@@ -32,8 +32,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc._case.multipart.reply.port.desc.PortsBuilder;
 
 /**
- * Converts port mod, port status and port description MD-SAL messages to OF library data
+ * Converts port mod, port status and port description MD-SAL messages to OF library data.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -105,14 +106,15 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
     private static PortFeaturesV10 getPortFeaturesV10(
             org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures salPortFeatures) {
 
-        return new PortFeaturesV10(salPortFeatures.isHundredMbFd(), salPortFeatures.isHundredMbHd(), salPortFeatures.isTenGbFd(), salPortFeatures.isTenMbFd(), salPortFeatures.isTenMbHd(),
-                salPortFeatures.isOneGbFd(), salPortFeatures.isOneGbHd(), salPortFeatures.isAutoeng(), salPortFeatures.isCopper(), salPortFeatures.isFiber(),
-                salPortFeatures.isPause(), salPortFeatures.isPauseAsym());
+        return new PortFeaturesV10(salPortFeatures.isHundredMbFd(), salPortFeatures.isHundredMbHd(),
+                salPortFeatures.isTenGbFd(), salPortFeatures.isTenMbFd(), salPortFeatures.isTenMbHd(),
+                salPortFeatures.isOneGbFd(), salPortFeatures.isOneGbHd(), salPortFeatures.isAutoeng(),
+                salPortFeatures.isCopper(), salPortFeatures.isFiber(), salPortFeatures.isPause(),
+                salPortFeatures.isPauseAsym());
     }
 
     /**
-     * This method is called as a reply to OFPMP_PORT_DESCRIPTION
-     * message(OF1.3.1)
+     * This method is called as a reply to OFPMP_PORT_DESCRIPTION message(OF1.3.1).
      *
      * @param source  FlowCapablePort
      * @param version openflow version
@@ -123,29 +125,29 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
             org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.FlowCapablePort source,
             short version) {
 
-        PortsBuilder oFPortDescDataBuilder = new PortsBuilder();
+        PortsBuilder ofPortDescDataBuilder = new PortsBuilder();
 
-        oFPortDescDataBuilder.setPortNo(
-                OpenflowPortsUtil.getProtocolPortNumber(OpenflowVersion.get(version), source.getPortNumber())); // portNO
+        ofPortDescDataBuilder.setPortNo(OpenflowPortsUtil.getProtocolPortNumber(OpenflowVersion.get(version),
+                source.getPortNumber())); // portNO
 
-        oFPortDescDataBuilder.setHwAddr(source.getHardwareAddress());
-        oFPortDescDataBuilder.setName(source.getName());
+        ofPortDescDataBuilder.setHwAddr(source.getHardwareAddress());
+        ofPortDescDataBuilder.setName(source.getName());
 
         PortConfig config = maskPortConfigFields(source.getConfiguration());
 
-        oFPortDescDataBuilder.setConfig(config);
+        ofPortDescDataBuilder.setConfig(config);
 
         PortState portState = getPortState(source.getState());
 
-        oFPortDescDataBuilder.setState(portState);
-        oFPortDescDataBuilder.setCurrentFeatures(getPortFeatures(source.getCurrentFeature()));
-        oFPortDescDataBuilder.setAdvertisedFeatures(getPortFeatures(source.getAdvertisedFeatures()));
-        oFPortDescDataBuilder.setSupportedFeatures(getPortFeatures(source.getSupported()));
-        oFPortDescDataBuilder.setPeerFeatures(getPortFeatures(source.getPeerFeatures()));
-        oFPortDescDataBuilder.setCurrSpeed(source.getCurrentSpeed());
-        oFPortDescDataBuilder.setMaxSpeed(source.getMaximumSpeed());
+        ofPortDescDataBuilder.setState(portState);
+        ofPortDescDataBuilder.setCurrentFeatures(getPortFeatures(source.getCurrentFeature()));
+        ofPortDescDataBuilder.setAdvertisedFeatures(getPortFeatures(source.getAdvertisedFeatures()));
+        ofPortDescDataBuilder.setSupportedFeatures(getPortFeatures(source.getSupported()));
+        ofPortDescDataBuilder.setPeerFeatures(getPortFeatures(source.getPeerFeatures()));
+        ofPortDescDataBuilder.setCurrSpeed(source.getCurrentSpeed());
+        ofPortDescDataBuilder.setMaxSpeed(source.getMaximumSpeed());
 
-        return oFPortDescDataBuilder.build();
+        return ofPortDescDataBuilder.build();
 
     }
 
@@ -172,8 +174,8 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
 
         PortModInputBuilder portModInputBuilder = new PortModInputBuilder();
         portModInputBuilder.setAdvertise(getPortFeatures(source.getAdvertisedFeatures()));
-        portModInputBuilder.setPortNo(new PortNumber(
-                OpenflowPortsUtil.getProtocolPortNumber(OpenflowVersion.get(data.getVersion()), source.getPortNumber())));
+        portModInputBuilder.setPortNo(new PortNumber(OpenflowPortsUtil.getProtocolPortNumber(
+                OpenflowVersion.get(data.getVersion()), source.getPortNumber())));
 
         portModInputBuilder.setConfig(config);
         portModInputBuilder.setMask(MoreObjects.firstNonNull(maskPortConfigFields(source.getMask()),
@@ -189,4 +191,4 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
         portModInputBuilder.setAdvertiseV10(getPortFeaturesV10(source.getAdvertisedFeatures()));
         return portModInputBuilder.build();
     }
-}
\ No newline at end of file
+}
index 9ca8b5011ec83ea802668d7f8a8cd89cc21786d7..cdaad2964676020fff9c887d4e57c1f15063a1fe 100644 (file)
@@ -154,6 +154,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Converts a MD-SAL table features into the OF library table features.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -168,13 +169,18 @@ public class TableFeaturesConvertor extends Convertor<
         VersionConvertorData> {
 
     private static final Logger LOG = LoggerFactory.getLogger(TableFeaturesConvertor.class);
-    private static final Ordering<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeatureProperties> TABLE_FEATURE_PROPS_ORDERING =
-            Ordering.from(OrderComparator.<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeatureProperties>build());
-    private static final Map<Class<?>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField>> SAL_TO_OF_TABLE_FEATURES;
-    private static final List<Class<?>> TYPES = Arrays.asList(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures.class, UpdatedTable.class);
+    private static final Ordering<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features
+        .table.features.table.properties.TableFeatureProperties> TABLE_FEATURE_PROPS_ORDERING =
+            Ordering.from(OrderComparator.<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table
+                    .features.table.features.table.properties.TableFeatureProperties>build());
+    private static final Map<Class<?>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm
+            .rev150225.MatchField>> SAL_TO_OF_TABLE_FEATURES;
+    private static final List<Class<?>> TYPES = Arrays.asList(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+            .rev131026.TableFeatures.class, UpdatedTable.class);
 
     static {
-        Builder<Class<?>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField>> builder = ImmutableMap.builder();
+        Builder<Class<?>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm
+                .rev150225.MatchField>> builder = ImmutableMap.builder();
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpOp.class, ArpOp.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpSha.class, ArpSha.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpSpa.class, ArpSpa.class);
@@ -183,11 +189,16 @@ public class TableFeaturesConvertor extends Convertor<
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthDst.class, EthDst.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthSrc.class, EthSrc.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthType.class, EthType.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Code.class, Icmpv4Code.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Type.class, Icmpv4Type.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Code.class, Icmpv6Code.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type.class, Icmpv6Type.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPhyPort.class, InPhyPort.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Code.class,
+                Icmpv4Code.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Type.class,
+                Icmpv4Type.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Code.class,
+                Icmpv6Code.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type.class,
+                Icmpv6Type.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPhyPort.class,
+                InPhyPort.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPort.class, InPort.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpDscp.class, IpDscp.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpEcn.class, IpEcn.class);
@@ -195,15 +206,21 @@ public class TableFeaturesConvertor extends Convertor<
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Dst.class, Ipv4Dst.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Src.class, Ipv4Src.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Dst.class, Ipv6Dst.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Exthdr.class, Ipv6Exthdr.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Flabel.class, Ipv6Flabel.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdSll.class, Ipv6NdSll.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTarget.class, Ipv6NdTarget.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTll.class, Ipv6NdTll.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Exthdr.class,
+                Ipv6Exthdr.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Flabel.class,
+                Ipv6Flabel.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdSll.class,
+                Ipv6NdSll.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTarget.class,
+                Ipv6NdTarget.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTll.class,
+                Ipv6NdTll.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Src.class, Ipv6Src.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Metadata.class, Metadata.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsBos.class, MplsBos.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsLabel.class, MplsLabel.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsLabel.class,
+                MplsLabel.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsTc.class, MplsTc.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.PbbIsid.class, PbbIsid.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.SctpDst.class, SctpDst.class);
@@ -215,29 +232,33 @@ public class TableFeaturesConvertor extends Convertor<
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.UdpSrc.class, UdpSrc.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.VlanPcp.class, VlanPcp.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.VlanVid.class, VlanVid.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Dst.class, Ipv4Dst.class);
-        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Src.class, Ipv4Src.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Dst.class,
+                Ipv4Dst.class);
+        builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TunnelIpv4Src.class,
+                Ipv4Src.class);
         builder.put(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TcpFlags.class, TcpFlags.class);
         SAL_TO_OF_TABLE_FEATURES = builder.build();
     }
 
     private static List<TableFeatureProperties> toTableProperties(
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.TableProperties tableProperties) {
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features
+                .TableProperties tableProperties) {
         if (tableProperties == null) {
             return Collections.emptyList();
         }
 
         List<TableFeatureProperties> ofTablePropertiesList = new ArrayList<>();
 
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeatureProperties>
-                sortedTableProperties = TABLE_FEATURE_PROPS_ORDERING.sortedCopy(tableProperties.getTableFeatureProperties());
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table
+            .properties.TableFeatureProperties> sortedTableProperties = TABLE_FEATURE_PROPS_ORDERING.sortedCopy(
+                    tableProperties.getTableFeatureProperties());
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeatureProperties
-                property : sortedTableProperties) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table
+                .properties.TableFeatureProperties property : sortedTableProperties) {
             TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
 
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.TableFeaturePropType propType = property
-                    .getTableFeaturePropType();
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type
+                .TableFeaturePropType propType = property.getTableFeaturePropType();
 
             setTableFeatureProperty(propType);
 
@@ -282,9 +303,12 @@ public class TableFeaturesConvertor extends Convertor<
         LOG.debug("Unknown TableFeaturePropType [{}]", propType.getClass());
     }
 
-    private static void setTableFeatureProperty(final ApplySetfieldMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.miss.ApplySetfieldMiss applySetfieldMiss = propType.getApplySetfieldMiss();
+    private static void setTableFeatureProperty(final ApplySetfieldMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.apply.setfield.miss.ApplySetfieldMiss applySetfieldMiss = propType.getApplySetfieldMiss();
 
         if (null != applySetfieldMiss) {
             setFieldMatch = applySetfieldMiss.getSetFieldMatch();
@@ -293,13 +317,16 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
-    private static void setTableFeatureProperty(final ApplySetfield propType, final TableFeaturePropertiesBuilder propBuilder) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.setfield.ApplySetfield applySetfield = propType.getApplySetfield();
+    private static void setTableFeatureProperty(final ApplySetfield propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.apply.setfield.ApplySetfield applySetfield = propType.getApplySetfield();
 
         if (null != applySetfield) {
             setFieldMatch = applySetfield.getSetFieldMatch();
@@ -308,13 +335,16 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTAPPLYSETFIELD,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
-    private static void setTableFeatureProperty(final WriteSetfieldMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.miss.WriteSetfieldMiss writeSetfieldMiss = propType.getWriteSetfieldMiss();
+    private static void setTableFeatureProperty(final WriteSetfieldMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.write.setfield.miss.WriteSetfieldMiss writeSetfieldMiss = propType.getWriteSetfieldMiss();
 
         if (null != writeSetfieldMiss) {
             setFieldMatch = writeSetfieldMiss.getSetFieldMatch();
@@ -323,13 +353,16 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
-    private static void setTableFeatureProperty(final WriteSetfield propType, final TableFeaturePropertiesBuilder propBuilder) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.setfield.WriteSetfield writeSetField = propType.getWriteSetfield();
+    private static void setTableFeatureProperty(final WriteSetfield propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.write.setfield.WriteSetfield writeSetField = propType.getWriteSetfield();
 
         if (null != writeSetField) {
             setFieldMatch = writeSetField.getSetFieldMatch();
@@ -338,12 +371,14 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTWRITESETFIELD,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
-    private static void setTableFeatureProperty(final Wildcards propType, final TableFeaturePropertiesBuilder propBuilder) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
+    private static void setTableFeatureProperty(final Wildcards propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
         WildcardSetfield wildcardSetField = propType.getWildcardSetfield();
 
         if (null != wildcardSetField) {
@@ -353,13 +388,14 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTWILDCARDS,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
     private static void setTableFeatureProperty(final Match propType, final TableFeaturePropertiesBuilder propBuilder) {
         MatchSetfield matchSetField = propType.getMatchSetfield();
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFieldMatch = null;
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch>
+            setFieldMatch = null;
 
         if (null != matchSetField) {
             setFieldMatch = matchSetField.getSetFieldMatch();
@@ -368,84 +404,95 @@ public class TableFeaturesConvertor extends Convertor<
         setSetFieldTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTMATCH,
-                ((setFieldMatch == null) ? new ArrayList<>()
-                        : setFieldMatch));
+                setFieldMatch == null ? new ArrayList<>()
+                        : setFieldMatch);
     }
 
-    private static void setTableFeatureProperty(final ApplyActionsMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.actions.miss.ApplyActionsMiss applyActionsMiss = propType
-                .getApplyActionsMiss();
+    private static void setTableFeatureProperty(final ApplyActionsMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.apply.actions.miss.ApplyActionsMiss applyActionsMiss = propType.getApplyActionsMiss();
         setActionTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS,
-                ((applyActionsMiss == null) ? new ArrayList<>()
-                        : applyActionsMiss.getAction()));
+                applyActionsMiss == null ? new ArrayList<>()
+                        : applyActionsMiss.getAction());
     }
 
-    private static void setTableFeatureProperty(final ApplyActions propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.actions.ApplyActions applyActions = propType.getApplyActions();
+    private static void setTableFeatureProperty(final ApplyActions propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.apply.actions.ApplyActions applyActions = propType.getApplyActions();
         setActionTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTAPPLYACTIONS,
-                ((applyActions == null) ? new ArrayList<>()
-                        : applyActions.getAction()));
+                applyActions == null ? new ArrayList<>()
+                        : applyActions.getAction());
     }
 
-    private static void setTableFeatureProperty(final WriteActionsMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.miss.WriteActionsMiss writeActionsMiss = propType.getWriteActionsMiss();
+    private static void setTableFeatureProperty(final WriteActionsMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.write.actions.miss.WriteActionsMiss writeActionsMiss = propType.getWriteActionsMiss();
         setActionTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS,
-                ((writeActionsMiss == null) ? new ArrayList<>()
-                        : writeActionsMiss.getAction()));
+                writeActionsMiss == null ? new ArrayList<>()
+                        : writeActionsMiss.getAction());
     }
 
-    private static void setTableFeatureProperty(final WriteActions propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.WriteActions writeActions = propType.getWriteActions();
+    private static void setTableFeatureProperty(final WriteActions propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.write.actions.WriteActions writeActions = propType.getWriteActions();
         setActionTableFeatureProperty(
                 propBuilder,
                 TableFeaturesPropType.OFPTFPTWRITEACTIONS,
-                ((writeActions == null) ? new ArrayList<>()
-                        : writeActions.getAction()));
+                writeActions == null ? new ArrayList<>()
+                        : writeActions.getAction());
     }
 
-    private static void setTableFeatureProperty(final NextTableMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        TablesMiss tables = propType
-                .getTablesMiss();
+    private static void setTableFeatureProperty(final NextTableMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        TablesMiss tables = propType.getTablesMiss();
         setNextTableFeatureProperty(propBuilder, TableFeaturesPropType.OFPTFPTNEXTTABLESMISS,
-                (tables == null) ? new ArrayList<>() : tables.getTableIds());
+                tables == null ? new ArrayList<>() : tables.getTableIds());
     }
 
-    private static void setTableFeatureProperty(final NextTable propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.next.table.Tables tables = propType
-                .getTables();
+    private static void setTableFeatureProperty(final NextTable propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.next.table.Tables tables = propType.getTables();
         setNextTableFeatureProperty(propBuilder, TableFeaturesPropType.OFPTFPTNEXTTABLES,
-                (tables == null) ? new ArrayList<>() : tables.getTableIds());
+                tables == null ? new ArrayList<>() : tables.getTableIds());
     }
 
-    private static void setTableFeatureProperty(final InstructionsMiss propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.instructions.miss.InstructionsMiss instructions = propType
-                .getInstructionsMiss();
+    private static void setTableFeatureProperty(final InstructionsMiss propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.instructions.miss.InstructionsMiss instructions = propType.getInstructionsMiss();
         setInstructionTableFeatureProperty(propBuilder, TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS,
-                (instructions == null) ? new ArrayList<>() : instructions.getInstruction());
+                instructions == null ? new ArrayList<>() : instructions.getInstruction());
     }
 
-    private static void setTableFeatureProperty(final Instructions propType, final TableFeaturePropertiesBuilder propBuilder) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.instructions.Instructions instructions = propType
-                .getInstructions();
+    private static void setTableFeatureProperty(final Instructions propType,
+            final TableFeaturePropertiesBuilder propBuilder) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop
+            .type.instructions.Instructions instructions = propType.getInstructions();
         setInstructionTableFeatureProperty(propBuilder, TableFeaturesPropType.OFPTFPTINSTRUCTIONS,
-                (instructions == null) ? new ArrayList<>() : instructions.getInstruction());
+                instructions == null ? new ArrayList<>() : instructions.getInstruction());
     }
 
     private static void setInstructionTableFeatureProperty(final TableFeaturePropertiesBuilder builder,
-                                                           final TableFeaturesPropType type, final List<Instruction> instructionList) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction> instructionTypeList = new ArrayList<>();
+            final TableFeaturesPropType type, final List<Instruction> instructionList) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping
+            .Instruction> instructionTypeList = new ArrayList<>();
 
         for (Instruction currInstruction : instructionList) {
             InstructionBuilder instructionType = new InstructionBuilder();
 
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction instruction = currInstruction
-                    .getInstruction();
+            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction instruction =
+                    currInstruction.getInstruction();
 
             if (instruction instanceof GoToTableCase) {
                 GotoTableCaseBuilder goToTableCaseBuilder = new GotoTableCaseBuilder();
@@ -477,8 +524,8 @@ public class TableFeaturesConvertor extends Convertor<
         builder.addAugmentation(InstructionRelatedTableFeatureProperty.class, propBuilder.build());
     }
 
-    private static void setNextTableFeatureProperty(final TableFeaturePropertiesBuilder builder, final TableFeaturesPropType type,
-                                                    final List<Short> tableIds) {
+    private static void setNextTableFeatureProperty(final TableFeaturePropertiesBuilder builder,
+            final TableFeaturesPropType type, final List<Short> tableIds) {
         List<NextTableIds> nextTableIdsList = new ArrayList<>();
 
         for (Short tableId : tableIds) {
@@ -494,12 +541,14 @@ public class TableFeaturesConvertor extends Convertor<
     }
 
     private static void setActionTableFeatureProperty(final TableFeaturePropertiesBuilder builder,
-                                                      final TableFeaturesPropType type,
-                                                      final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> salActions) {
+            final TableFeaturesPropType type,
+            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action>
+                salActions) {
 
         List<Action> actionList = new ArrayList<>();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action currAction : salActions) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action currAction :
+                salActions) {
             org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action actionType = currAction
                     .getAction();
             ActionBuilder actionBuilder = new ActionBuilder();
@@ -567,15 +616,17 @@ public class TableFeaturesConvertor extends Convertor<
     private static void setSetFieldTableFeatureProperty(
             final TableFeaturePropertiesBuilder builder,
             final TableFeaturesPropType type,
-            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch> setFields) {
+            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match
+                .SetFieldMatch> setFields) {
         List<MatchEntry> matchEntriesList = new ArrayList<>();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch currMatch : setFields) {
-            Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MatchField> currMatchType = currMatch
-                    .getMatchType();
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch
+                currMatch : setFields) {
+            Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MatchField>
+                currMatchType = currMatch.getMatchType();
             MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
-            Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField> ofTableFeatureClass
-                    = SAL_TO_OF_TABLE_FEATURES.get(currMatchType);
+            Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField>
+                ofTableFeatureClass = SAL_TO_OF_TABLE_FEATURES.get(currMatchType);
             setMatchEntry(matchEntryBuilder, ofTableFeatureClass, currMatch.isHasMask());
             matchEntriesList.add(matchEntryBuilder.build());
         }
@@ -587,9 +638,9 @@ public class TableFeaturesConvertor extends Convertor<
     }
 
     private static void setMatchEntry(final MatchEntryBuilder builder,
-                                      final Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField> field,
-                                      final Boolean hasMask) {
-        if(field == TcpFlags.class) {
+            Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField> field,
+            final Boolean hasMask) {
+        if (field == TcpFlags.class) {
             builder.setOxmClass(ExperimenterClass.class);
         } else {
             builder.setOxmClass(OpenflowBasicClass.class);
@@ -604,12 +655,14 @@ public class TableFeaturesConvertor extends Convertor<
     }
 
     @Override
-    public List<TableFeatures> convert(org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures source, VersionConvertorData data) {
+    public List<TableFeatures> convert(
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures source,
+            VersionConvertorData data) {
         List<TableFeatures> ofTableFeaturesList = new ArrayList<>();
         TableFeaturesBuilder ofTableFeatures = new TableFeaturesBuilder();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures salTableFeatures : source
-                .getTableFeatures()) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures
+                salTableFeatures : source.getTableFeatures()) {
             ofTableFeatures.setTableId(salTableFeatures.getTableId());
             ofTableFeatures.setName(salTableFeatures.getName());
             ofTableFeatures.setMetadataMatch(salTableFeatures.getMetadataMatch());
index 0ee23117c8da1d7e1c8f53fb5f423057720991fe..d877b356def06268f52686215dd189590a5ae3ea 100644 (file)
@@ -165,13 +165,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.TableProperties;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.TablePropertiesBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeaturePropertiesBuilder;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Converts a OF library table features into the MD-SAL library table features.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -180,70 +180,93 @@ import org.slf4j.LoggerFactory;
  * }
  * </pre>
  */
-public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTableFeatures, List<TableFeatures>, VersionConvertorData> {
+public class TableFeaturesResponseConvertor
+        extends Convertor<MultipartReplyTableFeatures, List<TableFeatures>, VersionConvertorData> {
     private static final Logger LOG = LoggerFactory.getLogger(TableFeaturesResponseConvertor.class);
     private static final Map<TableFeaturesPropType, ActionExecutor> TABLE_FEATURE_PROPERTY_TYPE_TO_ACTION;
-    private static final Map<Class<?>, org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> OF_TO_SAL_ACTION;
-    private static final Map<Class<? extends MatchField>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MatchField>> OF_TO_SAL_TABLE_FEATURE_PROPERTIES;
+    private static final Map<Class<?>,
+        org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> OF_TO_SAL_ACTION;
+    private static final Map<Class<? extends MatchField>, Class<? extends org.opendaylight.yang.gen.v1.urn
+            .opendaylight.table.types.rev131026.MatchField>> OF_TO_SAL_TABLE_FEATURE_PROPERTIES;
     private static final Set<Class<?>> TYPES = Collections.singleton(MultipartReplyTableFeatures.class);
 
     static {
         final Builder<TableFeaturesPropType, ActionExecutor> builder = ImmutableMap.builder();
 
         builder.put(TableFeaturesPropType.OFPTFPTINSTRUCTIONS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsBuilder instructionBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsBuilder();
-            instructionBuilder
-                    .setInstructions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.instructions.InstructionsBuilder()
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.InstructionsBuilder instructionBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight
+                    .table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsBuilder();
+            instructionBuilder.setInstructions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026
+                    .table.feature.prop.type.table.feature.prop.type.instructions.InstructionsBuilder()
                             .setInstruction(setInstructionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(instructionBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsMissBuilder instructionMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsMissBuilder();
-            instructionMissBuilder
-                    .setInstructionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.instructions.miss.InstructionsMissBuilder()
-                            .setInstruction(setInstructionTableFeatureProperty(property)).build());
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.InstructionsMissBuilder instructionMissBuilder = new org.opendaylight.yang.gen.v1.urn
+                    .opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type
+                        .InstructionsMissBuilder();
+            instructionMissBuilder.setInstructionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.instructions.miss.InstructionsMissBuilder()
+                    .setInstruction(setInstructionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(instructionMissBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTNEXTTABLES, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.NextTableBuilder nextTableBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.NextTableBuilder();
-            nextTableBuilder
-                    .setTables(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.next.table.TablesBuilder()
-                            .setTableIds(setNextTableFeatureProperty(property)).build());
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.NextTableBuilder nextTableBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table
+                    .types.rev131026.table.feature.prop.type.table.feature.prop.type.NextTableBuilder();
+            nextTableBuilder.setTables(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table
+                .feature.prop.type.table.feature.prop.type.next.table.TablesBuilder()
+                       .setTableIds(setNextTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(nextTableBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.NextTableMissBuilder nextTableMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.NextTableMissBuilder();
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.NextTableMissBuilder nextTableMissBuilder = new org.opendaylight.yang.gen.v1.urn
+                    .opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type
+                        .NextTableMissBuilder();
             nextTableMissBuilder
                     .setTablesMiss(new TablesMissBuilder()
                             .setTableIds(setNextTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(nextTableMissBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTWRITEACTIONS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteActionsBuilder writeActionsBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteActionsBuilder();
-            writeActionsBuilder
-                    .setWriteActions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.WriteActionsBuilder()
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.WriteActionsBuilder writeActionsBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight
+                    .table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteActionsBuilder();
+            writeActionsBuilder.setWriteActions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                    .rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.WriteActionsBuilder()
                             .setAction(setActionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(writeActionsBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTWRITEACTIONSMISS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteActionsMissBuilder writeActionsMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteActionsMissBuilder();
-            writeActionsMissBuilder
-                    .setWriteActionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.miss.WriteActionsMissBuilder()
-                            .setAction(setActionTableFeatureProperty(property)).build());
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.WriteActionsMissBuilder writeActionsMissBuilder = new org.opendaylight.yang.gen.v1.urn
+                    .opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type
+                        .WriteActionsMissBuilder();
+            writeActionsMissBuilder.setWriteActionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.write.actions.miss.WriteActionsMissBuilder()
+                       .setAction(setActionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(writeActionsMissBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTAPPLYACTIONS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplyActionsBuilder applyActionsBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplyActionsBuilder();
-            applyActionsBuilder
-                    .setApplyActions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.actions.ApplyActionsBuilder()
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.ApplyActionsBuilder applyActionsBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight
+                    .table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplyActionsBuilder();
+            applyActionsBuilder.setApplyActions(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026
+                    .table.feature.prop.type.table.feature.prop.type.apply.actions.ApplyActionsBuilder()
                             .setAction(setActionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(applyActionsBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS, (property, propBuilder) -> {
-            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplyActionsMissBuilder applyActionsMissBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplyActionsMissBuilder();
-            applyActionsMissBuilder
-                    .setApplyActionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.apply.actions.miss.ApplyActionsMissBuilder()
-                            .setAction(setActionTableFeatureProperty(property)).build());
+            org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature
+                .prop.type.ApplyActionsMissBuilder applyActionsMissBuilder = new org.opendaylight.yang.gen.v1.urn
+                    .opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type
+                        .ApplyActionsMissBuilder();
+            applyActionsMissBuilder.setApplyActionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.apply.actions.miss.ApplyActionsMissBuilder()
+                       .setAction(setActionTableFeatureProperty(property)).build());
             propBuilder.setTableFeaturePropType(applyActionsMissBuilder.build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTMATCH, (property, propBuilder) -> {
@@ -255,68 +278,92 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
         builder.put(TableFeaturesPropType.OFPTFPTWILDCARDS, (property, propBuilder) -> {
             WildcardSetfieldBuilder wildcardsBuilder = new WildcardSetfieldBuilder();
             wildcardsBuilder.setSetFieldMatch(setSetFieldTableFeatureProperty(property, false));
-            propBuilder.setTableFeaturePropType(new WildcardsBuilder().setWildcardSetfield(wildcardsBuilder.build()).build());
+            propBuilder.setTableFeaturePropType(new WildcardsBuilder()
+                    .setWildcardSetfield(wildcardsBuilder.build()).build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTWRITESETFIELD, (property, propBuilder) -> {
             WriteSetfieldBuilder writeSetfieldBuilder = new WriteSetfieldBuilder();
             writeSetfieldBuilder.setSetFieldMatch(setSetFieldTableFeatureProperty(property, false));
-            propBuilder.setTableFeaturePropType(new
-                    org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteSetfieldBuilder().setWriteSetfield(writeSetfieldBuilder.build()).build());
+            propBuilder.setTableFeaturePropType(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                    .rev131026.table.feature.prop.type.table.feature.prop.type.WriteSetfieldBuilder()
+                        .setWriteSetfield(writeSetfieldBuilder.build()).build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTWRITESETFIELDMISS, (property, propBuilder) -> {
             WriteSetfieldMissBuilder writeSetfieldMissBuilder = new WriteSetfieldMissBuilder();
             writeSetfieldMissBuilder.setSetFieldMatch(setSetFieldTableFeatureProperty(property, false));
-            propBuilder.setTableFeaturePropType(new
-                    org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.WriteSetfieldMissBuilder().setWriteSetfieldMiss(writeSetfieldMissBuilder.build()).build());
+            propBuilder.setTableFeaturePropType(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.WriteSetfieldMissBuilder()
+                    .setWriteSetfieldMiss(writeSetfieldMissBuilder.build()).build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD, (property, propBuilder) -> {
             ApplySetfieldBuilder applySetfieldBuilder = new ApplySetfieldBuilder();
             applySetfieldBuilder.setSetFieldMatch(setSetFieldTableFeatureProperty(property, false));
-            propBuilder.setTableFeaturePropType(new
-                    org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplySetfieldBuilder().setApplySetfield(applySetfieldBuilder.build()).build());
+            propBuilder.setTableFeaturePropType(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.ApplySetfieldBuilder()
+                   .setApplySetfield(applySetfieldBuilder.build()).build());
         });
         builder.put(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS, (property, propBuilder) -> {
             ApplySetfieldMissBuilder applySetfieldMissBuilder = new ApplySetfieldMissBuilder();
             applySetfieldMissBuilder.setSetFieldMatch(setSetFieldTableFeatureProperty(property, false));
-            propBuilder.setTableFeaturePropType(new
-                    org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.ApplySetfieldMissBuilder().setApplySetfieldMiss(applySetfieldMissBuilder.build()).build());
+            propBuilder.setTableFeaturePropType(new org.opendaylight.yang.gen.v1.urn.opendaylight.table.types
+                .rev131026.table.feature.prop.type.table.feature.prop.type.ApplySetfieldMissBuilder()
+                    .setApplySetfieldMiss(applySetfieldMissBuilder.build()).build());
         });
 
-        builder.put(TableFeaturesPropType.OFPTFPTEXPERIMENTER, (property, propBuilder) -> LOG.debug("Experimenter Table features is unhandled"));
+        builder.put(TableFeaturesPropType.OFPTFPTEXPERIMENTER, (property, propBuilder) ->
+            LOG.debug("Experimenter Table features is unhandled"));
 
-        builder.put(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS, (property, propBuilder) -> LOG.debug("Experimenter miss Table features is unhandled"));
+        builder.put(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS, (property, propBuilder) ->
+            LOG.debug("Experimenter miss Table features is unhandled"));
 
         TABLE_FEATURE_PROPERTY_TYPE_TO_ACTION = builder.build();
-
     }
 
     static {
-        Builder<Class<?>, org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> builder = ImmutableMap.builder();
-
-        builder.put(OutputActionCase.class, new OutputActionCaseBuilder().setOutputAction(new OutputActionBuilder().build()).build());
-        builder.put(GroupCase.class, new GroupActionCaseBuilder().setGroupAction(new GroupActionBuilder().build()).build());
-        builder.put(CopyTtlOutCase.class, new CopyTtlOutCaseBuilder().setCopyTtlOut(new CopyTtlOutBuilder().build()).build());
-        builder.put(CopyTtlInCase.class, new CopyTtlInCaseBuilder().setCopyTtlIn(new CopyTtlInBuilder().build()).build());
-        builder.put(SetMplsTtlCase.class, new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(new SetMplsTtlActionBuilder().build()).build());
-        builder.put(DecMplsTtlCase.class, new DecMplsTtlCaseBuilder().setDecMplsTtl(new DecMplsTtlBuilder().build()).build());
-        builder.put(PushVlanCase.class, new PushVlanActionCaseBuilder().setPushVlanAction(new PushVlanActionBuilder().build()).build());
-        builder.put(PopVlanCase.class, new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build());
-        builder.put(PushMplsCase.class, new PushMplsActionCaseBuilder().setPushMplsAction(new PushMplsActionBuilder().build()).build());
-        builder.put(PopMplsCase.class, new PopMplsActionCaseBuilder().setPopMplsAction(new PopMplsActionBuilder().build()).build());
-        builder.put(SetQueueCase.class, new SetQueueActionCaseBuilder().setSetQueueAction(new SetQueueActionBuilder().build()).build());
-        builder.put(SetNwTtlCase.class, new SetNwTtlActionCaseBuilder().setSetNwTtlAction(new SetNwTtlActionBuilder().build()).build());
+        Builder<Class<?>, org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> builder =
+                ImmutableMap.builder();
+
+        builder.put(OutputActionCase.class,
+                new OutputActionCaseBuilder().setOutputAction(new OutputActionBuilder().build()).build());
+        builder.put(GroupCase.class,
+                new GroupActionCaseBuilder().setGroupAction(new GroupActionBuilder().build()).build());
+        builder.put(CopyTtlOutCase.class,
+                new CopyTtlOutCaseBuilder().setCopyTtlOut(new CopyTtlOutBuilder().build()).build());
+        builder.put(CopyTtlInCase.class,
+                new CopyTtlInCaseBuilder().setCopyTtlIn(new CopyTtlInBuilder().build()).build());
+        builder.put(SetMplsTtlCase.class,
+                new SetMplsTtlActionCaseBuilder().setSetMplsTtlAction(new SetMplsTtlActionBuilder().build()).build());
+        builder.put(DecMplsTtlCase.class,
+                new DecMplsTtlCaseBuilder().setDecMplsTtl(new DecMplsTtlBuilder().build()).build());
+        builder.put(PushVlanCase.class,
+                new PushVlanActionCaseBuilder().setPushVlanAction(new PushVlanActionBuilder().build()).build());
+        builder.put(PopVlanCase.class,
+                new PopVlanActionCaseBuilder().setPopVlanAction(new PopVlanActionBuilder().build()).build());
+        builder.put(PushMplsCase.class,
+                new PushMplsActionCaseBuilder().setPushMplsAction(new PushMplsActionBuilder().build()).build());
+        builder.put(PopMplsCase.class,
+                new PopMplsActionCaseBuilder().setPopMplsAction(new PopMplsActionBuilder().build()).build());
+        builder.put(SetQueueCase.class,
+                new SetQueueActionCaseBuilder().setSetQueueAction(new SetQueueActionBuilder().build()).build());
+        builder.put(SetNwTtlCase.class,
+                new SetNwTtlActionCaseBuilder().setSetNwTtlAction(new SetNwTtlActionBuilder().build()).build());
         builder.put(DecNwTtlCase.class, new DecNwTtlCaseBuilder().setDecNwTtl(new DecNwTtlBuilder().build()).build());
         builder.put(SetFieldCase.class, new SetFieldCaseBuilder().setSetField(new SetFieldBuilder().build()).build());
-        builder.put(PushPbbCase.class, new PushPbbActionCaseBuilder().setPushPbbAction(new PushPbbActionBuilder().build()).build());
-        builder.put(PopPbbCase.class, new PopPbbActionCaseBuilder().setPopPbbAction(new PopPbbActionBuilder().build()).build());
-        builder.put(SetNwSrcCase.class, new SetNwSrcActionCaseBuilder().setSetNwSrcAction(new SetNwSrcActionBuilder().build()).build());
-        builder.put(SetNwDstCase.class, new SetNwDstActionCaseBuilder().setSetNwDstAction(new SetNwDstActionBuilder().build()).build());
+        builder.put(PushPbbCase.class,
+                new PushPbbActionCaseBuilder().setPushPbbAction(new PushPbbActionBuilder().build()).build());
+        builder.put(PopPbbCase.class,
+                new PopPbbActionCaseBuilder().setPopPbbAction(new PopPbbActionBuilder().build()).build());
+        builder.put(SetNwSrcCase.class,
+                new SetNwSrcActionCaseBuilder().setSetNwSrcAction(new SetNwSrcActionBuilder().build()).build());
+        builder.put(SetNwDstCase.class,
+                new SetNwDstActionCaseBuilder().setSetNwDstAction(new SetNwDstActionBuilder().build()).build());
 
         OF_TO_SAL_ACTION = builder.build();
     }
 
     static {
-        final Builder<Class<? extends MatchField>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MatchField>> builder = ImmutableMap.builder();
+        final Builder<Class<? extends MatchField>, Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.table
+                .types.rev131026.MatchField>> builder = ImmutableMap.builder();
 
         builder.put(ArpOp.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpOp.class);
         builder.put(ArpSha.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.ArpSha.class);
@@ -326,11 +373,16 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
         builder.put(EthDst.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthDst.class);
         builder.put(EthSrc.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthSrc.class);
         builder.put(EthType.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.EthType.class);
-        builder.put(Icmpv4Code.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Code.class);
-        builder.put(Icmpv4Type.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Type.class);
-        builder.put(Icmpv6Code.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Code.class);
-        builder.put(Icmpv6Type.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type.class);
-        builder.put(InPhyPort.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPhyPort.class);
+        builder.put(Icmpv4Code.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Code.class);
+        builder.put(Icmpv4Type.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv4Type.class);
+        builder.put(Icmpv6Code.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Code.class);
+        builder.put(Icmpv6Type.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Icmpv6Type.class);
+        builder.put(InPhyPort.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPhyPort.class);
         builder.put(InPort.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.InPort.class);
         builder.put(IpDscp.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpDscp.class);
         builder.put(IpEcn.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.IpEcn.class);
@@ -338,15 +390,21 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
         builder.put(Ipv4Dst.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Dst.class);
         builder.put(Ipv4Src.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv4Src.class);
         builder.put(Ipv6Dst.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Dst.class);
-        builder.put(Ipv6Exthdr.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Exthdr.class);
-        builder.put(Ipv6Flabel.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Flabel.class);
-        builder.put(Ipv6NdSll.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdSll.class);
-        builder.put(Ipv6NdTarget.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTarget.class);
-        builder.put(Ipv6NdTll.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTll.class);
+        builder.put(Ipv6Exthdr.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Exthdr.class);
+        builder.put(Ipv6Flabel.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Flabel.class);
+        builder.put(Ipv6NdSll.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdSll.class);
+        builder.put(Ipv6NdTarget.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTarget.class);
+        builder.put(Ipv6NdTll.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6NdTll.class);
         builder.put(Ipv6Src.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Ipv6Src.class);
         builder.put(Metadata.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.Metadata.class);
         builder.put(MplsBos.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsBos.class);
-        builder.put(MplsLabel.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsLabel.class);
+        builder.put(MplsLabel.class,
+                org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsLabel.class);
         builder.put(MplsTc.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.MplsTc.class);
         builder.put(PbbIsid.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.PbbIsid.class);
         builder.put(SctpDst.class, org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.SctpDst.class);
@@ -370,7 +428,8 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
                     .build();
         }
 
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table.properties.TableFeatureProperties> salTablePropertiesList = new ArrayList<>();
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.table.features.table
+            .properties.TableFeatureProperties> salTablePropertiesList = new ArrayList<>();
         TableFeaturePropertiesBuilder propBuilder = new TableFeaturePropertiesBuilder();
         int index = 0;
 
@@ -394,7 +453,9 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
 
     private static List<Instruction> setInstructionTableFeatureProperty(final TableFeatureProperties properties) {
         List<Instruction> instructionList = new ArrayList<>();
-        org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder builder = new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder();
+        org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder
+            builder = new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction
+                .list.InstructionBuilder();
         int index = 0;
 
         for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731
@@ -403,29 +464,29 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
             InstructionChoice currInstructionType = currInstruction.getInstructionChoice();
 
             if (currInstructionType instanceof GotoTableCase) {
-                builder.setInstruction((new GoToTableCaseBuilder()
+                builder.setInstruction(new GoToTableCaseBuilder()
                         .setGoToTable(new GoToTableBuilder().build())
-                        .build()));
+                        .build());
             } else if (currInstructionType instanceof WriteMetadataCase) {
-                builder.setInstruction((new WriteMetadataCaseBuilder()
+                builder.setInstruction(new WriteMetadataCaseBuilder()
                         .setWriteMetadata(new WriteMetadataBuilder().build())
-                        .build()));
+                        .build());
             } else if (currInstructionType instanceof WriteActionsCase) {
-                builder.setInstruction((new WriteActionsCaseBuilder()
+                builder.setInstruction(new WriteActionsCaseBuilder()
                         .setWriteActions(new WriteActionsBuilder().build())
-                        .build()));
+                        .build());
             } else if (currInstructionType instanceof ApplyActionsCase) {
-                builder.setInstruction((new ApplyActionsCaseBuilder()
+                builder.setInstruction(new ApplyActionsCaseBuilder()
                         .setApplyActions(new ApplyActionsBuilder().build())
-                        .build()));
+                        .build());
             } else if (currInstructionType instanceof ClearActionsCase) {
-                builder.setInstruction((new ClearActionsCaseBuilder()
+                builder.setInstruction(new ClearActionsCaseBuilder()
                         .setClearActions(new ClearActionsBuilder().build())
-                        .build()));
+                        .build());
             } else if (currInstructionType instanceof MeterCase) {
-                builder.setInstruction((new MeterCaseBuilder()
+                builder.setInstruction(new MeterCaseBuilder()
                         .setMeter(new MeterBuilder().build())
-                        .build()));
+                        .build());
             }
 
             // TODO: Experimenter instructions are unhandled
@@ -443,19 +504,23 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
                 .getNextTableIds().stream().map(NextTableIds::getTableId).collect(Collectors.toList());
     }
 
-    private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> setActionTableFeatureProperty(
-            final TableFeatureProperties properties) {
-        List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actionList = new ArrayList<>();
+    private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action>
+            setActionTableFeatureProperty(final TableFeatureProperties properties) {
+        List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> actionList =
+                new ArrayList<>();
         int order = 0;
 
         for (Action action : properties
                 .getAugmentation(ActionRelatedTableFeatureProperty.class).getAction()) {
             if (action != null && null != action.getActionChoice()) {
-                org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder actionBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder();
+                org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder
+                    actionBuilder = new org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action
+                        .list.ActionBuilder();
 
                 actionBuilder.setOrder(order++);
                 ActionChoice actionType = action.getActionChoice();
-                org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action salAction = OF_TO_SAL_ACTION.get(actionType.getImplementedInterface());
+                org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action salAction =
+                        OF_TO_SAL_ACTION.get(actionType.getImplementedInterface());
 
                 actionBuilder.setAction(salAction);
                 actionList.add(actionBuilder.build());
@@ -500,18 +565,20 @@ public class TableFeaturesResponseConvertor extends Convertor<MultipartReplyTabl
         List<TableFeatures> salTableFeaturesList = new ArrayList<>();
         TableFeaturesBuilder salTableFeatures = new TableFeaturesBuilder();
 
-        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.
-                multipart.reply.table.features._case.multipart.reply.table.features.TableFeatures ofTableFeatures : source
-                .getTableFeatures()) {
+        for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply
+                .body.multipart.reply.table.features._case.multipart.reply.table.features.TableFeatures
+                    ofTableFeatures : source.getTableFeatures()) {
             salTableFeatures.setTableId(ofTableFeatures.getTableId());
             salTableFeatures.setName(ofTableFeatures.getName());
 
             if (ofTableFeatures.getMetadataMatch() != null) {
-                salTableFeatures.setMetadataMatch(new BigInteger(OFConstants.SIGNUM_UNSIGNED, ofTableFeatures.getMetadataMatch()));
+                salTableFeatures.setMetadataMatch(new BigInteger(OFConstants.SIGNUM_UNSIGNED,
+                        ofTableFeatures.getMetadataMatch()));
             }
 
             if (ofTableFeatures.getMetadataWrite() != null) {
-                salTableFeatures.setMetadataWrite(new BigInteger(OFConstants.SIGNUM_UNSIGNED, ofTableFeatures.getMetadataWrite()));
+                salTableFeatures.setMetadataWrite(new BigInteger(OFConstants.SIGNUM_UNSIGNED,
+                        ofTableFeatures.getMetadataWrite()));
             }
 
             if (ofTableFeatures.getConfig() != null) {
index c66508bfad3bc9710a453aebce570b0504e743e9..0dbaca353c7f794e0be059909291f32f9a0bb307 100644 (file)
@@ -61,11 +61,11 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Con
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorProcessor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.OrderComparator;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
- * Converts SAL actions into OF Library actions
+ * Converts SAL actions into OF Library actions.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -81,7 +81,8 @@ public final class ActionConvertor extends Convertor<
         List<Action>,
         ActionConvertorData> {
 
-    private static final ConvertorProcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action, Action, ActionConvertorData> PROCESSOR = new ConvertorProcessor<
+    private static final ConvertorProcessor<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112
+        .action.Action, Action, ActionConvertorData> PROCESSOR = new ConvertorProcessor<
             org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action,
             Action,
             ActionConvertorData>()
@@ -130,9 +131,12 @@ public final class ActionConvertor extends Convertor<
             .addCase(new SalToOfSetNwTosActionV10Case())
             // Try to convert action grouping using converters from openflowplugin-extension
             .addCase(new SalToOfGeneralExtensionGroupingCase());
-    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action.class);
-    private static final Ordering<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> ACTION_ORDERING =
-            Ordering.from(OrderComparator.<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action>build());
+
+    private static final Set<Class<?>> TYPES = Collections.singleton(org.opendaylight.yang.gen.v1.urn.opendaylight
+            .action.types.rev131112.action.list.Action.class);
+    private static final Ordering<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112
+            .action.list.Action> ACTION_ORDERING = Ordering.from(OrderComparator.<org.opendaylight.yang.gen.v1.urn
+                    .opendaylight.action.types.rev131112.action.list.Action>build());
 
     @Override
     public Collection<Class<?>> getTypes() {
@@ -140,17 +144,20 @@ public final class ActionConvertor extends Convertor<
     }
 
     @Override
-    public List<Action> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> source, ActionConvertorData data) {
+    public List<Action> convert(List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action
+            .list.Action> source, ActionConvertorData data) {
         // Prepare list of converted actions
         final List<Action> result = new ArrayList<>();
 
         // Iterate over SAL actions, run them through tokenizer and then add them to list of converted actions
         if (source != null) {
-            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action> sortedActions =
-                    ACTION_ORDERING.sortedCopy(source);
+            final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action>
+                sortedActions = ACTION_ORDERING.sortedCopy(source);
 
-            for (final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action action : sortedActions) {
-                final Optional<Action> convertedAction = PROCESSOR.process(action.getAction(), data, getConvertorExecutor());
+            for (final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action action :
+                    sortedActions) {
+                final Optional<Action> convertedAction = PROCESSOR.process(action.getAction(), data,
+                        getConvertorExecutor());
 
                 if (convertedAction.isPresent()) {
                     result.add(convertedAction.get());
index e17457fb7220cf55b0fa9f51bf5933e4c72dbde3..c91fe9c201d4070dc8b5f565bd33bd4b624e6411 100644 (file)
@@ -47,11 +47,11 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Con
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorProcessor;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
 
 /**
  * Converts OF actions associated with bucket to SAL Actions.
  *
+ * <p>
  * Example usage:
  * <pre>
  * {@code
@@ -66,7 +66,8 @@ public final class ActionResponseConvertor extends Convertor<
         List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>,
         ActionResponseConvertorData> {
 
-    private static final ConvertorProcessor<ActionChoice, org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action, ActionResponseConvertorData> PROCESSOR = new ConvertorProcessor<
+    private static final ConvertorProcessor<ActionChoice, org.opendaylight.yang.gen.v1.urn.opendaylight.action.types
+        .rev131112.action.Action, ActionResponseConvertorData> PROCESSOR = new ConvertorProcessor<
             ActionChoice,
             org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action,
             ActionResponseConvertorData>()
@@ -107,14 +108,17 @@ public final class ActionResponseConvertor extends Convertor<
     }
 
     @Override
-    public List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> convert(List<Action> source, ActionResponseConvertorData data) {
-        final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> result = new ArrayList<>();
+    public List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>
+            convert(List<Action> source, ActionResponseConvertorData data) {
+        final List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> result =
+                new ArrayList<>();
         final OpenflowVersion ofVersion = OpenflowVersion.get(data.getVersion());
 
         // Iterate over Openflow actions, run them through tokenizer and then add them to list of converted actions
         if (source != null) {
             for (final Action action : source) {
-                final Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> convertedAction = PROCESSOR.process(action.getActionChoice(), data, getConvertorExecutor());
+                final Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>
+                    convertedAction = PROCESSOR.process(action.getActionChoice(), data, getConvertorExecutor());
 
                 if (convertedAction.isPresent()) {
                     result.add(convertedAction.get());
index 28e95b9310e4eb02fe5ea96d944f268628c698a1..ec75919aa9722508ca0684b61e638ff2581d9d18 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalCopyTtlInCase extends ConvertorCase<CopyTtlInCase, Action, A
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final CopyTtlInCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final CopyTtlInCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         CopyTtlInBuilder copyTtlInaction = new CopyTtlInBuilder();
         return Optional.of(new CopyTtlInCaseBuilder().setCopyTtlIn(copyTtlInaction.build()).build());
     }
index 53a75112320d7062c983475d35a1b6b64668189a..833f252d2ff57931735f76e148ce935c169a94f5 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalCopyTtlOutCase extends ConvertorCase<CopyTtlOutCase, Action,
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final CopyTtlOutCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final CopyTtlOutCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         CopyTtlOutBuilder copyTtlOutaction = new CopyTtlOutBuilder();
         return Optional.of(new CopyTtlOutCaseBuilder().setCopyTtlOut(copyTtlOutaction.build()).build());
     }
index f3ff8f3ee59a1bc9701b73b17dc5554a4fdebcaf..aaab8e9a998b3bc6358564866c81f0506885908a 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalDecMplsTtlCase extends ConvertorCase<DecMplsTtlCase, Action,
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final DecMplsTtlCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final DecMplsTtlCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         DecMplsTtlBuilder decMplsTtl = new DecMplsTtlBuilder();
         return Optional.of(new DecMplsTtlCaseBuilder().setDecMplsTtl(decMplsTtl.build()).build());
     }
index 7a74be06022bdac66eea46bc544d897add89f90c..83c874f87acdf9d406f2f399cc1b6e66479f024d 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalDecNwTtlCase extends ConvertorCase<DecNwTtlCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final DecNwTtlCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final DecNwTtlCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         DecNwTtlBuilder decNwTtl = new DecNwTtlBuilder();
         return Optional.of(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl.build()).build());
     }
index ae5067ef49e8e3ca47e3db1e41e7352304f52c24..9429751d5c2997e639132f86368260df3a84a269 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalGroupCase extends ConvertorCase<GroupCase, Action, ActionRes
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final GroupCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final GroupCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         GroupAction groupActionFromOF = source.getGroupAction();
         GroupActionBuilder groupAction = new GroupActionBuilder();
         groupAction.setGroupId(groupActionFromOF.getGroupId());
index f24ff5fb01e69544783bd72e7f4d4155f399b2d5..46051852df384da56fffd5e423bbea7d7df76c99 100644 (file)
@@ -34,14 +34,16 @@ public class OfToSalOutputActionCase extends ConvertorCase<OutputActionCase, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final OutputActionCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final OutputActionCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         final OpenflowVersion ofVersion = OpenflowVersion.get(data.getVersion());
 
         OutputActionBuilder outputAction = new OutputActionBuilder();
         OutputAction outputActionFromOF = source.getOutputAction();
 
         if (outputActionFromOF.getPort() != null) {
-            PortNumberUni protocolAgnosticPort = OpenflowPortsUtil.getProtocolAgnosticPort(ofVersion, outputActionFromOF.getPort().getValue());
+            PortNumberUni protocolAgnosticPort = OpenflowPortsUtil.getProtocolAgnosticPort(ofVersion,
+                    outputActionFromOF.getPort().getValue());
             String portNumberAsString = OpenflowPortsUtil.portNumberToString(protocolAgnosticPort);
             outputAction.setOutputNodeConnector(new Uri(portNumberAsString));
         } else {
index 613dcc78979af77be61241f1271b0165a94cefe0..69c7a5519d53960626a7d2d97ce386fc7f14277b 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalPopMplsCase extends ConvertorCase<PopMplsCase, Action, Actio
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PopMplsCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PopMplsCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PopMplsAction popMplsActionFromOF = source.getPopMplsAction();
         PopMplsActionBuilder popMplsAction = new PopMplsActionBuilder();
         popMplsAction.setEthernetType(popMplsActionFromOF.getEthertype().getValue());
index 910351c5071b0c983421cc18031b2047f4db8bb6..706e9341ab740d5ae48faf017b5ddda33ec31a73 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalPopPbbCase extends ConvertorCase<PopPbbCase, Action, ActionR
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PopPbbCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PopPbbCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PopPbbActionBuilder popPbb = new PopPbbActionBuilder();
         return Optional.of(new PopPbbActionCaseBuilder().setPopPbbAction(popPbb.build()).build());
     }
index b7b5f64d48305b8542730c8226f6a8651a03c02a..21fe1984ebe87a0bba19381e5f2a687240daca53 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalPopVlanCase extends ConvertorCase<PopVlanCase, Action, Actio
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PopVlanCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PopVlanCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PopVlanActionBuilder popVlan = new PopVlanActionBuilder();
         return Optional.of(new PopVlanActionCaseBuilder().setPopVlanAction(popVlan.build()).build());
     }
index 37217fba3c8ff663b0e1249b768c81f23cec1440..39b31ecae5ad29c542e80a0ceb26338a311cde98 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalPushMplsCase extends ConvertorCase<PushMplsCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PushMplsCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PushMplsCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PushMplsAction pushMplsActionFromOF = source.getPushMplsAction();
         PushMplsActionBuilder pushMplsAction = new PushMplsActionBuilder();
         pushMplsAction.setEthernetType(pushMplsActionFromOF.getEthertype().getValue());
index 2b09fdb6fe0c04732402cf806d1a761f89093f67..45b1d9f1a8e4187c890ed8c30368b9c9fc1eabf3 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalPushPbbCase extends ConvertorCase<PushPbbCase, Action, Actio
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PushPbbCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PushPbbCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PushPbbAction pushPbbActionFromOf = source.getPushPbbAction();
         PushPbbActionBuilder pushPbbAction = new PushPbbActionBuilder();
         pushPbbAction.setEthernetType(pushPbbActionFromOf.getEthertype().getValue());
index c4864e184cf5c72af0994dd2983edbd6800ea0cd..d161fe96f03b0b6c1fcc9d08263993cdc5e5616c 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalPushVlanCase extends ConvertorCase<PushVlanCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final PushVlanCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final PushVlanCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PushVlanAction pushVlanActionFromOF = source.getPushVlanAction();
         PushVlanActionBuilder pushVlanAction = new PushVlanActionBuilder();
         pushVlanAction.setEthernetType(pushVlanActionFromOF.getEthertype().getValue());
index 9701afaea19f24e3e2ca2259a857e71592b5576f..b0aaaedd453f9d8e826b78b3c1eb6eebd9b8de76 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalSetDlDstCase extends ConvertorCase<SetDlDstCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetDlDstCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetDlDstCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetDlDstActionCaseBuilder()
                 .setSetDlDstAction(new SetDlDstActionBuilder()
                         .setAddress(source.getSetDlDstAction().getDlDstAddress())
index 3a1ae64343e29d66e146f29f57313698585e89f1..2c7643a2a0280ada0cc6e44090ea795624a83504 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalSetDlSrcCase extends ConvertorCase<SetDlSrcCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetDlSrcCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetDlSrcCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetDlSrcActionCaseBuilder()
                 .setSetDlSrcAction(new SetDlSrcActionBuilder()
                         .setAddress(source.getSetDlSrcAction().getDlSrcAddress())
index 9a3def349ccb9bebe6663ba66ff176b6a2abc5bb..2e97f78db6fa4ffaab1888758a660bfac859c398 100644 (file)
@@ -28,8 +28,10 @@ public class OfToSalSetFieldCase extends ConvertorCase<SetFieldCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetFieldCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
-        final VersionDatapathIdConvertorData datapathIdConvertorData = new VersionDatapathIdConvertorData(data.getVersion());
+    public Optional<Action> process(@Nonnull final SetFieldCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
+        final VersionDatapathIdConvertorData datapathIdConvertorData =
+                new VersionDatapathIdConvertorData(data.getVersion());
         final SetFieldAction setFieldAction = source.getSetFieldAction();
         final SetFieldBuilder setField = new SetFieldBuilder();
         final Optional<MatchBuilder> matchOptional = convertorExecutor.convert(setFieldAction, datapathIdConvertorData);
index ac79d817065b0b3cdfdff478b5637b97877a1a10..3b31516e9e23105c49abda9388f2694cb0453297 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetMplsTtlCase extends ConvertorCase<SetMplsTtlCase, Action,
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetMplsTtlCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetMplsTtlCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         SetMplsTtlAction setMplsTtlActionFromOF = source.getSetMplsTtlAction();
 
         SetMplsTtlActionBuilder mplsTtlAction = new SetMplsTtlActionBuilder();
index 98eccff4e503e3d99fc0d874ba86c36f17728ec6..251c0d586a501f48376c7f2dc1bce251c14ad103 100644 (file)
@@ -27,13 +27,12 @@ public class OfToSalSetNwDstCase extends ConvertorCase<SetNwDstCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetNwDstCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetNwDstCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetNwDstActionCaseBuilder()
-                .setSetNwDstAction(new SetNwDstActionBuilder()
-                        .setAddress(new Ipv4Builder()
-                                .setIpv4Address(IpConversionUtil.createPrefix(source.getSetNwDstAction().getIpAddress()))
-                                .build())
-                        .build())
+                .setSetNwDstAction(new SetNwDstActionBuilder().setAddress(new Ipv4Builder()
+                        .setIpv4Address(IpConversionUtil.createPrefix(source.getSetNwDstAction().getIpAddress()))
+                        .build()).build())
                 .build());
     }
 }
index 32b3753261446adb8ff23059630a245d12121b35..d08ba4078bfa45ff3cc479d9421894a8199ea894 100644 (file)
@@ -27,13 +27,12 @@ public class OfToSalSetNwSrcCase extends ConvertorCase<SetNwSrcCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetNwSrcCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetNwSrcCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetNwSrcActionCaseBuilder()
-                .setSetNwSrcAction(new SetNwSrcActionBuilder()
-                        .setAddress(new Ipv4Builder()
-                                .setIpv4Address(IpConversionUtil.createPrefix(source.getSetNwSrcAction().getIpAddress()))
-                                .build())
-                        .build())
+                .setSetNwSrcAction(new SetNwSrcActionBuilder().setAddress(new Ipv4Builder()
+                        .setIpv4Address(IpConversionUtil.createPrefix(source.getSetNwSrcAction().getIpAddress()))
+                        .build()).build())
                 .build());
     }
 }
index cbf4cb3d56070aa5a6ec0d40e230c71f5894a358..b26aae603e720ee1738d9c59140c16676b73bf2c 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalSetNwTosCase extends ConvertorCase<SetNwTosCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetNwTosCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetNwTosCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetNwTosActionCaseBuilder()
                 .setSetNwTosAction(new SetNwTosActionBuilder()
                         .setTos((int) source.getSetNwTosAction().getNwTos())
index 07cb4b962ca8cc4e6ae84c3288a7c594ac111f1f..cf484639aa46ab8ddec5df2c7556b49ed39e2831 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetNwTtlCase extends ConvertorCase<SetNwTtlCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetNwTtlCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetNwTtlCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         SetNwTtlAction setNwTtlActionFromOf = source.getSetNwTtlAction();
         SetNwTtlActionBuilder setNwTtl = new SetNwTtlActionBuilder();
         setNwTtl.setNwTtl(setNwTtlActionFromOf.getNwTtl());
index 49c9a3e664f6286beebd409fe4e2fc6a4e7ccfd8..dc7bc54e65fc20525ac3a6c438456764f7704270 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetQueueCase extends ConvertorCase<SetQueueCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetQueueCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetQueueCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         SetQueueAction queueActionFromOF = source.getSetQueueAction();
         SetQueueActionBuilder setQueueAction = new SetQueueActionBuilder();
         setQueueAction.setQueueId(queueActionFromOF.getQueueId());
index 22ec78fe132a5eed8a5d157eacee2166fa192611..c5758a54b8a2d7ae5069fa78bec792c7ad2c30ec 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetTpDstCase extends ConvertorCase<SetTpDstCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetTpDstCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetTpDstCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetTpDstActionCaseBuilder()
                 .setSetTpDstAction(new SetTpDstActionBuilder()
                         .setPort(new PortNumber(source.getSetTpDstAction().getPort().getValue().intValue()))
index 25e4f08dc247283bac1e015ac59428b5707de64f..404ba62f52b3d719587feea6ae8cad8eaa579abc 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetTpSrcCase extends ConvertorCase<SetTpSrcCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetTpSrcCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetTpSrcCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetTpSrcActionCaseBuilder()
                 .setSetTpSrcAction(new SetTpSrcActionBuilder()
                         .setPort(new PortNumber(source.getSetTpSrcAction().getPort().getValue().intValue()))
index 93b29a77ac2228042be0cd2dd5330b4bf9252f3d..324decbc242413437fec17d236d86b80406b7069 100644 (file)
@@ -14,7 +14,6 @@ import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionResponseConvertorData;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorCase;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetVlanIdActionCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder;
@@ -27,7 +26,8 @@ public class OfToSalSetVlanIdCase extends ConvertorCase<SetVlanVidCase, Action,
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetVlanVidCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetVlanVidCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetVlanIdActionCaseBuilder()
                 .setSetVlanIdAction(new SetVlanIdActionBuilder()
                         .setVlanId(new VlanId(source.getSetVlanVidAction().getVlanVid()))
index a2f036c51d02cc9d1e822205a0e3fb0849188f43..6d828d8f16924aea086409b269a01e310b3a5eb9 100644 (file)
@@ -26,7 +26,8 @@ public class OfToSalSetVlanPcpCase extends ConvertorCase<SetVlanPcpCase, Action,
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetVlanPcpCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final SetVlanPcpCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetVlanPcpActionCaseBuilder()
                 .setSetVlanPcpAction(new SetVlanPcpActionBuilder()
                         .setVlanPcp(new VlanPcp(source.getSetVlanPcpAction().getVlanPcp()))
index e8f091a5aab2553216e615b8d5aabf7e9b786f7a..b79658b821e19203eeddd99feddc1f27a33079a6 100644 (file)
@@ -25,7 +25,8 @@ public class OfToSalStripVlanCase extends ConvertorCase<StripVlanCase, Action, A
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final StripVlanCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final StripVlanCase source, final ActionResponseConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         PopVlanActionBuilder popVlan = new PopVlanActionBuilder();
         return Optional.of(new PopVlanActionCaseBuilder().setPopVlanAction(popVlan.build()).build());
     }
index 6b51ad78371f8b0345d5d1e4354d5a703d5cf4be..ee2bb6babe4d1b1d29a4b0d0a1a4f214c55aa006 100644 (file)
@@ -26,9 +26,10 @@ public class SalToOfCopyTtlInCase extends ConvertorCase<CopyTtlInCase, Action, A
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final CopyTtlInCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final CopyTtlInCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new ActionBuilder()
                 .setActionChoice(new CopyTtlInCaseBuilder().build())
                 .build());
     }
-}
\ No newline at end of file
+}
index 76b393738daaffa0f9d58cd387ae8ed6d848425e..fd1dd8db119fe61ad9efc59f96c6b5e1c669417b 100644 (file)
@@ -26,9 +26,10 @@ public class SalToOfCopyTtlOutCase extends ConvertorCase<CopyTtlOutCase, Action,
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final CopyTtlOutCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final CopyTtlOutCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new ActionBuilder()
                 .setActionChoice(new CopyTtlOutCaseBuilder().build())
                 .build());
     }
-}
\ No newline at end of file
+}
index 8b48009aee55cdcec570bab3c4ff13d83bc442fd..fadf1f0a62d560633a7d37b0369b0a155423b573 100644 (file)
@@ -26,7 +26,8 @@ public class SalToOfDecMplsTtlCase extends ConvertorCase<DecMplsTtlCase, Action,
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final DecMplsTtlCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final DecMplsTtlCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new ActionBuilder()
                 .setActionChoice(new DecMplsTtlCaseBuilder().build())
                 .build());
index 5b2e722c46cc4ef9f0f1ba5065f0e0cd27bdc1cf..9cda25f6323346140af223220b9e1a379c08fb26 100644 (file)
@@ -26,9 +26,10 @@ public class SalToOfDecNwTtlCase extends ConvertorCase<DecNwTtlCase, Action, Act
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final DecNwTtlCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final DecNwTtlCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.of(new ActionBuilder()
                 .setActionChoice(new DecNwTtlCaseBuilder().build())
                 .build());
     }
-}
\ No newline at end of file
+}
index 104ea4e47175ab86a53d72f0111ba7ea67f139f1..2fa8365fa3f4488539bf959f92e307b7ddc64dea 100644 (file)
@@ -24,7 +24,8 @@ public class SalToOfDropActionCase extends ConvertorCase<DropActionCase, Action,
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final DropActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final DropActionCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         return Optional.empty();
     }
 }
index a36443453497e81b127c5e7dd98c3aca0136ca3f..309c0605d3759600f32bd5fc9ced82b1c85addd1 100644 (file)
@@ -24,7 +24,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.ge
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class SalToOfGeneralExtensionGroupingCase extends ConvertorCase<GeneralExtensionGrouping, Action, ActionConvertorData> {
+public class SalToOfGeneralExtensionGroupingCase
+        extends ConvertorCase<GeneralExtensionGrouping, Action, ActionConvertorData> {
     private static final Logger LOG = LoggerFactory.getLogger(SalToOfGeneralExtensionGroupingCase.class);
 
     public SalToOfGeneralExtensionGroupingCase() {
@@ -33,17 +34,19 @@ public class SalToOfGeneralExtensionGroupingCase extends ConvertorCase<GeneralEx
 
     @Nonnull
     @Override
-    public Optional<Action> process(@Nonnull final GeneralExtensionGrouping source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@Nonnull final GeneralExtensionGrouping source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         final short version = data.getVersion();
-        /**
+
+        /*
          * TODO: EXTENSION PROPOSAL (action, MD-SAL to OFJava)
          * - we might need sessionContext as converter input
          *
          */
-
         Extension extAction = source.getExtension();
-        ConverterExtensionKey<? extends ExtensionKey> key = new ConverterExtensionKey<>(source.getExtensionKey(), version);
+        ConverterExtensionKey<? extends ExtensionKey> key =
+                new ConverterExtensionKey<>(source.getExtensionKey(), version);
         ConvertorToOFJava<Action> convertor = OFSessionUtil.getExtensionConvertorProvider().getConverter(key);
         return convertor != null ? Optional.of(convertor.convert(extAction)) : Optional.empty();
     }
-}
\ No newline at end of file
+}