Further warning removal 24/94324/6
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 1 Jan 2021 13:29:20 +0000 (14:29 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 1 Jan 2021 20:51:25 +0000 (21:51 +0100)
Migrate further call sites of isFoo(), as well as various other
deprecated constructs.

Change-Id: If840e14f523eaafc596ef1a6ccd5354e19cb826f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
80 files changed:
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/OpenFlowPluginProviderImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartReplyTranslatorUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/ConnectionManagerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/PortDescMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/BuildSwitchCapabilitiesOF10.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/BuildSwitchCapabilitiesOF13.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceManagerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/match/VlanVidEntrySerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/AsyncConfigMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/FlowMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/MeterMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/PortMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestTableFeaturesSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/tablefeatures/matchfield/AbstractMatchFieldSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/role/RoleContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/rpc/RpcManagerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/AbstractMultipartService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/multilayer/MultiLayerFlowMultipartRequestOnTheFlyCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/multilayer/MultiLayerMultipartRequestCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlatBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlowsBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalGroupsBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalMetersBatchServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/singlelayer/SingleLayerFlowMultipartRequestOnTheFlyCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/singlelayer/SingleLayerFlowService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/singlelayer/SingleLayerMultipartRequestCallback.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsManagerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/GroupFeaturesService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/MeterFeaturesService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/AbstractDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/DeviceStateUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/FlowCreatorUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/GroupUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/PortTranslatorUtil.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/common/MultipartRequestInputFactoryTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/configuration/ConfigurationServiceFactoryImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/configuration/OpenFlowProviderConfigImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/VlanVidEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/FlowMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/MeterMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/PortMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMeterConfigDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyPortDescDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchFlowAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchGroupAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchMeterAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/util/RequestInputUtilsTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplParamTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/FlatBatchUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/PortTranslatorUtilTest.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/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/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/flow/FlowConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowFlagsConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowFlagsV10Convertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowStatsResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchV10ResponseConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalMplsBosCase.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/cases/OfToSalVlanVidCase.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConfigStatsResponseConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/MeterConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/TableFeaturesResponseConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/action/ActionConvertorV13Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/flow/FlowConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchConvertorTest.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchResponseConvertor2Test.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/match/MatchResponseConvertorTest.java

index b82df102aa1b3565e9032d8d6e2a9a86acb5f27e..2a8758de927c74c7907e62052b4fb5c1785452fb 100644 (file)
@@ -821,7 +821,7 @@ public class MultipartReplyMessageFactoryTest {
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 7, builtByFactory.getType().getIntValue());
-        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
         MultipartReplyGroupDescCase messageCase = (MultipartReplyGroupDescCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyGroupDesc message = messageCase.getMultipartReplyGroupDesc();
         Assert.assertEquals("Wrong type", 1, message.getGroupDesc().get(0).getType().getIntValue());
@@ -887,7 +887,7 @@ public class MultipartReplyMessageFactoryTest {
 
         BufferHelper.checkHeaderV13(builtByFactory);
         Assert.assertEquals("Wrong type", 7, builtByFactory.getType().getIntValue());
-        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+        Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().getOFPMPFREQMORE());
         MultipartReplyGroupDescCase messageCase = (MultipartReplyGroupDescCase) builtByFactory.getMultipartReplyBody();
         MultipartReplyGroupDesc message = messageCase.getMultipartReplyGroupDesc();
         Assert.assertEquals("Wrong type", 1,
index f1970937805f11559105c445e533e90177cb0a8b..0f93595c5a6c217d16bf9495d28319a1d59f016d 100644 (file)
@@ -169,7 +169,7 @@ public class OpenFlowPluginProviderImpl implements
         LOG.info("onSystemBootReady() received, starting the switch connections");
         Futures.addCallback(Futures.allAsList(switchConnectionProviders.stream().map(switchConnectionProvider -> {
             // Inject OpenFlowPlugin custom serializers and deserializers into OpenFlowJava
-            if (config.isUseSingleLayerSerialization()) {
+            if (config.getUseSingleLayerSerialization()) {
                 SerializerInjector.injectSerializers(switchConnectionProvider,
                         switchConnectionProvider.getConfiguration().isGroupAddModEnabled());
                 DeserializerInjector.injectDeserializers(switchConnectionProvider);
@@ -206,7 +206,7 @@ public class OpenFlowPluginProviderImpl implements
         final ListenableFuture<List<Boolean>> listListenableFuture =
                 Futures.allAsList(switchConnectionProviders.stream().map(switchConnectionProvider -> {
                     // Revert deserializers to their original state
-                    if (config.isUseSingleLayerSerialization()) {
+                    if (config.getUseSingleLayerSerialization()) {
                         DeserializerInjector.revertDeserializers(switchConnectionProvider);
                     }
 
index 981b2700883b625df9a365f5a598e9bd7ac939f1..ae61ff411ed8f5e52bf6617ff7660e4f48d50445 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.common;
 
 import java.util.ArrayList;
@@ -361,16 +360,16 @@ public final class MultipartReplyTranslatorUtil {
         List<Class<? extends GroupType>> supportedGroups =
             new ArrayList<>();
 
-        if (replyBody.getTypes().isOFPGTALL()) {
+        if (replyBody.getTypes().getOFPGTALL()) {
             supportedGroups.add(GroupAll.class);
         }
-        if (replyBody.getTypes().isOFPGTSELECT()) {
+        if (replyBody.getTypes().getOFPGTSELECT()) {
             supportedGroups.add(GroupSelect.class);
         }
-        if (replyBody.getTypes().isOFPGTINDIRECT()) {
+        if (replyBody.getTypes().getOFPGTINDIRECT()) {
             supportedGroups.add(GroupIndirect.class);
         }
-        if (replyBody.getTypes().isOFPGTFF()) {
+        if (replyBody.getTypes().getOFPGTFF()) {
             supportedGroups.add(GroupFf.class);
         }
         message.setGroupTypesSupported(supportedGroups);
@@ -379,16 +378,16 @@ public final class MultipartReplyTranslatorUtil {
         List<Class<? extends GroupCapability>> supportedCapabilities =
             new ArrayList<>();
 
-        if (replyBody.getCapabilities().isOFPGFCCHAINING()) {
+        if (replyBody.getCapabilities().getOFPGFCCHAINING()) {
             supportedCapabilities.add(Chaining.class);
         }
-        if (replyBody.getCapabilities().isOFPGFCCHAININGCHECKS()) {
+        if (replyBody.getCapabilities().getOFPGFCCHAININGCHECKS()) {
             supportedCapabilities.add(ChainingChecks.class);
         }
-        if (replyBody.getCapabilities().isOFPGFCSELECTLIVENESS()) {
+        if (replyBody.getCapabilities().getOFPGFCSELECTLIVENESS()) {
             supportedCapabilities.add(SelectLiveness.class);
         }
-        if (replyBody.getCapabilities().isOFPGFCSELECTWEIGHT()) {
+        if (replyBody.getCapabilities().getOFPGFCSELECTWEIGHT()) {
             supportedCapabilities.add(SelectWeight.class);
         }
 
@@ -441,29 +440,28 @@ public final class MultipartReplyTranslatorUtil {
 
         List<Class<? extends MeterCapability>> supportedCapabilities =
             new ArrayList<>();
-        if (replyBody.getCapabilities().isOFPMFBURST()) {
+        if (replyBody.getCapabilities().getOFPMFBURST()) {
             supportedCapabilities.add(MeterBurst.class);
         }
-        if (replyBody.getCapabilities().isOFPMFKBPS()) {
+        if (replyBody.getCapabilities().getOFPMFKBPS()) {
             supportedCapabilities.add(MeterKbps.class);
 
         }
-        if (replyBody.getCapabilities().isOFPMFPKTPS()) {
+        if (replyBody.getCapabilities().getOFPMFPKTPS()) {
             supportedCapabilities.add(MeterPktps.class);
 
         }
-        if (replyBody.getCapabilities().isOFPMFSTATS()) {
+        if (replyBody.getCapabilities().getOFPMFSTATS()) {
             supportedCapabilities.add(MeterStats.class);
 
         }
         message.setMeterCapabilitiesSupported(supportedCapabilities);
 
-        List<Class<? extends MeterBand>> supportedMeterBand =
-            new ArrayList<>();
-        if (replyBody.getBandTypes().isOFPMBTDROP()) {
+        List<Class<? extends MeterBand>> supportedMeterBand = new ArrayList<>();
+        if (replyBody.getBandTypes().getOFPMBTDROP()) {
             supportedMeterBand.add(MeterBandDrop.class);
         }
-        if (replyBody.getBandTypes().isOFPMBTDSCPREMARK()) {
+        if (replyBody.getBandTypes().getOFPMBTDSCPREMARK()) {
             supportedMeterBand.add(MeterBandDscpRemark.class);
         }
         message.setMeterBandSupported(supportedMeterBand);
@@ -499,10 +497,9 @@ public final class MultipartReplyTranslatorUtil {
         MultipartReplyQueueCase caseBody = (MultipartReplyQueueCase) msg.getMultipartReplyBody();
         MultipartReplyQueue replyBody = caseBody.getMultipartReplyQueue();
 
-        List<QueueIdAndStatisticsMap> statsMap =
-            new ArrayList<>();
+        List<QueueIdAndStatisticsMap> statsMap = new ArrayList<>();
 
-        for (QueueStats queueStats : replyBody.getQueueStats()) {
+        for (QueueStats queueStats : replyBody.nonnullQueueStats()) {
 
             QueueIdAndStatisticsMapBuilder statsBuilder =
                 new QueueIdAndStatisticsMapBuilder();
@@ -528,5 +525,4 @@ public final class MultipartReplyTranslatorUtil {
 
         return message.build();
     }
-
 }
index 58344301c38d105788f451d242ff15eae92efc32..336814874a2458b68da393e5359c45776b77b3c2 100644 (file)
@@ -45,11 +45,11 @@ public class ConfigurationServiceFactoryImpl implements ConfigurationServiceFact
                     .put(ConfigurationProperty.GLOBAL_NOTIFICATION_QUOTA.toString(),
                             providerConfig.getGlobalNotificationQuota().toString())
                     .put(ConfigurationProperty.SWITCH_FEATURES_MANDATORY.toString(),
-                            providerConfig.isSwitchFeaturesMandatory().toString())
+                            providerConfig.getSwitchFeaturesMandatory().toString())
                     .put(ConfigurationProperty.ENABLE_FLOW_REMOVED_NOTIFICATION.toString(),
-                            providerConfig.isEnableFlowRemovedNotification().toString())
+                            providerConfig.getEnableFlowRemovedNotification().toString())
                     .put(ConfigurationProperty.IS_STATISTICS_RPC_ENABLED.toString(),
-                            providerConfig.isIsStatisticsRpcEnabled().toString())
+                            providerConfig.getIsStatisticsRpcEnabled().toString())
                     .put(ConfigurationProperty.BARRIER_COUNT_LIMIT.toString(),
                             providerConfig.getBarrierCountLimit().getValue().toString())
                     .put(ConfigurationProperty.BARRIER_INTERVAL_TIMEOUT_LIMIT.toString(),
@@ -57,27 +57,27 @@ public class ConfigurationServiceFactoryImpl implements ConfigurationServiceFact
                     .put(ConfigurationProperty.ECHO_REPLY_TIMEOUT.toString(),
                             providerConfig.getEchoReplyTimeout().getValue().toString())
                     .put(ConfigurationProperty.IS_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsStatisticsPollingOn().toString())
+                            providerConfig.getIsStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_TABLE_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsTableStatisticsPollingOn().toString())
+                            providerConfig.getIsTableStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_FLOW_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsFlowStatisticsPollingOn().toString())
+                            providerConfig.getIsFlowStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_GROUP_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsGroupStatisticsPollingOn().toString())
+                            providerConfig.getIsGroupStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_METER_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsMeterStatisticsPollingOn().toString())
+                            providerConfig.getIsMeterStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_PORT_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsPortStatisticsPollingOn().toString())
+                            providerConfig.getIsPortStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.IS_QUEUE_STATISTICS_POLLING_ON.toString(),
-                            providerConfig.isIsQueueStatisticsPollingOn().toString())
+                            providerConfig.getIsQueueStatisticsPollingOn().toString())
                     .put(ConfigurationProperty.SKIP_TABLE_FEATURES.toString(),
-                            providerConfig.isSkipTableFeatures().toString())
+                            providerConfig.getSkipTableFeatures().toString())
                     .put(ConfigurationProperty.BASIC_TIMER_DELAY.toString(),
                             providerConfig.getBasicTimerDelay().getValue().toString())
                     .put(ConfigurationProperty.MAXIMUM_TIMER_DELAY.toString(),
                             providerConfig.getMaximumTimerDelay().getValue().toString())
                     .put(ConfigurationProperty.USE_SINGLE_LAYER_SERIALIZATION.toString(),
-                            providerConfig.isUseSingleLayerSerialization().toString())
+                            providerConfig.getUseSingleLayerSerialization().toString())
                     .put(ConfigurationProperty.THREAD_POOL_MIN_THREADS.toString(),
                             providerConfig.getThreadPoolMinThreads().toString())
                     .put(ConfigurationProperty.THREAD_POOL_MAX_THREADS.toString(),
index 90b4841674347d79e2879de408f45ab186170ba2..0f54f01a94e5c25aa7226bb0344219590386cbe3 100644 (file)
@@ -118,7 +118,7 @@ public class ConnectionManagerImpl implements ConnectionManager {
         final SystemNotificationsListener systemListener = new SystemNotificationsListenerImpl(connectionContext,
                 config.getEchoReplyTimeout().getValue().toJava(), executorService, notificationPublishService);
         connectionAdapter.setSystemListener(systemListener);
-        SslContextFactory.setIsCustomTrustManagerEnabled(config.isEnableCustomTrustManager());
+        SslContextFactory.setIsCustomTrustManagerEnabled(config.getEnableCustomTrustManager());
 
         LOG.trace("connection ballet finished");
     }
@@ -184,22 +184,22 @@ public class ConnectionManagerImpl implements ConnectionManager {
         }
 
         @Override
-        public LocalDateTime getDeviceLastConnectionTime(BigInteger nodeId) {
+        public LocalDateTime getDeviceLastConnectionTime(final BigInteger nodeId) {
             return deviceConnectionMap.get(nodeId);
         }
 
         @Override
-        public void addDeviceLastConnectionTime(BigInteger nodeId, LocalDateTime time) {
+        public void addDeviceLastConnectionTime(final BigInteger nodeId, final LocalDateTime time) {
             deviceConnectionMap.put(nodeId, time);
         }
 
         @Override
-        public void removeDeviceLastConnectionTime(BigInteger nodeId) {
+        public void removeDeviceLastConnectionTime(final BigInteger nodeId) {
             deviceConnectionMap.remove(nodeId);
         }
 
         @Override
-        public void onDataTreeChanged(@NonNull Collection<DataTreeModification<Node>> changes) {
+        public void onDataTreeChanged(@NonNull final Collection<DataTreeModification<Node>> changes) {
             Preconditions.checkNotNull(changes, "Changes must not be null!");
             for (DataTreeModification<Node> change : changes) {
                 final DataObjectModification<Node> mod = change.getRootNode();
@@ -221,7 +221,7 @@ public class ConnectionManagerImpl implements ConnectionManager {
             return InstanceIdentifier.create(Nodes.class).child(Node.class);
         }
 
-        private void processNodeModification(DataTreeModification<Node> change) {
+        private void processNodeModification(final DataTreeModification<Node> change) {
             final InstanceIdentifier<Node> key = change.getRootPath().getRootIdentifier();
             final InstanceIdentifier<Node> nodeIdent = key.firstIdentifierOf(Node.class);
             String[] nodeIdentity = nodeIdent.firstKeyOf(Node.class).getId().getValue().split(":");
index 2ff312dfb80653b60c6b65b59bb0a0bf1ea7d55d..f00ee679271efc50ce3897c492f20238a79ec782 100644 (file)
@@ -55,7 +55,7 @@ public class PortDescMultipartWriter extends AbstractMultipartWriter<MultipartRe
                         OpenflowVersion.get(features.getVersion()));
                 OF_EVENT_LOG.debug("Node Connector Status, Node: {}, PortNumber: {}, PortName: {}, Status: {}",
                         features.getDatapathId(), portNumber, stat.getName(),
-                        stat.getConfiguration().isPORTDOWN() ? "Down" : "Up");
+                        stat.getConfiguration().getPORTDOWN() ? "Down" : "Up");
 
                 writeToTransaction(
                     getInstanceIdentifier()
index 745a3a7c664a9101cd4653716c1d45bd3ac7e4a8..aeeb684a2c86db7beebaf7873218319b79551b2e 100644 (file)
@@ -27,10 +27,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * SwitchFeature builder for OF 1.0.
  */
 public final class BuildSwitchCapabilitiesOF10 implements BuildSwitchFeatures {
-
-    private static BuildSwitchCapabilitiesOF10 instance = new BuildSwitchCapabilitiesOF10();
+    private static final BuildSwitchCapabilitiesOF10 INSTANCE = new BuildSwitchCapabilitiesOF10();
 
     private BuildSwitchCapabilitiesOF10() {
+        // Hidden on purpose
     }
 
     /**
@@ -39,47 +39,41 @@ public final class BuildSwitchCapabilitiesOF10 implements BuildSwitchFeatures {
      * @return instance
      */
     public static BuildSwitchCapabilitiesOF10 getInstance() {
-        return instance;
+        return INSTANCE;
     }
 
     @Override
-    public SwitchFeatures build(GetFeaturesOutput features) {
-
-        SwitchFeaturesBuilder builderSwFeatures = new SwitchFeaturesBuilder();
-        builderSwFeatures.setMaxBuffers(features.getBuffers());
-        builderSwFeatures.setMaxTables(features.getTables());
-
+    public SwitchFeatures build(final GetFeaturesOutput features) {
         List<Class<? extends FeatureCapability>> capabilities = new ArrayList<>();
-
-        if (features.getCapabilitiesV10().isOFPCARPMATCHIP()) {
+        if (features.getCapabilitiesV10().getOFPCARPMATCHIP()) {
             capabilities.add(FlowFeatureCapabilityArpMatchIp.class);
         }
-        if (features.getCapabilitiesV10().isOFPCFLOWSTATS()) {
+        if (features.getCapabilitiesV10().getOFPCFLOWSTATS()) {
             capabilities.add(FlowFeatureCapabilityFlowStats.class);
         }
-        if (features.getCapabilitiesV10().isOFPCIPREASM()) {
+        if (features.getCapabilitiesV10().getOFPCIPREASM()) {
             capabilities.add(FlowFeatureCapabilityIpReasm.class);
         }
-        if (features.getCapabilitiesV10().isOFPCPORTSTATS()) {
+        if (features.getCapabilitiesV10().getOFPCPORTSTATS()) {
             capabilities.add(FlowFeatureCapabilityPortStats.class);
         }
-        if (features.getCapabilitiesV10().isOFPCQUEUESTATS()) {
+        if (features.getCapabilitiesV10().getOFPCQUEUESTATS()) {
             capabilities.add(FlowFeatureCapabilityQueueStats.class);
         }
-        if (features.getCapabilitiesV10().isOFPCRESERVED()) {
+        if (features.getCapabilitiesV10().getOFPCRESERVED()) {
             capabilities.add(FlowFeatureCapabilityReserved.class);
         }
-        if (features.getCapabilitiesV10().isOFPCSTP()) {
+        if (features.getCapabilitiesV10().getOFPCSTP()) {
             capabilities.add(FlowFeatureCapabilityStp.class);
         }
-        if (features.getCapabilitiesV10().isOFPCTABLESTATS()) {
+        if (features.getCapabilitiesV10().getOFPCTABLESTATS()) {
             capabilities.add(FlowFeatureCapabilityTableStats.class);
         }
 
-        builderSwFeatures.setCapabilities(capabilities);
-
-        return builderSwFeatures.build();
+        return new SwitchFeaturesBuilder()
+            .setMaxBuffers(features.getBuffers())
+            .setMaxTables(features.getTables())
+            .setCapabilities(capabilities)
+            .build();
     }
-
-
 }
index 8d3eb9daaeeaf966744496abc4ff4b2511fa33a0..c7c370523c62ee8e2815a285b437947817b92443 100644 (file)
@@ -26,10 +26,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * SwitchFeature builder for OF 1.3.
  */
 public final class BuildSwitchCapabilitiesOF13 implements BuildSwitchFeatures {
-
-    private static BuildSwitchCapabilitiesOF13 instance = new BuildSwitchCapabilitiesOF13();
+    private static final BuildSwitchCapabilitiesOF13 INSTANCE = new BuildSwitchCapabilitiesOF13();
 
     private BuildSwitchCapabilitiesOF13() {
+        // Hidden on purpose
     }
 
     /**
@@ -38,43 +38,38 @@ public final class BuildSwitchCapabilitiesOF13 implements BuildSwitchFeatures {
      * @return instance
      */
     public static BuildSwitchCapabilitiesOF13 getInstance() {
-        return instance;
+        return INSTANCE;
     }
 
     @Override
-    public SwitchFeatures build(GetFeaturesOutput features) {
-
-        SwitchFeaturesBuilder builderSwFeatures = new SwitchFeaturesBuilder();
-        builderSwFeatures.setMaxBuffers(features.getBuffers());
-        builderSwFeatures.setMaxTables(features.getTables());
-
+    public SwitchFeatures build(final GetFeaturesOutput features) {
         List<Class<? extends FeatureCapability>> capabilities = new ArrayList<>();
-
-        if (features.getCapabilities().isOFPCFLOWSTATS()) {
+        if (features.getCapabilities().getOFPCFLOWSTATS()) {
             capabilities.add(FlowFeatureCapabilityFlowStats.class);
         }
-        if (features.getCapabilities().isOFPCGROUPSTATS()) {
+        if (features.getCapabilities().getOFPCGROUPSTATS()) {
             capabilities.add(FlowFeatureCapabilityGroupStats.class);
         }
-        if (features.getCapabilities().isOFPCIPREASM()) {
+        if (features.getCapabilities().getOFPCIPREASM()) {
             capabilities.add(FlowFeatureCapabilityIpReasm.class);
         }
-        if (features.getCapabilities().isOFPCPORTBLOCKED()) {
+        if (features.getCapabilities().getOFPCPORTBLOCKED()) {
             capabilities.add(FlowFeatureCapabilityPortBlocked.class);
         }
-        if (features.getCapabilities().isOFPCPORTSTATS()) {
+        if (features.getCapabilities().getOFPCPORTSTATS()) {
             capabilities.add(FlowFeatureCapabilityPortStats.class);
         }
-        if (features.getCapabilities().isOFPCQUEUESTATS()) {
+        if (features.getCapabilities().getOFPCQUEUESTATS()) {
             capabilities.add(FlowFeatureCapabilityQueueStats.class);
         }
-        if (features.getCapabilities().isOFPCTABLESTATS()) {
+        if (features.getCapabilities().getOFPCTABLESTATS()) {
             capabilities.add(FlowFeatureCapabilityTableStats.class);
         }
 
-        builderSwFeatures.setCapabilities(capabilities);
-
-        return builderSwFeatures.build();
+        return new SwitchFeaturesBuilder()
+            .setMaxBuffers(features.getBuffers())
+            .setMaxTables(features.getTables())
+            .setCapabilities(capabilities)
+            .build();
     }
-
 }
index ab75ce3b82106dc81d74d33dbf25526997f14007..e0b0edbb91c2d104d1f9a4b222e917d7150abd4d 100644 (file)
@@ -89,7 +89,7 @@ public class DeviceManagerImpl implements DeviceManager, ExtensionConverterProvi
         this.messageSpy = messageSpy;
         DeviceInitializationUtil.makeEmptyNodes(dataBroker);
         this.queuedNotificationManager =  QueuedNotificationManager.create(executorService, (key, entries) -> {
-            entries.forEach(jobEntry -> jobEntry.run());
+            entries.forEach(Runnable::run);
         }, 2048, "port-status-queue");
     }
 
@@ -164,15 +164,15 @@ public class DeviceManagerImpl implements DeviceManager, ExtensionConverterProvi
                 messageSpy,
                 translatorLibrary,
                 convertorExecutor,
-                config.isSkipTableFeatures(),
+                config.getSkipTableFeatures(),
                 hashedWheelTimer,
-                config.isUseSingleLayerSerialization(),
+                config.getUseSingleLayerSerialization(),
                 deviceInitializerProvider,
-                config.isEnableFlowRemovedNotification(),
-                config.isSwitchFeaturesMandatory(),
+                config.getEnableFlowRemovedNotification(),
+                config.getSwitchFeaturesMandatory(),
                 contextChainHolder,
                 queuedNotificationManager,
-                config.isIsStatisticsPollingOn());
+                config.getIsStatisticsPollingOn());
         ((ExtensionConverterProviderKeeper) deviceContext).setExtensionConverterProvider(extensionConverterProvider);
         deviceContext.setNotificationPublishService(notificationPublishService);
 
index ed2f8df64e76bec7e82c1fee843695b63e0ae85d..dd5c754cdde1fb30da57882198e643268fe83bd2 100644 (file)
@@ -22,25 +22,25 @@ public class VlanVidEntrySerializer extends AbstractMatchEntrySerializer<VlanId,
     }
 
     @Override
-    protected VlanId extractEntry(Match match) {
+    protected VlanId extractEntry(final Match match) {
         final VlanMatch vlanMatch = match.getVlanMatch();
         return vlanMatch == null ? null : vlanMatch.getVlanId();
     }
 
     @Override
-    protected Empty extractEntryMask(VlanId entry) {
-        return Boolean.TRUE.equals(entry.isVlanIdPresent())
+    protected Empty extractEntryMask(final VlanId entry) {
+        return Boolean.TRUE.equals(entry.getVlanIdPresent())
                 && (entry.getVlanId() == null || entry.getVlanId().getValue().shortValue() == 0) ? Empty.getInstance()
                         : null;
     }
 
     @Override
-    protected void serializeEntry(VlanId entry, Empty mask, ByteBuf outBuffer) {
+    protected void serializeEntry(final VlanId entry, final Empty mask, final ByteBuf outBuffer) {
         final org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanId = entry.getVlanId();
 
         int vlanVidValue = vlanId != null ? vlanId.getValue().toJava() : 0;
 
-        if (Boolean.TRUE.equals(entry.isVlanIdPresent())) {
+        if (Boolean.TRUE.equals(entry.getVlanIdPresent())) {
             short cfi = 1 << 12;
             vlanVidValue = vlanVidValue | cfi;
         }
index 66ad1ee613fe4ee44d28ba8fef4f842ea8bfc2d0..524ccff4c320f764a229976f779f18340196e5f1 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 
 public class AsyncConfigMessageSerializer extends AbstractMessageSerializer<AsyncConfigMessage> {
     @Override
-    public void serialize(AsyncConfigMessage message, ByteBuf outBuffer) {
+    public void serialize(final AsyncConfigMessage message, final ByteBuf outBuffer) {
         final int index = outBuffer.writerIndex();
         super.serialize(message, outBuffer);
 
@@ -59,15 +59,15 @@ public class AsyncConfigMessageSerializer extends AbstractMessageSerializer<Asyn
 
         final Map<Integer, Boolean> map = new WeakHashMap<>();
 
-        if (mask.isNOMATCH()) {
+        if (mask.getNOMATCH()) {
             map.put(PacketInReason.OFPRNOMATCH.getIntValue(), true);
         }
 
-        if (mask.isACTION()) {
+        if (mask.getACTION()) {
             map.put(PacketInReason.OFPRACTION.getIntValue(), true);
         }
 
-        if (mask.isINVALIDTTL()) {
+        if (mask.getINVALIDTTL()) {
             map.put(PacketInReason.OFPRINVALIDTTL.getIntValue(), true);
         }
 
@@ -81,15 +81,15 @@ public class AsyncConfigMessageSerializer extends AbstractMessageSerializer<Asyn
 
         final Map<Integer, Boolean> map = new WeakHashMap<>();
 
-        if (mask.isADD()) {
+        if (mask.getADD()) {
             map.put(PortReason.OFPPRADD.getIntValue(), true);
         }
 
-        if (mask.isDELETE()) {
+        if (mask.getDELETE()) {
             map.put(PortReason.OFPPRDELETE.getIntValue(), true);
         }
 
-        if (mask.isUPDATE()) {
+        if (mask.getUPDATE()) {
             map.put(PortReason.OFPPRMODIFY.getIntValue(), true);
         }
 
@@ -103,19 +103,19 @@ public class AsyncConfigMessageSerializer extends AbstractMessageSerializer<Asyn
 
         final Map<Integer, Boolean> map = new WeakHashMap<>();
 
-        if (mask.isIDLETIMEOUT()) {
+        if (mask.getIDLETIMEOUT()) {
             map.put(FlowRemovedReason.OFPRRIDLETIMEOUT.getIntValue(), true);
         }
 
-        if (mask.isHARDTIMEOUT()) {
+        if (mask.getHARDTIMEOUT()) {
             map.put(FlowRemovedReason.OFPRRHARDTIMEOUT.getIntValue(), true);
         }
 
-        if (mask.isDELETE()) {
+        if (mask.getDELETE()) {
             map.put(FlowRemovedReason.OFPRRDELETE.getIntValue(), true);
         }
 
-        if (mask.isGROUPDELETE()) {
+        if (mask.getGROUPDELETE()) {
             map.put(FlowRemovedReason.OFPRRGROUPDELETE.getIntValue(), true);
         }
 
index b1820141d89b535aa6ac6ab607c80bbb2f64b610..71df1fd4a2d2cbd3b2e6c64cb204fe60d81d0c20 100644 (file)
@@ -211,14 +211,12 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
      */
     private static Optional<Instruction> updateInstruction(final Instruction instruction, final Uint8 protocol) {
         if (instruction instanceof ApplyActionsCase) {
-            return Optional
-                    .ofNullable(((ApplyActionsCase) instruction).getApplyActions())
+            // FIXME: get rid of this atrocity and just use null checks
+            return Optional.ofNullable(((ApplyActionsCase) instruction).getApplyActions())
                     .flatMap(aa -> Optional.ofNullable(aa.nonnullAction()))
                     .map(as -> new ApplyActionsCaseBuilder()
                             .setApplyActions(new ApplyActionsBuilder()
-                                    .setAction(as
-                                            .values()
-                                            .stream()
+                                    .setAction(as.values().stream()
                                             .filter(Objects::nonNull)
                                             .map(a -> updateSetTpActions(a, protocol))
                                             .collect(Collectors.toList()))
@@ -282,8 +280,8 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
                     final int[] offset = {0};
 
                     return i.getInstruction() instanceof ApplyActionsCase
-                            ? Optional
-                            .ofNullable(((ApplyActionsCase) i.getInstruction()).getApplyActions())
+                            // FIXME: get rid of this atrocity and just use null checks
+                            ? Optional.ofNullable(((ApplyActionsCase) i.getInstruction()).getApplyActions())
                             .flatMap(as -> Optional.ofNullable(as.nonnullAction()))
                             .map(a -> a.values().stream()
                                     .sorted(OrderComparator.build())
@@ -342,11 +340,11 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
      */
     private static int createFlowModFlagsBitmask(final FlowModFlags flags) {
         return ByteBufUtils.fillBitMask(0,
-                flags.isSENDFLOWREM(),
-                flags.isCHECKOVERLAP(),
-                flags.isRESETCOUNTS(),
-                flags.isNOPKTCOUNTS(),
-                flags.isNOBYTCOUNTS());
+                flags.getSENDFLOWREM(),
+                flags.getCHECKOVERLAP(),
+                flags.getRESETCOUNTS(),
+                flags.getNOPKTCOUNTS(),
+                flags.getNOBYTCOUNTS());
     }
 
     /**
@@ -356,8 +354,8 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
      * @return true if flow contains vlan match
      */
     private static boolean isVlanMatchPresent(final Flow flow) {
-        return Optional
-                .ofNullable(flow.getMatch())
+        // FIXME: get rid of this atrocity and just use null checks
+        return Optional.ofNullable(flow.getMatch())
                 .flatMap(m -> Optional.ofNullable(m.getVlanMatch()))
                 .isPresent();
     }
@@ -373,8 +371,8 @@ public class FlowMessageSerializer extends AbstractMessageSerializer<FlowMessage
      * @return true if flow contains SetVlanIdAction
      */
     private static boolean isSetVlanIdActionCasePresent(final Flow flow) {
-        return Optional
-                .ofNullable(flow.getInstructions())
+        // FIXME: get rid of this atrocity and just use null checks
+        return Optional.ofNullable(flow.getInstructions())
                 .flatMap(is -> Optional.ofNullable(is.nonnullInstruction()))
                 .flatMap(is -> is.values().stream()
                         .map(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types
index 8b440169022d68170dbd02324702caaa9b5e299f..6e908fc21bcfd6e89708f205ca245f469466b457 100644 (file)
@@ -59,10 +59,11 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
     private void serializeBands(final MeterBandHeaders meterBandHeaders, final ByteBuf outBuffer) {
         if (meterBandHeaders != null && meterBandHeaders.getMeterBandHeader() != null) {
             meterBandHeaders.nonnullMeterBandHeader().values().forEach(meterBandHeader ->
+                    // FIXME: get rid of this atrocity and just use a null check
                     Optional.ofNullable(meterBandHeader.getMeterBandTypes())
                             .flatMap(m -> Optional.ofNullable(m.getFlags()))
                             .ifPresent(flags -> Optional.ofNullable(meterBandHeader.getBandType()).ifPresent(type -> {
-                                if (flags.isOfpmbtDrop()) {
+                                if (flags.getOfpmbtDrop()) {
                                     final Drop band = (Drop) type;
                                     outBuffer.writeShort(MeterBandType.OFPMBTDROP.getIntValue());
 
@@ -70,7 +71,7 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
                                     outBuffer.writeInt(band.getDropRate().intValue());
                                     outBuffer.writeInt(band.getDropBurstSize().intValue());
                                     outBuffer.writeZero(PADDING_IN_METER_BAND_DROP);
-                                } else if (flags.isOfpmbtDscpRemark()) {
+                                } else if (flags.getOfpmbtDscpRemark()) {
                                     final DscpRemark band = (DscpRemark) type;
                                     outBuffer.writeShort(MeterBandType.OFPMBTDSCPREMARK.getIntValue());
 
@@ -79,7 +80,7 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
                                     outBuffer.writeInt(band.getDscpRemarkBurstSize().intValue());
                                     outBuffer.writeByte(band.getPrecLevel().toJava());
                                     outBuffer.writeZero(PADDING_IN_METER_BAND_DSCP_REMARK);
-                                } else if (flags.isOfpmbtExperimenter()) {
+                                } else if (flags.getOfpmbtExperimenter()) {
                                     final Experimenter band = (Experimenter) type;
 
                                     // TODO: finish experimenter serialization
@@ -107,9 +108,9 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
 
     private static int createMeterFlagsBitMask(final MeterFlags flags) {
         return ByteBufUtils.fillBitMask(0,
-                flags.isMeterKbps(),
-                flags.isMeterPktps(),
-                flags.isMeterBurst(),
-                flags.isMeterStats());
+                flags.getMeterKbps(),
+                flags.getMeterPktps(),
+                flags.getMeterBurst(),
+                flags.getMeterStats());
     }
 }
index ffcf596f0d4420abac00156167704e6211fd0ab2..2928bf38ce7bc52d9e07b3e7ddf0db671cd47383 100644 (file)
@@ -55,31 +55,30 @@ public class PortMessageSerializer extends AbstractMessageSerializer<PortMessage
     private static Integer createPortConfigBitMask(final PortConfig config) {
         return config == null ? null : ByteBufUtils.fillBitMaskFromMap(ImmutableMap
                 .<Integer, Boolean>builder()
-                .put(0, config.isPORTDOWN())
-                .put(2, config.isNORECV())
-                .put(5, config.isNOFWD())
-                .put(6, config.isNOPACKETIN())
+                .put(0, config.getPORTDOWN())
+                .put(2, config.getNORECV())
+                .put(5, config.getNOFWD())
+                .put(6, config.getNOPACKETIN())
                 .build());
     }
 
     private static int createPortFeaturesBitMask(final PortFeatures feature) {
         return ByteBufUtils.fillBitMask(0,
-                feature.isTenMbHd(),
-                feature.isTenMbFd(),
-                feature.isHundredMbHd(),
-                feature.isHundredMbFd(),
-                feature.isOneGbHd(),
-                feature.isOneGbFd(),
-                feature.isTenGbFd(),
-                feature.isFortyGbFd(),
-                feature.isHundredGbFd(),
-                feature.isOneTbFd(),
-                feature.isOther(),
-                feature.isCopper(),
-                feature.isFiber(),
-                feature.isAutoeng(),
-                feature.isPause(),
-                feature.isPauseAsym());
+                feature.getTenMbHd(),
+                feature.getTenMbFd(),
+                feature.getHundredMbHd(),
+                feature.getHundredMbFd(),
+                feature.getOneGbHd(),
+                feature.getOneGbFd(),
+                feature.getTenGbFd(),
+                feature.getFortyGbFd(),
+                feature.getHundredGbFd(),
+                feature.getOneTbFd(),
+                feature.getOther(),
+                feature.getCopper(),
+                feature.getFiber(),
+                feature.getAutoeng(),
+                feature.getPause(),
+                feature.getPauseAsym());
     }
-
 }
index 2263ae2be0b5c33406312b118bdb0cac8aee30bd..5a54984526a234295a7a4489d69f56a508e3c0b9 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.serialization.multipart;
 
 import com.google.common.base.Preconditions;
@@ -50,7 +49,7 @@ public class MultipartRequestMessageSerializer extends AbstractMessageSerializer
         final int index = outBuffer.writerIndex();
         super.serialize(message, outBuffer);
         outBuffer.writeShort(multipartType.getIntValue());
-        outBuffer.writeShort(ByteBufUtils.fillBitMask(0, message.isRequestMore()));
+        outBuffer.writeShort(ByteBufUtils.fillBitMask(0, message.getRequestMore()));
         outBuffer.writeZero(PADDING_IN_MULTIPART_REQUEST_MESSAGE);
 
         final OFSerializer<MultipartRequestBody> serializer = Preconditions.checkNotNull(registry)
@@ -98,5 +97,4 @@ public class MultipartRequestMessageSerializer extends AbstractMessageSerializer
     public void injectSerializerRegistry(final SerializerRegistry serializerRegistry) {
         registry = serializerRegistry;
     }
-
 }
index 66b4c50322f663e9130a37d46238b22a4cab8132..7b1a8d8a4f63365e736d760ca8e7e772cd0fe989 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.serialization.multipart;
 
 import com.google.common.base.Preconditions;
@@ -45,7 +44,7 @@ public class MultipartRequestTableFeaturesSerializer implements OFSerializer<Mul
                     byteBuf.writeZero(32 - tableFeature.getName().getBytes(StandardCharsets.UTF_8).length);
                     byteBuf.writeLong(tableFeature.getMetadataMatch().longValue());
                     byteBuf.writeLong(tableFeature.getMetadataWrite().longValue());
-                    byteBuf.writeInt(ByteBufUtils.fillBitMask(0, tableFeature.getConfig().isDEPRECATEDMASK()));
+                    byteBuf.writeInt(ByteBufUtils.fillBitMask(0, tableFeature.getConfig().getDEPRECATEDMASK()));
                     byteBuf.writeInt(tableFeature.getMaxEntries().intValue());
                     serializeProperties(tableFeature.getTableProperties(), byteBuf);
                     byteBuf.setShort(featureIndex, byteBuf.writerIndex() - featureIndex);
index 45cf8d6fe22a8581dc8cbcd0b93c6b4b754dcdf5..69163f36180831037eff3f9f8775fb61cfc4695e 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures.matchfield;
 
 import io.netty.buffer.ByteBuf;
@@ -21,7 +20,7 @@ public abstract class AbstractMatchFieldSerializer implements OFSerializer<SetFi
         int fieldAndMask = getOxmFieldCode() << 1;
         int length = getValueLength();
 
-        if (setFieldMatch.isHasMask()) {
+        if (setFieldMatch.getHasMask()) {
             fieldAndMask |= 1;
             length *= 2;
         }
@@ -35,5 +34,4 @@ public abstract class AbstractMatchFieldSerializer implements OFSerializer<SetFi
     protected abstract int getOxmFieldCode();
 
     protected abstract int getValueLength();
-
 }
index 63062ab2e1d5d68a8042ebc549d1754c19bf1bf1..097fa8cf58d0d43b0266ef30f669073ee8d32b03 100644 (file)
@@ -66,7 +66,7 @@ public class RoleContextImpl implements RoleContext {
         this.timer = timer;
         this.config = config;
         this.executorService = executorService;
-        slaveTask = timer.newTimeout((timerTask) -> makeDeviceSlave(), checkRoleMasterTimeout, TimeUnit.MILLISECONDS);
+        slaveTask = timer.newTimeout(timerTask -> makeDeviceSlave(), checkRoleMasterTimeout, TimeUnit.MILLISECONDS);
 
         LOG.info("Started timer for setting SLAVE role on device {} if no role will be set in {}s.",
                 deviceInfo,
@@ -147,7 +147,7 @@ public class RoleContextImpl implements RoleContext {
     }
 
     private ListenableFuture<RpcResult<SetRoleOutput>> sendRoleChangeToDevice(final OfpRole newRole) {
-        final Boolean isEqualRole = config.isEnableEqualRole();
+        final Boolean isEqualRole = config.getEnableEqualRole();
         if (isEqualRole) {
             LOG.warn("Skip sending role change request to device {} as user enabled"
                     + " equal role for controller", deviceInfo);
index 817bc7ae85a95a992bc9a34141a0e460167867f9..a8576bd31676a61433d62fcdca2da9f3525a29a5 100644 (file)
@@ -78,7 +78,7 @@ public class RpcManagerImpl implements RpcManager {
                 extensionConverterProvider,
                 convertorExecutor,
                 notificationPublishService,
-                config.isIsStatisticsRpcEnabled(),
+                config.getIsStatisticsRpcEnabled(),
                 flowGroupCacheManager);
 
         contexts.put(deviceContext.getDeviceInfo(), rpcContext);
index 6e38acb771c4ff5b3724d856bdb6851be63b9455..d29fbbf9708545ce26341df94529c886df76d136 100644 (file)
@@ -22,9 +22,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 public abstract class AbstractMultipartService<I, T extends OfHeader> extends AbstractService<I, List<T>> {
-
     private static final Function<OfHeader, Boolean> ALTERNATE_IS_COMPLETE = message ->
-        !(message instanceof MultipartReply) || !((MultipartReply) message).isRequestMore();
+        !(message instanceof MultipartReply) || !((MultipartReply) message).getRequestMore();
 
     protected AbstractMultipartService(final RequestContextStack requestContextStack,
                                        final DeviceContext deviceContext) {
@@ -32,7 +31,8 @@ public abstract class AbstractMultipartService<I, T extends OfHeader> extends Ab
     }
 
     @Override
-    protected FutureCallback<OfHeader> createCallback(RequestContext<List<T>> context, Class<?> requestType) {
+    protected FutureCallback<OfHeader> createCallback(final RequestContext<List<T>> context,
+            final Class<?> requestType) {
         return canUseSingleLayerSerialization()
             ? new SingleLayerMultipartRequestCallback<>(context, requestType, getDeviceContext(), getEventIdentifier())
             : new MultiLayerMultipartRequestCallback<>(context, requestType, getDeviceContext(), getEventIdentifier());
@@ -44,5 +44,4 @@ public abstract class AbstractMultipartService<I, T extends OfHeader> extends Ab
             ? super.handleServiceCall(input, ALTERNATE_IS_COMPLETE)
             : super.handleServiceCall(input);
     }
-
 }
index 75b3790a52fe53cfffe5cd98e5032fad6cd7bab0..9fb581ab80c86e08854a587ecb34f665353b29e6 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.multilayer;
 
 import java.util.List;
@@ -32,14 +31,14 @@ public class MultiLayerFlowMultipartRequestOnTheFlyCallback<T extends OfHeader>
     }
 
     @Override
-    protected boolean isMultipart(OfHeader result) {
+    protected boolean isMultipart(final OfHeader result) {
         return result instanceof MultipartReply
             && ((MultipartReply) result).getType().equals(getMultipartType());
     }
 
     @Override
-    protected boolean isReqMore(T result) {
-        return ((MultipartReply) result).getFlags().isOFPMPFREQMORE();
+    protected boolean isReqMore(final T result) {
+        return ((MultipartReply) result).getFlags().getOFPMPFREQMORE();
     }
 
     @Override
index 9a3a81fbb0a02ebf4a84eff7cdb053c6017931af..c0c81db75a7f9a07a9e37bbeefead35e00c1da99 100644 (file)
@@ -18,20 +18,20 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 
 public class MultiLayerMultipartRequestCallback<T extends OfHeader> extends AbstractMultipartRequestCallback<T> {
 
-    public MultiLayerMultipartRequestCallback(RequestContext<List<T>> context, Class<?> requestType,
-                                              DeviceContext deviceContext,
-                                              EventIdentifier eventIdentifier) {
+    public MultiLayerMultipartRequestCallback(final RequestContext<List<T>> context, final Class<?> requestType,
+                                              final DeviceContext deviceContext,
+                                              final EventIdentifier eventIdentifier) {
         super(context, requestType, deviceContext, eventIdentifier);
     }
 
     @Override
-    protected boolean isMultipart(OfHeader result) {
+    protected boolean isMultipart(final OfHeader result) {
         return result instanceof MultipartReply;
     }
 
     @Override
-    protected boolean isReqMore(T result) {
+    protected boolean isReqMore(final T result) {
         final MultipartRequestFlags flags = ((MultipartReply) result).getFlags();
-        return flags != null && flags.isOFPMPFREQMORE();
+        return flags != null && flags.getOFPMPFREQMORE();
     }
 }
index f61665e406417763c93ed2018c6a6e62ec8be7a2..ac03024aa58576ea55d7666dfa1df8879478357a 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -83,7 +82,7 @@ public class SalFlatBatchServiceImpl implements SalFlatBatchService {
         FlatBatchUtil.markBarriersWhereNeeded(batchPlan);
         // prepare chain elements
         final List<BatchStepJob> batchChainElements =
-                prepareBatchChain(batchPlan, input.getNode(), input.isExitOnFirstError());
+                prepareBatchChain(batchPlan, input.getNode(), input.getExitOnFirstError());
         // execute plan with barriers and collect outputs chain correspondingly, collect results
         return executeBatchPlan(batchChainElements);
     }
index 40245358f9c699cbab511fa87b06edc919d549ce..74c5f3613edf366f8b450bb122ce2132df8794ba 100644 (file)
@@ -86,7 +86,7 @@ public class SalFlowsBatchServiceImpl implements SalFlowsBatchService {
         ListenableFuture<RpcResult<RemoveFlowsBatchOutput>> removeFlowsBulkFuture =
                 Futures.transform(commonResult, FlowUtil.FLOW_REMOVE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             removeFlowsBulkFuture = BarrierUtil.chainBarrier(removeFlowsBulkFuture, input.getNode(),
                     transactionService, FlowUtil.FLOW_REMOVE_COMPOSING_TRANSFORM);
         }
@@ -114,7 +114,7 @@ public class SalFlowsBatchServiceImpl implements SalFlowsBatchService {
         ListenableFuture<RpcResult<AddFlowsBatchOutput>> addFlowsBulkFuture =
                 Futures.transform(commonResult, FlowUtil.FLOW_ADD_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             addFlowsBulkFuture = BarrierUtil.chainBarrier(addFlowsBulkFuture, input.getNode(),
                     transactionService, FlowUtil.FLOW_ADD_COMPOSING_TRANSFORM);
         }
@@ -156,7 +156,7 @@ public class SalFlowsBatchServiceImpl implements SalFlowsBatchService {
         ListenableFuture<RpcResult<UpdateFlowsBatchOutput>> updateFlowsBulkFuture =
                 Futures.transform(commonResult, FlowUtil.FLOW_UPDATE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             updateFlowsBulkFuture = BarrierUtil.chainBarrier(updateFlowsBulkFuture, input.getNode(),
                     transactionService, FlowUtil.FLOW_UPDATE_COMPOSING_TRANSFORM);
         }
index 7cf3c4dc0e7ca21884bc51e0dc2dc583b1db6c73..108c13940eb612206d3523e43893453b6c2c72d0 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import com.google.common.base.Preconditions;
@@ -93,7 +92,7 @@ public class SalGroupsBatchServiceImpl implements SalGroupsBatchService {
         ListenableFuture<RpcResult<UpdateGroupsBatchOutput>> updateGroupsBulkFuture = Futures
                 .transform(commonResult, GroupUtil.GROUP_UPDATE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             updateGroupsBulkFuture = BarrierUtil
                     .chainBarrier(updateGroupsBulkFuture, input.getNode(), transactionService,
                                   GroupUtil.GROUP_UPDATE_COMPOSING_TRANSFORM);
@@ -120,7 +119,7 @@ public class SalGroupsBatchServiceImpl implements SalGroupsBatchService {
         ListenableFuture<RpcResult<AddGroupsBatchOutput>> addGroupsBulkFuture = Futures
                 .transform(commonResult, GroupUtil.GROUP_ADD_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             addGroupsBulkFuture = BarrierUtil.chainBarrier(addGroupsBulkFuture, input.getNode(), transactionService,
                                                            GroupUtil.GROUP_ADD_COMPOSING_TRANSFORM);
         }
@@ -147,7 +146,7 @@ public class SalGroupsBatchServiceImpl implements SalGroupsBatchService {
         ListenableFuture<RpcResult<RemoveGroupsBatchOutput>> removeGroupsBulkFuture = Futures
                 .transform(commonResult, GroupUtil.GROUP_REMOVE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             removeGroupsBulkFuture = BarrierUtil
                     .chainBarrier(removeGroupsBulkFuture, input.getNode(), transactionService,
                                   GroupUtil.GROUP_REMOVE_COMPOSING_TRANSFORM);
index 174cb4db7739d845fe2b0dab5f88c225faec4130..fa27cd8f5698400a29d6c040a3f4a237b4cf8551 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import com.google.common.base.Preconditions;
@@ -96,7 +95,7 @@ public class SalMetersBatchServiceImpl implements SalMetersBatchService {
         ListenableFuture<RpcResult<UpdateMetersBatchOutput>> updateMetersBulkFuture =
                 Futures.transform(commonResult, MeterUtil.METER_UPDATE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             updateMetersBulkFuture = BarrierUtil.chainBarrier(updateMetersBulkFuture, input.getNode(),
                     transactionService, MeterUtil.METER_UPDATE_COMPOSING_TRANSFORM);
         }
@@ -124,7 +123,7 @@ public class SalMetersBatchServiceImpl implements SalMetersBatchService {
         ListenableFuture<RpcResult<AddMetersBatchOutput>> addMetersBulkFuture =
                 Futures.transform(commonResult, MeterUtil.METER_ADD_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             addMetersBulkFuture = BarrierUtil.chainBarrier(addMetersBulkFuture, input.getNode(),
                     transactionService, MeterUtil.METER_ADD_COMPOSING_TRANSFORM);
         }
@@ -154,7 +153,7 @@ public class SalMetersBatchServiceImpl implements SalMetersBatchService {
         ListenableFuture<RpcResult<RemoveMetersBatchOutput>> removeMetersBulkFuture =
                 Futures.transform(commonResult, MeterUtil.METER_REMOVE_TRANSFORM, MoreExecutors.directExecutor());
 
-        if (input.isBarrierAfter()) {
+        if (input.getBarrierAfter()) {
             removeMetersBulkFuture = BarrierUtil.chainBarrier(removeMetersBulkFuture, input.getNode(),
                     transactionService, MeterUtil.METER_REMOVE_COMPOSING_TRANSFORM);
         }
index 49c4eaca16337e10513e0555adf8f9e76dadf42e..c094f849b1fe8d8cd1f61e739e8c41f87977eb08 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.singlelayer;
 
 import java.util.List;
@@ -31,14 +30,14 @@ public class SingleLayerFlowMultipartRequestOnTheFlyCallback<T extends OfHeader>
     }
 
     @Override
-    protected boolean isMultipart(OfHeader result) {
+    protected boolean isMultipart(final OfHeader result) {
         return result instanceof MultipartReply
             && ((MultipartReply) result).getMultipartReplyBody() instanceof MultipartReplyFlowStats;
     }
 
     @Override
-    protected boolean isReqMore(T result) {
-        return ((MultipartReply) result).isRequestMore();
+    protected boolean isReqMore(final T result) {
+        return ((MultipartReply) result).getRequestMore();
     }
 
     @Override
index ee121eeee4d589af9eb0ecd349e4f0ce71040921..66201cb589d200373a9225a4abc686ae660e8244 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.singlelayer;
 
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
@@ -35,14 +34,11 @@ public final class SingleLayerFlowService<O extends DataObject> extends Abstract
         final FlowMessageBuilder flowMessageBuilder = new FlowMessageBuilder(input);
         final Class<? extends DataContainer> clazz = input.implementedInterface();
 
-        if (clazz.equals(AddFlowInput.class)
-                || clazz.equals(UpdatedFlow.class)) {
+        if (clazz.equals(AddFlowInput.class) || clazz.equals(UpdatedFlow.class)) {
             flowMessageBuilder.setCommand(FlowModCommand.OFPFCADD);
-        } else if (clazz.equals(RemoveFlowInput.class)
-                || clazz.equals(OriginalFlow.class)) {
-            flowMessageBuilder.setCommand(Boolean.TRUE.equals(input.isStrict())
-                    ? FlowModCommand.OFPFCDELETESTRICT
-                    : FlowModCommand.OFPFCDELETE);
+        } else if (clazz.equals(RemoveFlowInput.class) || clazz.equals(OriginalFlow.class)) {
+            flowMessageBuilder.setCommand(
+                Boolean.TRUE.equals(input.getStrict()) ? FlowModCommand.OFPFCDELETESTRICT : FlowModCommand.OFPFCDELETE);
         }
 
         return flowMessageBuilder
index e4716b884fb40aea8993cd3ba1408278aa2a249e..4ac0db894b4b3198a1d4dab72991ed9a4ade10e0 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.singlelayer;
 
 import java.util.List;
@@ -18,20 +17,20 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 
 public class SingleLayerMultipartRequestCallback<T extends OfHeader> extends AbstractMultipartRequestCallback<T> {
 
-    public SingleLayerMultipartRequestCallback(RequestContext<List<T>> context,
-                                               Class<?> requestType,
-                                               DeviceContext deviceContext,
-                                               EventIdentifier eventIdentifier) {
+    public SingleLayerMultipartRequestCallback(final RequestContext<List<T>> context,
+                                               final Class<?> requestType,
+                                               final DeviceContext deviceContext,
+                                               final EventIdentifier eventIdentifier) {
         super(context, requestType, deviceContext, eventIdentifier);
     }
 
     @Override
-    protected boolean isMultipart(OfHeader result) {
+    protected boolean isMultipart(final OfHeader result) {
         return result instanceof MultipartReply;
     }
 
     @Override
-    protected boolean isReqMore(T result) {
-        return ((MultipartReply) result).isRequestMore();
+    protected boolean isReqMore(final T result) {
+        return ((MultipartReply) result).getRequestMore();
     }
 }
index 10cab8da801a79453b2a6cdb6d119312d161edb6..1026a23058b2a049e298128226986e9566fcf69a 100644 (file)
@@ -158,29 +158,29 @@ class StatisticsContextImpl<T extends OfHeader> implements StatisticsContext, De
     public void initializeDevice() {
         final List<MultipartType> statListForCollecting = new ArrayList<>();
 
-        if (devState.isGroupAvailable() && config.isIsGroupStatisticsPollingOn()) {
+        if (devState.isGroupAvailable() && config.getIsGroupStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPGROUPDESC);
             statListForCollecting.add(MultipartType.OFPMPGROUP);
         }
 
-        if (devState.isMetersAvailable() && config.isIsMeterStatisticsPollingOn()) {
+        if (devState.isMetersAvailable() && config.getIsMeterStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPMETERCONFIG);
             statListForCollecting.add(MultipartType.OFPMPMETER);
         }
 
-        if (devState.isFlowStatisticsAvailable() && config.isIsFlowStatisticsPollingOn()) {
+        if (devState.isFlowStatisticsAvailable() && config.getIsFlowStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPFLOW);
         }
 
-        if (devState.isTableStatisticsAvailable() && config.isIsTableStatisticsPollingOn()) {
+        if (devState.isTableStatisticsAvailable() && config.getIsTableStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPTABLE);
         }
 
-        if (devState.isPortStatisticsAvailable() && config.isIsPortStatisticsPollingOn()) {
+        if (devState.isPortStatisticsAvailable() && config.getIsPortStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPPORTSTATS);
         }
 
-        if (devState.isQueueStatisticsAvailable() && config.isIsQueueStatisticsPollingOn()) {
+        if (devState.isQueueStatisticsAvailable() && config.getIsQueueStatisticsPollingOn()) {
             statListForCollecting.add(MultipartType.OFPMPQUEUE);
         }
 
index ca63473aa0db7a40f0e98f926852ddf4be55efb8..415eed3c118596a7ec6f95b294f38bd39aa63abc 100644 (file)
@@ -63,7 +63,7 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag
 
     @Override
     public ListenableFuture<RpcResult<GetStatisticsWorkModeOutput>> getStatisticsWorkMode(
-            GetStatisticsWorkModeInput input) {
+            final GetStatisticsWorkModeInput input) {
         return RpcResultBuilder.success(new GetStatisticsWorkModeOutputBuilder()
                 .setMode(workMode)
                 .build()).buildFuture();
@@ -71,7 +71,7 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag
 
     @Override
     public ListenableFuture<RpcResult<ChangeStatisticsWorkModeOutput>> changeStatisticsWorkMode(
-            ChangeStatisticsWorkModeInput input) {
+            final ChangeStatisticsWorkModeInput input) {
         if (workModeGuard.tryAcquire()) {
             final StatisticsWorkMode targetWorkMode = input.getMode();
             isStatisticsFullyDisabled = StatisticsWorkMode.FULLYDISABLED.equals(targetWorkMode);
@@ -111,7 +111,7 @@ public class StatisticsManagerImpl implements StatisticsManager, StatisticsManag
                 statisticsWriterProvider,
                 executorService,
                 config,
-                !isStatisticsFullyDisabled && config.isIsStatisticsPollingOn(),
+                !isStatisticsFullyDisabled && config.getIsStatisticsPollingOn(),
                 useReconciliationFramework);
 
         contexts.put(deviceContext.getDeviceInfo(), statisticsContext);
index 402730d5a37d3f97292fb27f011cdf7960fe1ce6..0314b940676f4eab683b9a88d6afa655dc742c88 100644 (file)
@@ -51,9 +51,9 @@ final class GroupFeaturesService
     private static final MultipartRequestGroupFeaturesCase GROUP_FEAT_CASE =
             new MultipartRequestGroupFeaturesCaseBuilder().build();
 
-    GroupFeaturesService(RequestContextStack requestContextStack,
-                                DeviceContext deviceContext,
-                                AtomicLong compatibilityXidSeed) {
+    GroupFeaturesService(final RequestContextStack requestContextStack,
+                                final DeviceContext deviceContext,
+                                final AtomicLong compatibilityXidSeed) {
         super(requestContextStack, deviceContext, compatibilityXidSeed);
     }
 
@@ -66,12 +66,13 @@ final class GroupFeaturesService
     }
 
     @Override
-    public GetGroupFeaturesOutput buildTxCapableResult(TransactionId emulatedTxId) {
+    public GetGroupFeaturesOutput buildTxCapableResult(final TransactionId emulatedTxId) {
         return new GetGroupFeaturesOutputBuilder().setTransactionId(emulatedTxId).build();
     }
 
     @Override
-    public GroupFeaturesUpdated transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
+    public GroupFeaturesUpdated transformToNotification(final List<MultipartReply> result,
+            final TransactionId emulatedTxId) {
         final int mpSize = result.size();
         Preconditions.checkArgument(mpSize == 1, "unexpected (!=1) mp-reply size received: {}", mpSize);
 
@@ -93,38 +94,36 @@ final class GroupFeaturesService
     }
 
     @VisibleForTesting
-    static List<Class<? extends GroupCapability>> extractSupportedCapabilities(GroupCapabilities capabilities) {
+    static List<Class<? extends GroupCapability>> extractSupportedCapabilities(final GroupCapabilities capabilities) {
         List<Class<? extends GroupCapability>> supportedCapabilities = new ArrayList<>();
-
-        if (capabilities.isOFPGFCCHAINING()) {
+        if (capabilities.getOFPGFCCHAINING()) {
             supportedCapabilities.add(Chaining.class);
         }
-        if (capabilities.isOFPGFCCHAININGCHECKS()) {
+        if (capabilities.getOFPGFCCHAININGCHECKS()) {
             supportedCapabilities.add(ChainingChecks.class);
         }
-        if (capabilities.isOFPGFCSELECTLIVENESS()) {
+        if (capabilities.getOFPGFCSELECTLIVENESS()) {
             supportedCapabilities.add(SelectLiveness.class);
         }
-        if (capabilities.isOFPGFCSELECTWEIGHT()) {
+        if (capabilities.getOFPGFCSELECTWEIGHT()) {
             supportedCapabilities.add(SelectWeight.class);
         }
         return supportedCapabilities;
     }
 
     @VisibleForTesting
-    static List<Class<? extends GroupType>> extractSupportedGroupTypes(GroupTypes types) {
+    static List<Class<? extends GroupType>> extractSupportedGroupTypes(final GroupTypes types) {
         List<Class<? extends GroupType>> supportedGroups = new ArrayList<>();
-
-        if (types.isOFPGTALL()) {
+        if (types.getOFPGTALL()) {
             supportedGroups.add(GroupAll.class);
         }
-        if (types.isOFPGTSELECT()) {
+        if (types.getOFPGTSELECT()) {
             supportedGroups.add(GroupSelect.class);
         }
-        if (types.isOFPGTINDIRECT()) {
+        if (types.getOFPGTINDIRECT()) {
             supportedGroups.add(GroupIndirect.class);
         }
-        if (types.isOFPGTFF()) {
+        if (types.getOFPGTFF()) {
             supportedGroups.add(GroupFf.class);
         }
         return supportedGroups;
index c6593134b95b7f4e8d33307b7e28d24921f763ac..89772e19e7b1114b6d41d985a39665f9eb8676cc 100644 (file)
@@ -48,9 +48,9 @@ final class MeterFeaturesService
     private static final MultipartRequestMeterFeaturesCase METER_FEATURES_CASE =
             new MultipartRequestMeterFeaturesCaseBuilder().build();
 
-    MeterFeaturesService(RequestContextStack requestContextStack,
-                                DeviceContext deviceContext,
-                                AtomicLong compatibilityXidSeed) {
+    MeterFeaturesService(final RequestContextStack requestContextStack,
+                                final DeviceContext deviceContext,
+                                final AtomicLong compatibilityXidSeed) {
         super(requestContextStack, deviceContext, compatibilityXidSeed);
     }
 
@@ -63,14 +63,15 @@ final class MeterFeaturesService
     }
 
     @Override
-    public GetMeterFeaturesOutput buildTxCapableResult(TransactionId emulatedTxId) {
+    public GetMeterFeaturesOutput buildTxCapableResult(final TransactionId emulatedTxId) {
         return new GetMeterFeaturesOutputBuilder().setTransactionId(emulatedTxId).build();
     }
 
     @Override
-    public MeterFeaturesUpdated transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
+    public MeterFeaturesUpdated transformToNotification(final List<MultipartReply> result,
+            final TransactionId emulatedTxId) {
         final int mpSize = result.size();
-        Preconditions.checkArgument(mpSize == 1, "unexpected (!=1) mp-reply size received: {}", mpSize);
+        Preconditions.checkArgument(mpSize == 1, "unexpected (!=1) mp-reply size received: %s", mpSize);
 
         MeterFeaturesUpdatedBuilder notification = new MeterFeaturesUpdatedBuilder();
         notification.setId(getDeviceInfo().getNodeId());
@@ -90,32 +91,32 @@ final class MeterFeaturesService
     }
 
     @VisibleForTesting
-    protected static List<Class<? extends MeterBand>> extractSupportedMeterBand(MultipartReplyMeterFeatures replyBody,
-                                                                         MeterBandTypeBitmap bandTypes) {
+    protected static List<Class<? extends MeterBand>> extractSupportedMeterBand(
+            final MultipartReplyMeterFeatures replyBody, final MeterBandTypeBitmap bandTypes) {
         List<Class<? extends MeterBand>> supportedMeterBand = new ArrayList<>();
-        if (bandTypes.isOFPMBTDROP()) {
+        if (bandTypes.getOFPMBTDROP()) {
             supportedMeterBand.add(MeterBandDrop.class);
         }
-        if (replyBody.getBandTypes().isOFPMBTDSCPREMARK()) {
+        if (replyBody.getBandTypes().getOFPMBTDSCPREMARK()) {
             supportedMeterBand.add(MeterBandDscpRemark.class);
         }
         return supportedMeterBand;
     }
 
     @VisibleForTesting
-    protected static List<Class<? extends MeterCapability>> extractMeterCapabilities(MeterFlags capabilities) {
+    protected static List<Class<? extends MeterCapability>> extractMeterCapabilities(final MeterFlags capabilities) {
         List<Class<? extends MeterCapability>> supportedCapabilities = new ArrayList<>();
 
-        if (capabilities.isOFPMFBURST()) {
+        if (capabilities.getOFPMFBURST()) {
             supportedCapabilities.add(MeterBurst.class);
         }
-        if (capabilities.isOFPMFKBPS()) {
+        if (capabilities.getOFPMFKBPS()) {
             supportedCapabilities.add(MeterKbps.class);
         }
-        if (capabilities.isOFPMFPKTPS()) {
+        if (capabilities.getOFPMFPKTPS()) {
             supportedCapabilities.add(MeterPktps.class);
         }
-        if (capabilities.isOFPMFSTATS()) {
+        if (capabilities.getOFPMFSTATS()) {
             supportedCapabilities.add(MeterStats.class);
         }
         return supportedCapabilities;
index 6db39e522aa03ce0282c2a15651d023f52380cda..560fd7660b323db78a6e3ba7d0101af70d52eb98 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.statistics.services.direct;
 
 import com.google.common.base.Preconditions;
@@ -74,7 +73,7 @@ abstract class AbstractDirectStatisticsService<I extends StoreStatsGrouping,
                 this::transformResult,
                 MoreExecutors.directExecutor());
 
-        if (Boolean.TRUE.equals(input.isStoreStats())) {
+        if (Boolean.TRUE.equals(input.getStoreStats())) {
             rpcResult = Futures.transform(rpcResult, this::storeResult, MoreExecutors.directExecutor());
         }
 
index ebef3b83a35fea8fc839d77ef278165f84b5569a..8306ca342f97341c28b0034cd6f817f494a80de6 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.util;
 
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
@@ -19,29 +18,28 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 
 public final class DeviceStateUtil {
-
     private DeviceStateUtil() {
-        throw new IllegalStateException("This class should not be instantiated");
+        // Hidden on purpose
     }
 
     public static void setDeviceStateBasedOnV13Capabilities(final DeviceState deviceState,
                                                             final Capabilities capabilities) {
-        deviceState.setFlowStatisticsAvailable(capabilities.isOFPCFLOWSTATS());
-        deviceState.setTableStatisticsAvailable(capabilities.isOFPCTABLESTATS());
-        deviceState.setPortStatisticsAvailable(capabilities.isOFPCPORTSTATS());
-        deviceState.setQueueStatisticsAvailable(capabilities.isOFPCQUEUESTATS());
-        deviceState.setGroupAvailable(capabilities.isOFPCGROUPSTATS());
+        deviceState.setFlowStatisticsAvailable(capabilities.getOFPCFLOWSTATS());
+        deviceState.setTableStatisticsAvailable(capabilities.getOFPCTABLESTATS());
+        deviceState.setPortStatisticsAvailable(capabilities.getOFPCPORTSTATS());
+        deviceState.setQueueStatisticsAvailable(capabilities.getOFPCQUEUESTATS());
+        deviceState.setGroupAvailable(capabilities.getOFPCGROUPSTATS());
     }
 
     public static void setDeviceStateBasedOnV10Capabilities(final DeviceState deviceState,
                                                             final CapabilitiesV10 capabilitiesV10) {
-        deviceState.setFlowStatisticsAvailable(capabilitiesV10.isOFPCFLOWSTATS());
-        deviceState.setTableStatisticsAvailable(capabilitiesV10.isOFPCTABLESTATS());
-        deviceState.setPortStatisticsAvailable(capabilitiesV10.isOFPCPORTSTATS());
-        deviceState.setQueueStatisticsAvailable(capabilitiesV10.isOFPCQUEUESTATS());
+        deviceState.setFlowStatisticsAvailable(capabilitiesV10.getOFPCFLOWSTATS());
+        deviceState.setTableStatisticsAvailable(capabilitiesV10.getOFPCTABLESTATS());
+        deviceState.setPortStatisticsAvailable(capabilitiesV10.getOFPCPORTSTATS());
+        deviceState.setQueueStatisticsAvailable(capabilitiesV10.getOFPCQUEUESTATS());
     }
 
-    public static KeyedInstanceIdentifier<Node, NodeKey> createNodeInstanceIdentifier(NodeId nodeId) {
+    public static KeyedInstanceIdentifier<Node, NodeKey> createNodeInstanceIdentifier(final NodeId nodeId) {
         return InstanceIdentifier.create(Nodes.class).child(Node.class, new NodeKey(nodeId));
     }
 }
index 42559f289fb714122f16a442d33f5e63395e4771..ccf8fd09acd75f12ad4a3ee313139912ad78472d 100644 (file)
@@ -24,7 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.flow._case.MultipartRequestFlowBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 public final class FlowCreatorUtil {
     /**
@@ -63,24 +65,25 @@ public final class FlowCreatorUtil {
      *
      * @return V10 Match object
      */
+    // FIXME: make this a constant
     public static MatchV10 createWildcardedMatchV10() {
-        MatchV10Builder builder = new MatchV10Builder();
-        builder.setWildcards(new FlowWildcardsV10(true, true, true, true, true, true, true, true, true, true));
-        builder.setNwSrcMask((short) 0);
-        builder.setNwDstMask((short) 0);
-        builder.setInPort(0);
-        builder.setDlSrc(new MacAddress("00:00:00:00:00:00"));
-        builder.setDlDst(new MacAddress("00:00:00:00:00:00"));
-        builder.setDlVlan(0);
-        builder.setDlVlanPcp((short) 0);
-        builder.setDlType(0);
-        builder.setNwTos((short) 0);
-        builder.setNwProto((short) 0);
-        builder.setNwSrc(new Ipv4Address("0.0.0.0"));
-        builder.setNwDst(new Ipv4Address("0.0.0.0"));
-        builder.setTpSrc(0);
-        builder.setTpDst(0);
-        return builder.build();
+        return new MatchV10Builder()
+            .setWildcards(new FlowWildcardsV10(true, true, true, true, true, true, true, true, true, true))
+            .setNwSrcMask(Uint8.ZERO)
+            .setNwDstMask(Uint8.ZERO)
+            .setInPort(Uint16.ZERO)
+            .setDlSrc(new MacAddress("00:00:00:00:00:00"))
+            .setDlDst(new MacAddress("00:00:00:00:00:00"))
+            .setDlVlan(Uint16.ZERO)
+            .setDlVlanPcp(Uint8.ZERO)
+            .setDlType(Uint16.ZERO)
+            .setNwTos(Uint8.ZERO)
+            .setNwProto(Uint8.ZERO)
+            .setNwSrc(new Ipv4Address("0.0.0.0"))
+            .setNwDst(new Ipv4Address("0.0.0.0"))
+            .setTpSrc(Uint16.ZERO)
+            .setTpDst(Uint16.ZERO)
+            .build();
     }
 
     public static Match createWildcardedMatch() {
@@ -109,7 +112,7 @@ public final class FlowCreatorUtil {
             return false;
         }
 
-        if (!Boolean.TRUE.equals(updated.isStrict()) && version != null
+        if (!Boolean.TRUE.equals(updated.getStrict()) && version != null
                 && version.shortValue() != OFConstants.OFP_VERSION_1_0) {
             FlowCookie cookieMask = updated.getCookieMask();
             if (cookieMask != null) {
@@ -162,12 +165,11 @@ public final class FlowCreatorUtil {
             f2 = flags2 == null ? DEFAULT_FLOW_MOD_FLAGS : flags2;
         }
 
-        return equalsWithDefault(f1.isCHECKOVERLAP(), f2.isCHECKOVERLAP(), Boolean.FALSE) && equalsWithDefault(
-                f1.isNOBYTCOUNTS(), f2.isNOBYTCOUNTS(), Boolean.FALSE) && equalsWithDefault(f1.isNOPKTCOUNTS(),
-                                                                                            f2.isNOPKTCOUNTS(),
-                                                                                            Boolean.FALSE)
-                && equalsWithDefault(f1.isRESETCOUNTS(), f2.isRESETCOUNTS(), Boolean.FALSE) && equalsWithDefault(
-                f1.isSENDFLOWREM(), f2.isSENDFLOWREM(), Boolean.FALSE);
+        return equalsWithDefault(f1.getCHECKOVERLAP(), f2.getCHECKOVERLAP(), Boolean.FALSE)
+            && equalsWithDefault(f1.getNOBYTCOUNTS(), f2.getNOBYTCOUNTS(), Boolean.FALSE)
+            && equalsWithDefault(f1.getNOPKTCOUNTS(), f2.getNOPKTCOUNTS(), Boolean.FALSE)
+            && equalsWithDefault(f1.getRESETCOUNTS(), f2.getRESETCOUNTS(), Boolean.FALSE)
+            && equalsWithDefault(f1.getSENDFLOWREM(), f2.getSENDFLOWREM(), Boolean.FALSE);
     }
 
     /**
index f7529ff9a1de27f74284d3d7773793ee41201fd9..93c79b7b36fd77590dfbdbf0211276fb016e3283 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.util;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -46,7 +45,6 @@ import org.opendaylight.yangtools.yang.common.Uint32;
  * Provides group util methods.
  */
 public final class GroupUtil {
-
     private static final RpcResultBuilder<List<BatchFailedGroupsOutput>> SUCCESSFUL_GROUP_OUTPUT_RPC_RESULT =
             RpcResultBuilder.success(Collections.emptyList());
 
@@ -95,7 +93,7 @@ public final class GroupUtil {
             GROUP_UPDATE_COMPOSING_TRANSFORM = createComposingFunction();
 
     private GroupUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     /**
@@ -135,22 +133,22 @@ public final class GroupUtil {
         for (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType supportedActions
                 : actionsSupported) {
             long supportActionBitmap = 0;
-            supportActionBitmap |= supportedActions.isOFPATOUTPUT() ? 1 : 0;
-            supportActionBitmap |= supportedActions.isOFPATCOPYTTLOUT() ? 1 << 11 : 0;
-            supportActionBitmap |= supportedActions.isOFPATCOPYTTLIN() ? 1 << 12 : 0;
-            supportActionBitmap |= supportedActions.isOFPATSETMPLSTTL() ? 1 << 15 : 0;
-            supportActionBitmap |= supportedActions.isOFPATDECMPLSTTL() ? 1 << 16 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPUSHVLAN() ? 1 << 17 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPOPVLAN() ? 1 << 18 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPUSHMPLS() ? 1 << 19 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPOPMPLS() ? 1 << 20 : 0;
-            supportActionBitmap |= supportedActions.isOFPATSETQUEUE() ? 1 << 21 : 0;
-            supportActionBitmap |= supportedActions.isOFPATGROUP() ? 1 << 22 : 0;
-            supportActionBitmap |= supportedActions.isOFPATSETNWTTL() ? 1 << 23 : 0;
-            supportActionBitmap |= supportedActions.isOFPATDECNWTTL() ? 1 << 24 : 0;
-            supportActionBitmap |= supportedActions.isOFPATSETFIELD() ? 1 << 25 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPUSHPBB() ? 1 << 26 : 0;
-            supportActionBitmap |= supportedActions.isOFPATPOPPBB() ? 1 << 27 : 0;
+            supportActionBitmap |= supportedActions.getOFPATOUTPUT() ? 1 : 0;
+            supportActionBitmap |= supportedActions.getOFPATCOPYTTLOUT() ? 1 << 11 : 0;
+            supportActionBitmap |= supportedActions.getOFPATCOPYTTLIN() ? 1 << 12 : 0;
+            supportActionBitmap |= supportedActions.getOFPATSETMPLSTTL() ? 1 << 15 : 0;
+            supportActionBitmap |= supportedActions.getOFPATDECMPLSTTL() ? 1 << 16 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPUSHVLAN() ? 1 << 17 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPOPVLAN() ? 1 << 18 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPUSHMPLS() ? 1 << 19 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPOPMPLS() ? 1 << 20 : 0;
+            supportActionBitmap |= supportedActions.getOFPATSETQUEUE() ? 1 << 21 : 0;
+            supportActionBitmap |= supportedActions.getOFPATGROUP() ? 1 << 22 : 0;
+            supportActionBitmap |= supportedActions.getOFPATSETNWTTL() ? 1 << 23 : 0;
+            supportActionBitmap |= supportedActions.getOFPATDECNWTTL() ? 1 << 24 : 0;
+            supportActionBitmap |= supportedActions.getOFPATSETFIELD() ? 1 << 25 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPUSHPBB() ? 1 << 26 : 0;
+            supportActionBitmap |= supportedActions.getOFPATPOPPBB() ? 1 << 27 : 0;
             supportActionByGroups.add(Uint32.valueOf(supportActionBitmap));
         }
         return supportActionByGroups;
index 7bb6057e1e48286c693f9f39ed1354eb49389381..feb69fca0a1a684ba1b46a1bba601a7aa23bff43 100644 (file)
@@ -40,22 +40,22 @@ public abstract class PortTranslatorUtil {
         org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures napf = null;
         if (apf != null) {
             napf = new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures(
-                    apf.isAutoneg(), //_autoeng
-                    apf.isCopper(), //_copper
-                    apf.isFiber(), //_fiber
-                    apf.is_40gbFd(), //_fortyGbFd
-                    apf.is_100gbFd(), //_hundredGbFd
-                    apf.is_100mbFd(), //_hundredMbFd
-                    apf.is_100mbHd(), //_hundredMbHd
-                    apf.is_1gbFd(), //_oneGbFd
-                    apf.is_1gbHd(), //_oneGbHd
-                    apf.is_1tbFd(), //_oneTbFd
-                    apf.isOther(), //_other
-                    apf.isPause(), //_pause
-                    apf.isPauseAsym(), //_pauseAsym
-                    apf.is_10gbFd(), //_tenGbFd
-                    apf.is_10mbFd(), //_tenMbFd
-                    apf.is_10mbHd()//_tenMbHd
+                    apf.getAutoneg(), //_autoeng
+                    apf.getCopper(), //_copper
+                    apf.getFiber(), //_fiber
+                    apf.get_40gbFd(), //_fortyGbFd
+                    apf.get_100gbFd(), //_hundredGbFd
+                    apf.get_100mbFd(), //_hundredMbFd
+                    apf.get_100mbHd(), //_hundredMbHd
+                    apf.get_1gbFd(), //_oneGbFd
+                    apf.get_1gbHd(), //_oneGbHd
+                    apf.get_1tbFd(), //_oneTbFd
+                    apf.getOther(), //_other
+                    apf.getPause(), //_pause
+                    apf.getPauseAsym(), //_pauseAsym
+                    apf.get_10gbFd(), //_tenGbFd
+                    apf.get_10mbFd(), //_tenMbFd
+                    apf.get_10mbHd()//_tenMbHd
             );
 
         }
@@ -68,22 +68,22 @@ public abstract class PortTranslatorUtil {
         org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures napf = null;
         if (apf != null) {
             napf = new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures(
-                    apf.isAutoneg(), //_autoeng
-                    apf.isCopper(), //_copper
-                    apf.isFiber(), //_fiber
+                    apf.getAutoneg(), //_autoeng
+                    apf.getCopper(), //_copper
+                    apf.getFiber(), //_fiber
                     false, //_fortyGbFd
                     false, //_hundredGbFd
-                    apf.is_100mbFd(), //_hundredMbFd
-                    apf.is_100mbHd(), //_hundredMbHd
-                    apf.is_1gbFd(), //_oneGbFd
-                    apf.is_1gbHd(), //_oneGbHd
+                    apf.get_100mbFd(), //_hundredMbFd
+                    apf.get_100mbHd(), //_hundredMbHd
+                    apf.get_1gbFd(), //_oneGbFd
+                    apf.get_1gbHd(), //_oneGbHd
                     false, //_oneTbFd
                     false, //_other
-                    apf.isPause(), //_pause
-                    apf.isPauseAsym(), //_pauseAsym
-                    apf.is_10gbFd(), //_tenGbFd
-                    apf.is_10mbFd(), //_tenMbFd
-                    apf.is_10mbHd()//_tenMbHd
+                    apf.getPause(), //_pause
+                    apf.getPauseAsym(), //_pauseAsym
+                    apf.get_10gbFd(), //_tenGbFd
+                    apf.get_10mbFd(), //_tenMbFd
+                    apf.get_10mbHd()//_tenMbHd
             );
         }
         return napf;
@@ -92,9 +92,7 @@ public abstract class PortTranslatorUtil {
     public static State translatePortState(final PortState state) {
         StateBuilder nstate = new StateBuilder();
         if (state != null) {
-            nstate.setBlocked(state.isBlocked());
-            nstate.setLinkDown(state.isLinkDown());
-            nstate.setLive(state.isLive());
+            nstate.setBlocked(state.getBlocked()).setLinkDown(state.getLinkDown()).setLive(state.getLive());
         }
         return nstate.build();
     }
@@ -102,33 +100,23 @@ public abstract class PortTranslatorUtil {
     public static State translatePortState(final PortStateV10 state) {
         StateBuilder nstate = new StateBuilder();
         if (state != null) {
-            nstate.setBlocked(state.isBlocked());
-            nstate.setLinkDown(state.isLinkDown());
-            nstate.setLive(state.isLive());
+            nstate.setBlocked(state.getBlocked()).setLinkDown(state.getLinkDown()).setLive(state.getLive());
         }
         return nstate.build();
     }
 
     public static org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig
-        translatePortConfig(
-            final PortConfig pc) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig npc = null;
-        if (pc != null) {
-            npc = new org.opendaylight.yang.gen.v1.urn.opendaylight
-                    .flow.types.port.rev130925.PortConfig(pc.isNoFwd(),pc.isNoPacketIn(),pc.isNoRecv(),pc.isPortDown());
-        }
-        return npc;
+            translatePortConfig(final PortConfig pc) {
+        return pc == null ? null
+            : new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig(
+                pc.getNoFwd(), pc.getNoPacketIn(), pc.getNoRecv(), pc.getPortDown());
     }
 
     public static org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig
-        translatePortConfig(
-            final PortConfigV10 pc) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig npc = null;
-        if (pc != null) {
-            npc = new org.opendaylight.yang.gen.v1.urn.opendaylight
-                    .flow.types.port.rev130925.PortConfig(pc.isNoFwd(),pc.isNoPacketIn(),pc.isNoRecv(),pc.isPortDown());
-        }
-        return npc;
+            translatePortConfig(final PortConfigV10 pc) {
+        return pc == null ? null
+            : new org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig(
+                pc.getNoFwd(), pc.getNoPacketIn(), pc.getNoRecv(), pc.getPortDown());
     }
 
     public static NodeConnectorUpdated translatePort(final Short version, final Uint64 datapathId,
index 82237057ff38192d8e586a9247f8ae17c838f240..f64b4e1ac07bfff33d0bb3030955d529cf29ed01 100644 (file)
@@ -253,14 +253,14 @@ public class MultipartRequestInputFactoryTest {
                 MultipartRequestExperimenterCase.class);
     }
 
-    private void checkHeader(MultipartRequestInput mpRqInput, MultipartType mpType) {
-        Assert.assertFalse(mpRqInput.getFlags().isOFPMPFREQMORE());
+    private void checkHeader(final MultipartRequestInput mpRqInput, final MultipartType mpType) {
+        Assert.assertFalse(mpRqInput.getFlags().getOFPMPFREQMORE());
         Assert.assertEquals(ofVersion, mpRqInput.getVersion().shortValue());
         Assert.assertEquals(mpType, mpRqInput.getType());
         Assert.assertEquals(xid, mpRqInput.getXid().longValue());
     }
 
-    private static void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
+    private static void checkEmptyBody(final Class<? extends DataContainer> mpRqBody, final Class<? extends
             MultipartRequestBody> expectedMpRqBodyClass) {
         Assert.assertTrue(expectedMpRqBodyClass.isAssignableFrom(mpRqBody));
         Assert.assertEquals(expectedMpRqBodyClass, mpRqBody);
index ba3d3efc018203c5b2134e5d3f68b7599a4de2fa..138e340847bb4c259081448fa0215722da51cb77 100644 (file)
@@ -65,24 +65,24 @@ public class ConfigurationServiceFactoryImplTest {
 
     @Before
     public void setUp() {
-        when(config.isIsStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsTableStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsGroupStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsMeterStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsQueueStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
-        when(config.isIsPortStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsTableStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsFlowStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsGroupStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsMeterStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsQueueStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
+        when(config.getIsPortStatisticsPollingOn()).thenReturn(IS_STATISTICS_POLLING_ON);
         when(config.getBarrierCountLimit()).thenReturn(new NonZeroUint16Type(BARRIER_COUNT_LIMIT));
         when(config.getBarrierIntervalTimeoutLimit()).thenReturn(new NonZeroUint32Type(BARRIER_INTERVAL_TIMEOUT_LIMIT));
         when(config.getEchoReplyTimeout()).thenReturn(new NonZeroUint32Type(ECHO_REPLY_TIMEOUT));
-        when(config.isEnableFlowRemovedNotification()).thenReturn(ENABLE_FLOW_REMOVED_NOTIFICATION);
-        when(config.isSkipTableFeatures()).thenReturn(SKIP_TABLE_FEATURES);
+        when(config.getEnableFlowRemovedNotification()).thenReturn(ENABLE_FLOW_REMOVED_NOTIFICATION);
+        when(config.getSkipTableFeatures()).thenReturn(SKIP_TABLE_FEATURES);
         when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(BASIC_TIMER_DELAY));
         when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(MAXIMUM_TIMER_DELAY));
-        when(config.isSwitchFeaturesMandatory()).thenReturn(SWITCH_FEATURES_MANDATORY);
-        when(config.isIsStatisticsRpcEnabled()).thenReturn(IS_STATISTICS_RPC_ENABLED);
-        when(config.isUseSingleLayerSerialization()).thenReturn(USE_SINGLE_LAYER_SERIALIZATION);
+        when(config.getSwitchFeaturesMandatory()).thenReturn(SWITCH_FEATURES_MANDATORY);
+        when(config.getIsStatisticsRpcEnabled()).thenReturn(IS_STATISTICS_RPC_ENABLED);
+        when(config.getUseSingleLayerSerialization()).thenReturn(USE_SINGLE_LAYER_SERIALIZATION);
         when(config.getRpcRequestsQuota()).thenReturn(new NonZeroUint16Type(RPC_REQUESTS_QUOTA));
         when(config.getGlobalNotificationQuota()).thenReturn(GLOBAL_NOTIFICATION_QUOTA);
         when(config.getThreadPoolMinThreads()).thenReturn(THREAD_POOL_MIN_THREADS);
index a65da43644b67f51ede3d10ecf25a135d13b8557..fe13960e8cd3d4ab7efb8b33db801e0d2cb81135 100644 (file)
@@ -106,7 +106,7 @@ public class OpenFlowProviderConfigImplTest {
 
     @Test
     public void isSwitchFeaturesMandatory() {
-        assertEquals(SWITCH_FEATURES_MANDATORY, openflowProviderConfig.isSwitchFeaturesMandatory());
+        assertEquals(SWITCH_FEATURES_MANDATORY, openflowProviderConfig.getSwitchFeaturesMandatory());
     }
 
     @Test
@@ -116,12 +116,12 @@ public class OpenFlowProviderConfigImplTest {
 
     @Test
     public void isIsStatisticsPollingOn() {
-        assertEquals(IS_STATISTICS_POLLING_ON, openflowProviderConfig.isIsStatisticsPollingOn());
+        assertEquals(IS_STATISTICS_POLLING_ON, openflowProviderConfig.getIsStatisticsPollingOn());
     }
 
     @Test
     public void isIsStatisticsRpcEnabled() {
-        assertEquals(IS_STATISTICS_RPC_ENABLED, openflowProviderConfig.isIsStatisticsRpcEnabled());
+        assertEquals(IS_STATISTICS_RPC_ENABLED, openflowProviderConfig.getIsStatisticsRpcEnabled());
     }
 
     @Test
@@ -157,12 +157,12 @@ public class OpenFlowProviderConfigImplTest {
 
     @Test
     public void isEnableFlowRemovedNotification() {
-        assertEquals(ENABLE_FLOW_REMOVED_NOTIFICATION, openflowProviderConfig.isEnableFlowRemovedNotification());
+        assertEquals(ENABLE_FLOW_REMOVED_NOTIFICATION, openflowProviderConfig.getEnableFlowRemovedNotification());
     }
 
     @Test
     public void isSkipTableFeatures() {
-        assertEquals(SKIP_TABLE_FEATURES, openflowProviderConfig.isSkipTableFeatures());
+        assertEquals(SKIP_TABLE_FEATURES, openflowProviderConfig.getSkipTableFeatures());
     }
 
     @Test
@@ -177,7 +177,7 @@ public class OpenFlowProviderConfigImplTest {
 
     @Test
     public void isUseSingleLayerSerialization() {
-        assertEquals(USE_SINGLE_LAYER_SERIALIZATION, openflowProviderConfig.isUseSingleLayerSerialization());
+        assertEquals(USE_SINGLE_LAYER_SERIALIZATION, openflowProviderConfig.getUseSingleLayerSerialization());
     }
 
     @Test
index 9d4c22f37f6504ae36933085f2a44a2ee2230a10..a8751ee90271b36e981f68e48d04af7a5dcbc206 100644 (file)
@@ -25,11 +25,11 @@ public class VlanVidEntryDeserializerTest extends AbstractMatchEntryDeserializer
         final byte[] vlanMask = new byte[]{16, 0};
 
         writeHeader(in, false);
-        in.writeShort(vlanVid | (1 << 12));
+        in.writeShort(vlanVid | 1 << 12);
 
         VlanMatch vlanMatch = deserialize(in).getVlanMatch();
         assertEquals(vlanVid, vlanMatch.getVlanId().getVlanId().getValue().intValue());
-        assertTrue(vlanMatch.getVlanId().isVlanIdPresent());
+        assertTrue(vlanMatch.getVlanId().getVlanIdPresent());
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
@@ -38,7 +38,7 @@ public class VlanVidEntryDeserializerTest extends AbstractMatchEntryDeserializer
 
         vlanMatch = deserialize(in).getVlanMatch();
         assertEquals(0, vlanMatch.getVlanId().getVlanId().getValue().intValue());
-        assertTrue(vlanMatch.getVlanId().isVlanIdPresent());
+        assertTrue(vlanMatch.getVlanId().getVlanIdPresent());
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, false);
@@ -46,7 +46,7 @@ public class VlanVidEntryDeserializerTest extends AbstractMatchEntryDeserializer
 
         vlanMatch = deserialize(in).getVlanMatch();
         assertEquals(vlanVid, vlanMatch.getVlanId().getVlanId().getValue().intValue());
-        assertFalse(vlanMatch.getVlanId().isVlanIdPresent());
+        assertFalse(vlanMatch.getVlanId().getVlanIdPresent());
 
     }
 
index af3162688ad01e421ce66357d5e00bb76a769262..f80e48414cb52025a3457fb6d68c263e134aa39c 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.deserialization.messages;
 
 import static org.junit.Assert.assertEquals;
@@ -78,11 +77,11 @@ public class FlowMessageDeserializerTest extends AbstractDeserializerTest {
         buffer.writeInt(OUT_PORT);
         buffer.writeInt(OUT_GROUP);
         buffer.writeShort(ByteBufUtils.fillBitMask(0,
-                    FLAGS.isSENDFLOWREM(),
-                    FLAGS.isCHECKOVERLAP(),
-                    FLAGS.isRESETCOUNTS(),
-                    FLAGS.isNOPKTCOUNTS(),
-                    FLAGS.isNOBYTCOUNTS()));
+                    FLAGS.getSENDFLOWREM(),
+                    FLAGS.getCHECKOVERLAP(),
+                    FLAGS.getRESETCOUNTS(),
+                    FLAGS.getNOPKTCOUNTS(),
+                    FLAGS.getNOBYTCOUNTS()));
         buffer.writeZero(PADDING);
 
         // Match header
@@ -138,5 +137,4 @@ public class FlowMessageDeserializerTest extends AbstractDeserializerTest {
         assertEquals(PopPbbActionCase.class, applyActions.getApplyActions().nonnullAction().values().iterator().next()
                 .getAction().implementedInterface());
     }
-
 }
index c0268b652db0b7e77d6ed178f3164a94a6cb31c5..b9fc87139e4cc19fa97d120f157e820efd2d8a64 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.deserialization.messages;
 
 import static org.junit.Assert.assertEquals;
@@ -81,10 +80,10 @@ public class MeterMessageDeserializerTest extends AbstractDeserializerTest {
 
         assertEquals(message.getXid().intValue(), XID);
         assertEquals(message.getCommand().getIntValue(), COMMAND.getIntValue());
-        assertEquals(message.getFlags().isMeterBurst(), IS_BURST);
-        assertEquals(message.getFlags().isMeterKbps(), IS_KBPS);
-        assertEquals(message.getFlags().isMeterPktps(), IS_PKTPS);
-        assertEquals(message.getFlags().isMeterStats(), IS_STATS);
+        assertEquals(message.getFlags().getMeterBurst(), IS_BURST);
+        assertEquals(message.getFlags().getMeterKbps(), IS_KBPS);
+        assertEquals(message.getFlags().getMeterPktps(), IS_PKTPS);
+        assertEquals(message.getFlags().getMeterStats(), IS_STATS);
         assertEquals(message.getMeterId().getValue().intValue(), ID);
 
         final Map<MeterBandHeaderKey, MeterBandHeader> meterBandHeader =
@@ -95,7 +94,7 @@ public class MeterMessageDeserializerTest extends AbstractDeserializerTest {
         // Drop band
         final MeterBandHeader dropHeader = meterBandHeaderIt.next();
         assertEquals(Drop.class, dropHeader.getBandType().implementedInterface());
-        assertTrue(dropHeader.getMeterBandTypes().getFlags().isOfpmbtDrop());
+        assertTrue(dropHeader.getMeterBandTypes().getFlags().getOfpmbtDrop());
 
         final Drop drop = (Drop) dropHeader.getBandType();
         assertEquals(DROP_RATE, drop.getDropRate().intValue());
@@ -104,7 +103,7 @@ public class MeterMessageDeserializerTest extends AbstractDeserializerTest {
         // Dscp band
         final MeterBandHeader dscpHeader = meterBandHeaderIt.next();
         assertEquals(DscpRemark.class, dscpHeader.getBandType().implementedInterface());
-        assertTrue(dscpHeader.getMeterBandTypes().getFlags().isOfpmbtDscpRemark());
+        assertTrue(dscpHeader.getMeterBandTypes().getFlags().getOfpmbtDscpRemark());
 
         final DscpRemark dscpRemark = (DscpRemark) dscpHeader.getBandType();
         assertEquals(DSCP_RATE, dscpRemark.getDscpRemarkRate().intValue());
@@ -112,5 +111,4 @@ public class MeterMessageDeserializerTest extends AbstractDeserializerTest {
 
         assertEquals(buffer.readableBytes(), 0);
     }
-
 }
index 230d2fd7e7b0ede5ca99849cd2fb98c6194d43c6..26764fd332e66cf64235a8b98e6d94762645f36a 100644 (file)
@@ -106,28 +106,28 @@ public class PortMessageDeserializerTest extends AbstractDeserializerTest {
         assertEquals(ADDRESS.getValue(), message.getHardwareAddress().getValue());
 
         // Config
-        assertEquals(IS_PORTDOWN, message.getConfiguration().isPORTDOWN());
-        assertEquals(IS_NORECV, message.getConfiguration().isNORECV());
-        assertEquals(IS_NOFWD, message.getConfiguration().isNOFWD());
-        assertEquals(IS_NOPACKETIN, message.getConfiguration().isNOPACKETIN());
+        assertEquals(IS_PORTDOWN, message.getConfiguration().getPORTDOWN());
+        assertEquals(IS_NORECV, message.getConfiguration().getNORECV());
+        assertEquals(IS_NOFWD, message.getConfiguration().getNOFWD());
+        assertEquals(IS_NOPACKETIN, message.getConfiguration().getNOPACKETIN());
 
         // Features
-        assertEquals(IS_10MBHD, message.getAdvertisedFeatures().isTenMbHd());
-        assertEquals(IS_10MBFD, message.getAdvertisedFeatures().isTenMbHd());
-        assertEquals(IS_100MBHD, message.getAdvertisedFeatures().isHundredMbHd());
-        assertEquals(IS_100MBFD, message.getAdvertisedFeatures().isHundredMbFd());
-        assertEquals(IS_1GBHD, message.getAdvertisedFeatures().isOneGbHd());
-        assertEquals(IS_1GBFD, message.getAdvertisedFeatures().isOneGbFd());
-        assertEquals(IS_10GBFD, message.getAdvertisedFeatures().isTenGbFd());
-        assertEquals(IS_40GBFD, message.getAdvertisedFeatures().isFortyGbFd());
-        assertEquals(IS_100GBFD, message.getAdvertisedFeatures().isHundredGbFd());
-        assertEquals(IS_1TBFD, message.getAdvertisedFeatures().isOneTbFd());
-        assertEquals(IS_OTHER, message.getAdvertisedFeatures().isOther());
-        assertEquals(IS_COPPER, message.getAdvertisedFeatures().isCopper());
-        assertEquals(IS_FIBER, message.getAdvertisedFeatures().isFiber());
-        assertEquals(IS_AUTOENG, message.getAdvertisedFeatures().isAutoeng());
-        assertEquals(IS_PAUSE, message.getAdvertisedFeatures().isPause());
-        assertEquals(IS_PAUSE_ASYM, message.getAdvertisedFeatures().isPauseAsym());
+        assertEquals(IS_10MBHD, message.getAdvertisedFeatures().getTenMbHd());
+        assertEquals(IS_10MBFD, message.getAdvertisedFeatures().getTenMbHd());
+        assertEquals(IS_100MBHD, message.getAdvertisedFeatures().getHundredMbHd());
+        assertEquals(IS_100MBFD, message.getAdvertisedFeatures().getHundredMbFd());
+        assertEquals(IS_1GBHD, message.getAdvertisedFeatures().getOneGbHd());
+        assertEquals(IS_1GBFD, message.getAdvertisedFeatures().getOneGbFd());
+        assertEquals(IS_10GBFD, message.getAdvertisedFeatures().getTenGbFd());
+        assertEquals(IS_40GBFD, message.getAdvertisedFeatures().getFortyGbFd());
+        assertEquals(IS_100GBFD, message.getAdvertisedFeatures().getHundredGbFd());
+        assertEquals(IS_1TBFD, message.getAdvertisedFeatures().getOneTbFd());
+        assertEquals(IS_OTHER, message.getAdvertisedFeatures().getOther());
+        assertEquals(IS_COPPER, message.getAdvertisedFeatures().getCopper());
+        assertEquals(IS_FIBER, message.getAdvertisedFeatures().getFiber());
+        assertEquals(IS_AUTOENG, message.getAdvertisedFeatures().getAutoeng());
+        assertEquals(IS_PAUSE, message.getAdvertisedFeatures().getPause());
+        assertEquals(IS_PAUSE_ASYM, message.getAdvertisedFeatures().getPauseAsym());
 
         assertEquals(buffer.readableBytes(), 0);
     }
index 4feb681327df12559599cbb1d4e39747217912c8..ab76ae6d7bfa834e732ce0a4f4d86ccc42d33017 100644 (file)
@@ -68,11 +68,11 @@ public class MultipartReplyFlowStatsDeserializerTest extends AbstractMultipartDe
         buffer.writeShort(IDLE_TIMEOUT);
         buffer.writeShort(HARD_TIMEOUT);
         buffer.writeShort(ByteBufUtils.fillBitMask(0,
-                FLAGS.isSENDFLOWREM(),
-                FLAGS.isCHECKOVERLAP(),
-                FLAGS.isRESETCOUNTS(),
-                FLAGS.isNOPKTCOUNTS(),
-                FLAGS.isNOBYTCOUNTS()));
+                FLAGS.getSENDFLOWREM(),
+                FLAGS.getCHECKOVERLAP(),
+                FLAGS.getRESETCOUNTS(),
+                FLAGS.getNOPKTCOUNTS(),
+                FLAGS.getNOBYTCOUNTS()));
         buffer.writeZero(PADDING_IN_FLOW_STATS_HEADER_02);
         buffer.writeLong(COOKIE);
         buffer.writeLong(PACKET_COUNT);
index 96f018d6be588b2d31e4f47d1cddc4ebcb0aa277..7404e19649c8628c86a12ac6824559cc8d05cab7 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart;
 
 import static org.junit.Assert.assertEquals;
@@ -61,6 +60,7 @@ public class MultipartReplyMessageDeserializerTest extends AbstractDeserializerT
 
     @Override
     protected void init() {
+        // No-op
     }
 
     @Test
@@ -82,11 +82,11 @@ public class MultipartReplyMessageDeserializerTest extends AbstractDeserializerT
         buffer.writeShort(IDLE_TIMEOUT);
         buffer.writeShort(HARD_TIMEOUT);
         buffer.writeShort(ByteBufUtils.fillBitMask(0,
-                FLAGS.isSENDFLOWREM(),
-                FLAGS.isCHECKOVERLAP(),
-                FLAGS.isRESETCOUNTS(),
-                FLAGS.isNOPKTCOUNTS(),
-                FLAGS.isNOBYTCOUNTS()));
+                FLAGS.getSENDFLOWREM(),
+                FLAGS.getCHECKOVERLAP(),
+                FLAGS.getRESETCOUNTS(),
+                FLAGS.getNOPKTCOUNTS(),
+                FLAGS.getNOBYTCOUNTS()));
         buffer.writeZero(PADDING_IN_FLOW_STATS_HEADER_02);
         buffer.writeLong(COOKIE);
         buffer.writeLong(PACKET_COUNT);
index a88d54d031e29bea8613861b93815ba378e7a47e..67bdf95d7d586e6cd6a0c17b9b6c051672ed9048 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart;
 
 import static org.junit.Assert.assertEquals;
@@ -88,10 +87,10 @@ public class MultipartReplyMeterConfigDeserializerTest extends AbstractMultipart
     private static void writeCommonAtributes(final ByteBuf buffer) {
         buffer.writeShort(ITEM_LENGTH);
         buffer.writeShort(ByteBufUtils.fillBitMask(0,
-                FLAGS.isMeterKbps(),
-                FLAGS.isMeterPktps(),
-                FLAGS.isMeterBurst(),
-                FLAGS.isMeterStats()));
+                FLAGS.getMeterKbps(),
+                FLAGS.getMeterPktps(),
+                FLAGS.getMeterBurst(),
+                FLAGS.getMeterStats()));
         buffer.writeInt(METER_ID);
     }
 }
\ No newline at end of file
index b1ed1ececc9ca2ee9ad9480bf8e30ef4e406787c..7cdc740db845393070371c589382bb98bdc72837 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.deserialization.multipart;
 
 import static org.junit.Assert.assertEquals;
@@ -20,6 +19,7 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.multipart.reply.multipart.reply.body.MultipartReplyPortDesc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.multipart.reply.multipart.reply.body.multipart.reply.port.desc.Ports;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 
 public class MultipartReplyPortDescDeserializerTest extends AbstractMultipartDeserializerTest {
@@ -74,30 +74,30 @@ public class MultipartReplyPortDescDeserializerTest extends AbstractMultipartDes
         buffer.writeZero(EncodeConstants.MAX_PORT_NAME_LENGTH);
 
         Map<Integer, Boolean> portMap = new HashMap<>();
-        portMap.put(0, PORT_CONFIG.isPORTDOWN());
-        portMap.put(2, PORT_CONFIG.isNORECV());
-        portMap.put(5, PORT_CONFIG.isNOFWD());
-        portMap.put(6, PORT_CONFIG.isNOPACKETIN());
+        portMap.put(0, PORT_CONFIG.getPORTDOWN());
+        portMap.put(2, PORT_CONFIG.getNORECV());
+        portMap.put(5, PORT_CONFIG.getNOFWD());
+        portMap.put(6, PORT_CONFIG.getNOPACKETIN());
 
         buffer.writeInt(ByteBufUtils.fillBitMaskFromMap(portMap));
         buffer.writeInt(ByteBufUtils.fillBitMask(0, PS_BLOCKED, PS_LINK_DOWN, PS_LIVE));
         buffer.writeInt(ByteBufUtils.fillBitMask(0,
-                CURRENT_FEATURE.isTenMbHd(),
-                CURRENT_FEATURE.isTenMbFd(),
-                CURRENT_FEATURE.isHundredMbHd(),
-                CURRENT_FEATURE.isHundredMbFd(),
-                CURRENT_FEATURE.isOneGbHd(),
-                CURRENT_FEATURE.isOneGbFd(),
-                CURRENT_FEATURE.isTenGbFd(),
-                CURRENT_FEATURE.isFortyGbFd(),
-                CURRENT_FEATURE.isHundredGbFd(),
-                CURRENT_FEATURE.isOneTbFd(),
-                CURRENT_FEATURE.isOther(),
-                CURRENT_FEATURE.isFiber(),
-                CURRENT_FEATURE.isAutoeng(),
-                CURRENT_FEATURE.isCopper(),
-                CURRENT_FEATURE.isPause(),
-                CURRENT_FEATURE.isPauseAsym()));
+                CURRENT_FEATURE.getTenMbHd(),
+                CURRENT_FEATURE.getTenMbFd(),
+                CURRENT_FEATURE.getHundredMbHd(),
+                CURRENT_FEATURE.getHundredMbFd(),
+                CURRENT_FEATURE.getOneGbHd(),
+                CURRENT_FEATURE.getOneGbFd(),
+                CURRENT_FEATURE.getTenGbFd(),
+                CURRENT_FEATURE.getFortyGbFd(),
+                CURRENT_FEATURE.getHundredGbFd(),
+                CURRENT_FEATURE.getOneTbFd(),
+                CURRENT_FEATURE.getOther(),
+                CURRENT_FEATURE.getFiber(),
+                CURRENT_FEATURE.getAutoeng(),
+                CURRENT_FEATURE.getCopper(),
+                CURRENT_FEATURE.getPause(),
+                CURRENT_FEATURE.getPauseAsym()));
         buffer.writeInt(ADVERTISED_FEATURE);
         buffer.writeInt(SUPPORTED_FEATURE);
         buffer.writeInt(PEER_FEATURES);
@@ -105,15 +105,16 @@ public class MultipartReplyPortDescDeserializerTest extends AbstractMultipartDes
         buffer.writeInt(MAXIMUM_SPEED);
 
         final MultipartReplyPortDesc reply = (MultipartReplyPortDesc) deserializeMultipart(buffer);
-        assertEquals(PORT_NUMBER, reply.getPorts().get(0).getPortNumber().getUint32().intValue());
-        assertEquals("01:02:03:04:05:06", reply.getPorts().get(0).getHardwareAddress().getValue());
-        assertEquals(PORT_CONFIG, reply.getPorts().get(0).getConfiguration());
-        assertEquals(PS_BLOCKED, reply.getPorts().get(0).getState().isBlocked());
-        assertEquals(PS_LINK_DOWN, reply.getPorts().get(0).getState().isLinkDown());
-        assertEquals(PS_LIVE, reply.getPorts().get(0).getState().isLive());
-        assertEquals(CURRENT_FEATURE, reply.getPorts().get(0).getCurrentFeature());
-        assertEquals(CURRENT_SPEED, reply.getPorts().get(0).getCurrentSpeed().intValue());
-        assertEquals(MAXIMUM_SPEED, reply.getPorts().get(0).getMaximumSpeed().intValue());
+        final Ports ports = reply.nonnullPorts().get(0);
+        assertEquals(PORT_NUMBER, ports.getPortNumber().getUint32().intValue());
+        assertEquals("01:02:03:04:05:06", ports.getHardwareAddress().getValue());
+        assertEquals(PORT_CONFIG, ports.getConfiguration());
+        assertEquals(PS_BLOCKED, ports.getState().getBlocked());
+        assertEquals(PS_LINK_DOWN, ports.getState().getLinkDown());
+        assertEquals(PS_LIVE, ports.getState().getLive());
+        assertEquals(CURRENT_FEATURE, ports.getCurrentFeature());
+        assertEquals(CURRENT_SPEED, ports.getCurrentSpeed().intValue());
+        assertEquals(MAXIMUM_SPEED, ports.getMaximumSpeed().intValue());
     }
 
     @Override
index f078245ce6f8f4c612f97c38c06ba1f47dd0c030..dcc402e6cb6f35c2f623aa723c5af0a84088c378 100644 (file)
@@ -7,9 +7,12 @@
  */
 package org.opendaylight.openflowplugin.impl.services.batch;
 
-import com.google.common.collect.Lists;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Iterator;
-import org.junit.Assert;
+import java.util.List;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.batch.batch.choice.flat.batch.add.flow._case.FlatBatchAddFlow;
@@ -39,6 +42,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -58,17 +62,15 @@ public class FlatBatchFlowAdaptersTest {
     public void testAdaptFlatBatchAddFlow() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_ADD);
         planStep.setBarrierAfter(true);
-        planStep.getTaskBag().addAll(Lists.newArrayList(
-                createAddFlowBatch(Uint16.ONE),
-                createAddFlowBatch(Uint16.TWO)));
+        planStep.getTaskBag().addAll(List.of(createAddFlowBatch(Uint16.ONE), createAddFlowBatch(Uint16.TWO)));
 
         final AddFlowsBatchInput addFlowsBatchInput = FlatBatchFlowAdapters.adaptFlatBatchAddFlow(planStep, NODE_REF);
         Iterator<BatchAddFlows> iterator = addFlowsBatchInput.nonnullBatchAddFlows().values().iterator();
 
-        Assert.assertTrue(addFlowsBatchInput.isBarrierAfter());
-        Assert.assertEquals(2, addFlowsBatchInput.getBatchAddFlows().size());
-        Assert.assertEquals("1", iterator.next().getFlowId().getValue());
-        Assert.assertEquals("2", iterator.next().getFlowId().getValue());
+        assertTrue(addFlowsBatchInput.getBarrierAfter());
+        assertEquals(2, addFlowsBatchInput.getBatchAddFlows().size());
+        assertEquals("1", iterator.next().getFlowId().getValue());
+        assertEquals("2", iterator.next().getFlowId().getValue());
     }
 
     private static FlatBatchAddFlow createAddFlowBatch(final Uint16 flowIdValue) {
@@ -96,36 +98,32 @@ public class FlatBatchFlowAdaptersTest {
     public void testAdaptFlatBatchRemoveFlow() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_REMOVE);
         planStep.setBarrierAfter(true);
-        planStep.getTaskBag().addAll(Lists.newArrayList(
-                createRemoveFlowBatch(Uint16.ONE),
-                createRemoveFlowBatch(Uint16.TWO)));
+        planStep.getTaskBag().addAll(List.of(createRemoveFlowBatch(Uint16.ONE), createRemoveFlowBatch(Uint16.TWO)));
 
         final RemoveFlowsBatchInput removeFlowsBatchInput =
                 FlatBatchFlowAdapters.adaptFlatBatchRemoveFlow(planStep, NODE_REF);
         Iterator<BatchRemoveFlows> iterator = removeFlowsBatchInput.nonnullBatchRemoveFlows().values().iterator();
 
-        Assert.assertTrue(removeFlowsBatchInput.isBarrierAfter());
-        Assert.assertEquals(2, removeFlowsBatchInput.getBatchRemoveFlows().size());
-        Assert.assertEquals("1", iterator.next().getFlowId().getValue());
-        Assert.assertEquals("2", iterator.next().getFlowId().getValue());
+        assertTrue(removeFlowsBatchInput.getBarrierAfter());
+        assertEquals(2, removeFlowsBatchInput.getBatchRemoveFlows().size());
+        assertEquals("1", iterator.next().getFlowId().getValue());
+        assertEquals("2", iterator.next().getFlowId().getValue());
     }
 
     @Test
     public void testAdaptFlatBatchUpdateFlow() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_UPDATE);
         planStep.setBarrierAfter(true);
-        planStep.getTaskBag().addAll(Lists.newArrayList(
-                createUpdateFlowBatch(Uint16.ONE),
-                createUpdateFlowBatch(Uint16.TWO)));
+        planStep.getTaskBag().addAll(List.of(createUpdateFlowBatch(Uint16.ONE), createUpdateFlowBatch(Uint16.TWO)));
 
         final UpdateFlowsBatchInput updateFlowsBatchInput =
                 FlatBatchFlowAdapters.adaptFlatBatchUpdateFlow(planStep, NODE_REF);
         Iterator<BatchUpdateFlows> iterator = updateFlowsBatchInput.nonnullBatchUpdateFlows().values().iterator();
 
-        Assert.assertTrue(updateFlowsBatchInput.isBarrierAfter());
-        Assert.assertEquals(2, updateFlowsBatchInput.getBatchUpdateFlows().size());
-        Assert.assertEquals("1", iterator.next().getFlowId().getValue());
-        Assert.assertEquals("2", iterator.next().getFlowId().getValue());
+        assertTrue(updateFlowsBatchInput.getBarrierAfter());
+        assertEquals(2, updateFlowsBatchInput.getBatchUpdateFlows().size());
+        assertEquals("1", iterator.next().getFlowId().getValue());
+        assertEquals("2", iterator.next().getFlowId().getValue());
     }
 
     @Test
@@ -133,7 +131,7 @@ public class FlatBatchFlowAdaptersTest {
         final RpcResult<BatchFlowOutputListGrouping> input = RpcResultBuilder.<BatchFlowOutputListGrouping>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-flowError")
                 .withResult(new AddFlowsBatchOutputBuilder()
-                        .setBatchFailedFlowsOutput(Lists.newArrayList(
+                        .setBatchFailedFlowsOutput(BindingMap.ordered(
                                 createBatchFailedFlowsOutput(Uint16.ZERO, "f1"),
                                 createBatchFailedFlowsOutput(Uint16.ONE, "f2")
                         ))
@@ -142,16 +140,16 @@ public class FlatBatchFlowAdaptersTest {
 
         final RpcResult<ProcessFlatBatchOutput> rpcResult = FlatBatchFlowAdapters
                 .convertBatchFlowResult(3).apply(input);
-        Iterator<BatchFailure> iterator = rpcResult.getResult().nonnullBatchFailure().values().iterator();
 
-        Assert.assertFalse(rpcResult.isSuccessful());
-        Assert.assertEquals(1, rpcResult.getErrors().size());
-        Assert.assertEquals(2, rpcResult.getResult().getBatchFailure().size());
-        Assert.assertEquals(3, iterator.next()
+        assertFalse(rpcResult.isSuccessful());
+        assertEquals(1, rpcResult.getErrors().size());
+        assertEquals(2, rpcResult.getResult().getBatchFailure().size());
+        Iterator<BatchFailure> iterator = rpcResult.getResult().nonnullBatchFailure().values().iterator();
+        assertEquals(3, iterator.next()
                 .getBatchOrder().intValue());
         BatchFailure secondBatchFailure = iterator.next();
-        Assert.assertEquals(4, secondBatchFailure.getBatchOrder().intValue());
-        Assert.assertEquals("f2",
+        assertEquals(4, secondBatchFailure.getBatchOrder().intValue());
+        assertEquals("f2",
                 ((FlatBatchFailureFlowIdCase) secondBatchFailure.getBatchItemIdChoice())
                         .getFlowId().getValue());
     }
@@ -165,9 +163,9 @@ public class FlatBatchFlowAdaptersTest {
         final RpcResult<ProcessFlatBatchOutput> rpcResult = FlatBatchFlowAdapters
                 .convertBatchFlowResult(0).apply(input);
 
-        Assert.assertTrue(rpcResult.isSuccessful());
-        Assert.assertEquals(0, rpcResult.getErrors().size());
-        Assert.assertEquals(0, rpcResult.getResult().nonnullBatchFailure().size());
+        assertTrue(rpcResult.isSuccessful());
+        assertEquals(0, rpcResult.getErrors().size());
+        assertEquals(0, rpcResult.getResult().nonnullBatchFailure().size());
     }
 
     private static BatchFailedFlowsOutput createBatchFailedFlowsOutput(final Uint16 batchOrder,
index 76869647002162deec3cbf6061676b7afb3fc7ce..8c76dc0105dab90983227ff85cebca42c7f82592 100644 (file)
@@ -40,6 +40,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -68,7 +69,7 @@ public class FlatBatchGroupAdaptersTest {
                 FlatBatchGroupAdapters.adaptFlatBatchAddGroup(planStep, NODE_REF);
         Iterator<BatchAddGroups> iterator = addGroupsBatchInput.nonnullBatchAddGroups().values().iterator();
 
-        Assert.assertTrue(addGroupsBatchInput.isBarrierAfter());
+        Assert.assertTrue(addGroupsBatchInput.getBarrierAfter());
         Assert.assertEquals(2, addGroupsBatchInput.getBatchAddGroups().size());
         Assert.assertEquals(1L, iterator.next().getGroupId().getValue().longValue());
         Assert.assertEquals(2L, iterator.next().getGroupId().getValue().longValue());
@@ -112,7 +113,7 @@ public class FlatBatchGroupAdaptersTest {
                 FlatBatchGroupAdapters.adaptFlatBatchRemoveGroup(planStep, NODE_REF);
         Iterator<BatchRemoveGroups> iterator = removeGroupsBatchInput.nonnullBatchRemoveGroups().values().iterator();
 
-        Assert.assertTrue(removeGroupsBatchInput.isBarrierAfter());
+        Assert.assertTrue(removeGroupsBatchInput.getBarrierAfter());
         Assert.assertEquals(2, removeGroupsBatchInput.getBatchRemoveGroups().size());
         Assert.assertEquals(1L, iterator.next().getGroupId().getValue().longValue());
         Assert.assertEquals(2L, iterator.next().getGroupId().getValue().longValue());
@@ -129,7 +130,7 @@ public class FlatBatchGroupAdaptersTest {
         final UpdateGroupsBatchInput updateGroupsBatchInput =
                 FlatBatchGroupAdapters.adaptFlatBatchUpdateGroup(planStep, NODE_REF);
 
-        Assert.assertTrue(updateGroupsBatchInput.isBarrierAfter());
+        Assert.assertTrue(updateGroupsBatchInput.getBarrierAfter());
         Assert.assertEquals(2, updateGroupsBatchInput.getBatchUpdateGroups().size());
         Assert.assertEquals(1L, updateGroupsBatchInput.getBatchUpdateGroups().get(0)
                 .getUpdatedBatchedGroup().getGroupId().getValue().longValue());
@@ -142,7 +143,7 @@ public class FlatBatchGroupAdaptersTest {
         final RpcResult<BatchGroupOutputListGrouping> input = RpcResultBuilder.<BatchGroupOutputListGrouping>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-groupError")
                 .withResult(new AddGroupsBatchOutputBuilder()
-                        .setBatchFailedGroupsOutput(Lists.newArrayList(
+                        .setBatchFailedGroupsOutput(BindingMap.ordered(
                                 createBatchFailedGroupsOutput(Uint16.ZERO, Uint32.ONE),
                                 createBatchFailedGroupsOutput(Uint16.ONE, Uint32.TWO)
                         ))
index 38fc7489758afe1dbcd3b428bba0aef0e016d3b9..c4e5ec1cca36c5ca4370f78856aaac0367bb8097 100644 (file)
@@ -40,6 +40,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.meters.service.rev160316.ba
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meters.service.rev160316.batch.meter.output.list.grouping.BatchFailedMetersOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meters.service.rev160316.remove.meters.batch.input.BatchRemoveMeters;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -67,7 +68,7 @@ public class FlatBatchMeterAdaptersTest {
         final AddMetersBatchInput addMetersBatchInput =
                 FlatBatchMeterAdapters.adaptFlatBatchAddMeter(planStep, NODE_REF);
 
-        Assert.assertTrue(addMetersBatchInput.isBarrierAfter());
+        Assert.assertTrue(addMetersBatchInput.getBarrierAfter());
         Assert.assertEquals(2, addMetersBatchInput.nonnullBatchAddMeters().size());
         final Iterator<BatchAddMeters> it = addMetersBatchInput.nonnullBatchAddMeters().values().iterator();
 
@@ -113,7 +114,7 @@ public class FlatBatchMeterAdaptersTest {
                 FlatBatchMeterAdapters.adaptFlatBatchRemoveMeter(planStep, NODE_REF);
         Iterator<BatchRemoveMeters> iterator = removeMetersBatchInput.nonnullBatchRemoveMeters().values().iterator();
 
-        Assert.assertTrue(removeMetersBatchInput.isBarrierAfter());
+        Assert.assertTrue(removeMetersBatchInput.getBarrierAfter());
         Assert.assertEquals(2, removeMetersBatchInput.nonnullBatchRemoveMeters().size());
         Assert.assertEquals(1L, iterator.next().getMeterId().getValue().longValue());
         Assert.assertEquals(2L, iterator.next().getMeterId().getValue().longValue());
@@ -130,7 +131,7 @@ public class FlatBatchMeterAdaptersTest {
         final UpdateMetersBatchInput updateMetersBatchInput =
                 FlatBatchMeterAdapters.adaptFlatBatchUpdateMeter(planStep, NODE_REF);
 
-        Assert.assertTrue(updateMetersBatchInput.isBarrierAfter());
+        Assert.assertTrue(updateMetersBatchInput.getBarrierAfter());
         Assert.assertEquals(2, updateMetersBatchInput.getBatchUpdateMeters().size());
         Assert.assertEquals(1L, updateMetersBatchInput.getBatchUpdateMeters().get(0)
                 .getUpdatedBatchedMeter().getMeterId().getValue().longValue());
@@ -143,7 +144,7 @@ public class FlatBatchMeterAdaptersTest {
         final RpcResult<BatchMeterOutputListGrouping> input = RpcResultBuilder.<BatchMeterOutputListGrouping>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-meterError")
                 .withResult(new AddMetersBatchOutputBuilder()
-                        .setBatchFailedMetersOutput(Lists.newArrayList(
+                        .setBatchFailedMetersOutput(BindingMap.ordered(
                                 createBatchFailedMetersOutput(Uint16.ZERO, Uint32.ONE),
                                 createBatchFailedMetersOutput(Uint16.ONE, Uint32.TWO)
                         ))
index 2784d22bd64947a41a0f7c3e26c675e825b91405..210ac32a9423c80de6f55bcae1723b6736f0f06d 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.util;
 
 import static org.junit.Assert.assertEquals;
@@ -31,6 +30,6 @@ public class RequestInputUtilsTest {
         assertEquals(version, input.getVersion().toJava());
         assertEquals(xid, input.getXid());
         assertEquals(type, input.getType());
-        assertFalse(input.getFlags().isOFPMPFREQMORE());
+        assertFalse(input.getFlags().getOFPMPFREQMORE());
     }
 }
\ No newline at end of file
index 9f465c417d50546d6352f0c384b3e3f19f5cd876..aee1e8c0b2cf7c266ce2119b3b6a8beba39a161d 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.statistics;
 
 import static com.google.common.util.concurrent.Futures.immediateFuture;
@@ -70,12 +69,12 @@ public class StatisticsContextImplParamTest extends StatisticsContextImpMockInit
 
     @Before
     public void setUp() {
-        Mockito.when(config.isIsTableStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsFlowStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsGroupStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsMeterStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsPortStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsQueueStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsTableStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsFlowStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsGroupStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsMeterStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsPortStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsQueueStatisticsPollingOn()).thenReturn(true);
         Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(3000)));
         Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(50000)));
     }
index 84827e68aa91db3878992b9b8351902b5f46be65..108b532ae55878e760a6c21754f6dbe08f3563cd 100644 (file)
@@ -56,12 +56,12 @@ public class StatisticsContextImplTest extends StatisticsContextImpMockInitiatio
         convertorManager = ConvertorManagerFactory.createDefaultManager();
         when(mockedDeviceInfo.reserveXidForDeviceMessage()).thenReturn(TEST_XID);
         Mockito.when(mockedDeviceContext.getDeviceState()).thenReturn(mockedDeviceState);
-        Mockito.when(config.isIsTableStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsFlowStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsGroupStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsMeterStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsPortStatisticsPollingOn()).thenReturn(true);
-        Mockito.when(config.isIsQueueStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsTableStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsFlowStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsGroupStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsMeterStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsPortStatisticsPollingOn()).thenReturn(true);
+        Mockito.when(config.getIsQueueStatisticsPollingOn()).thenReturn(true);
         Mockito.when(config.getBasicTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(3000)));
         Mockito.when(config.getMaximumTimerDelay()).thenReturn(new NonZeroUint32Type(Uint32.valueOf(50000)));
 
index 7662b0b51d088963cab23411500e0f8a97f55fc6..1d8c382009b135b5234786555784baf361e9b3e9 100644 (file)
@@ -135,7 +135,7 @@ public class FlatBatchUtilTest {
         checkBarriersBetween(BatchStepType.FLOW_UPDATE, BatchStepType.METER_REMOVE);
     }
 
-    private void checkBarriersBetween(final BatchStepType typeOfFirst, final BatchStepType typeOfSecond) {
+    private static void checkBarriersBetween(final BatchStepType typeOfFirst, final BatchStepType typeOfSecond) {
         final List<Batch> batches = Lists.newArrayList(createBatch(typeOfFirst), createBatch(typeOfSecond));
         final List<BatchPlanStep> batchPlan = FlatBatchUtil.assembleBatchPlan(batches);
         FlatBatchUtil.markBarriersWhereNeeded(batchPlan);
@@ -149,7 +149,7 @@ public class FlatBatchUtilTest {
 
     @Test
     public void testMarkBarriersWhereNeeded_single() {
-        final List<Batch> batches = Lists.newArrayList(
+        final List<Batch> batches = List.of(
                 //general part - no flush required
                 createBatch(BatchStepType.GROUP_REMOVE)
         );
index 3bb435233e1880e79df05ad12640b9edd3642c7e..afcd52eaf6386b113051d86ea70280b09554bdc8 100644 (file)
@@ -29,19 +29,22 @@ import org.opendaylight.yangtools.yang.common.Uint64;
  * Created by Martin Bobak mbobak@cisco.com on 7/29/14.
  */
 public class PortTranslatorUtilTest {
-
     private static final String MAC_ADDRESS = "00:01:02:03:04:05";
-    private static final String NAME = "PortTranslatorTest";
-    private final Boolean[] pfBls
-                = {false, false, false, false, false, false, false, false, false, false, false, false, false, false,
-                   false, false};
-    private final boolean[] pfV10Bls
-            = {false, false, false, false, false, false, false, false, false, false, false, false};
-    private final boolean[] portCfgBools = {false, false, false, false};
-    private final boolean[] portCfgV10bools = {false, false, false, false, false, false, false};
-    private final boolean[] portStateBools = {false, false, false, false};
-    private final Uint32 currentSpeed = Uint32.valueOf(4294967295L);
     private static final Uint32 MAX_SPEED = Uint32.valueOf(4294967295L);
+    private static final String NAME = "PortTranslatorTest";
+
+    private final Boolean[] pfBls = {
+        false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false
+    };
+
+    private final boolean[] pfV10Bls = {
+        false, false, false, false, false, false, false, false, false, false, false, false
+    };
+
+    private final boolean[] portCfgBools = { false, false, false, false };
+    private final boolean[] portCfgV10bools = { false, false, false, false, false, false, false };
+    private final boolean[] portStateBools = { false, false, false, false };
+    private final Uint32 currentSpeed = Uint32.MAX_VALUE;
 
     /**
      * Test  method for
@@ -72,19 +75,14 @@ public class PortTranslatorUtilTest {
      */
     @Test
     public void testTranslatePortFeaturesV10() {
-
-
         for (int i = 0; i < pfV10Bls.length; i++) {
-
             pfV10Bls[i] = true;
             final PortFeaturesV10 apfV10 = getPortFeaturesV10();
             org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures npf
                     = PortTranslatorUtil.translatePortFeatures(apfV10);
             assertEqualsPortFeaturesV10(apfV10, npf);
             pfV10Bls[i] = false;
-
         }
-
     }
 
     private PortFeaturesV10 getPortFeaturesV10() {
@@ -103,7 +101,7 @@ public class PortTranslatorUtilTest {
         Short version = OpenflowVersion.OF10.getVersion();
 
         Uint64 dataPathId = Uint64.ONE;
-        Uint32 portNumber = Uint32.valueOf(4294967295L);
+        Uint32 portNumber = Uint32.MAX_VALUE;
         PortGrouping portGrouping = mockPortGrouping();
 
         NodeConnectorUpdated nodeConnectorUpdated = PortTranslatorUtil
@@ -160,48 +158,45 @@ public class PortTranslatorUtilTest {
     }
 
     private static void assertEqualsPortFeaturesV10(final PortFeaturesV10 apfV10,
-                                                    final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types
-                                                            .port.rev130925.PortFeatures npf) {
-        assertEquals(apfV10.is_100mbFd(), npf.isHundredMbFd());
-        assertEquals(apfV10.is_100mbHd(), npf.isHundredMbHd());
-
-        assertEquals(apfV10.is_10gbFd(), npf.isTenGbFd());
-        assertEquals(apfV10.is_10mbFd(), npf.isTenMbFd());
-        assertEquals(apfV10.is_10mbHd(), npf.isTenMbHd());
-
-        assertEquals(apfV10.is_1gbFd(), npf.isOneGbFd());
-        assertEquals(apfV10.is_1gbHd(), npf.isOneGbHd());
-
-        assertEquals(apfV10.isAutoneg(), npf.isAutoeng());
-        assertEquals(apfV10.isCopper(), npf.isCopper());
-        assertEquals(apfV10.isFiber(), npf.isFiber());
-        assertEquals(apfV10.isPause(), npf.isPause());
-        assertEquals(apfV10.isPauseAsym(), npf.isPauseAsym());
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures npf) {
+        assertEquals(apfV10.get_100mbFd(), npf.getHundredMbFd());
+        assertEquals(apfV10.get_100mbHd(), npf.getHundredMbHd());
+
+        assertEquals(apfV10.get_10gbFd(), npf.getTenGbFd());
+        assertEquals(apfV10.get_10mbFd(), npf.getTenMbFd());
+        assertEquals(apfV10.get_10mbHd(), npf.getTenMbHd());
+
+        assertEquals(apfV10.get_1gbFd(), npf.getOneGbFd());
+        assertEquals(apfV10.get_1gbHd(), npf.getOneGbHd());
+
+        assertEquals(apfV10.getAutoneg(), npf.getAutoeng());
+        assertEquals(apfV10.getCopper(), npf.getCopper());
+        assertEquals(apfV10.getFiber(), npf.getFiber());
+        assertEquals(apfV10.getPause(), npf.getPause());
+        assertEquals(apfV10.getPauseAsym(), npf.getPauseAsym());
     }
 
     private static void assertEqualsPortFeatures(final PortFeatures apf,
-                                                 final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port
-                                                         .rev130925.PortFeatures npf) {
-        assertEquals(apf.is_100gbFd(), npf.isHundredGbFd());
-        assertEquals(apf.is_100mbFd(), npf.isHundredMbFd());
-        assertEquals(apf.is_100mbHd(), npf.isHundredMbHd());
-
-        assertEquals(apf.is_10gbFd(), npf.isTenGbFd());
-        assertEquals(apf.is_10mbFd(), npf.isTenMbFd());
-        assertEquals(apf.is_10mbHd(), npf.isTenMbHd());
-
-        assertEquals(apf.is_1gbFd(), npf.isOneGbFd());
-        assertEquals(apf.is_1gbHd(), npf.isOneGbHd());
-        assertEquals(apf.is_1tbFd(), npf.isOneTbFd());
-
-        assertEquals(apf.is_40gbFd(), npf.isFortyGbFd());
-
-        assertEquals(apf.isAutoneg(), npf.isAutoeng());
-        assertEquals(apf.isCopper(), npf.isCopper());
-        assertEquals(apf.isFiber(), npf.isFiber());
-        assertEquals(apf.isOther(), npf.isOther());
-        assertEquals(apf.isPause(), npf.isPause());
-        assertEquals(apf.isPauseAsym(), npf.isPauseAsym());
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures npf) {
+        assertEquals(apf.get_100gbFd(), npf.getHundredGbFd());
+        assertEquals(apf.get_100mbFd(), npf.getHundredMbFd());
+        assertEquals(apf.get_100mbHd(), npf.getHundredMbHd());
+
+        assertEquals(apf.get_10gbFd(), npf.getTenGbFd());
+        assertEquals(apf.get_10mbFd(), npf.getTenMbFd());
+        assertEquals(apf.get_10mbHd(), npf.getTenMbHd());
+
+        assertEquals(apf.get_1gbFd(), npf.getOneGbFd());
+        assertEquals(apf.get_1gbHd(), npf.getOneGbHd());
+        assertEquals(apf.get_1tbFd(), npf.getOneTbFd());
+
+        assertEquals(apf.get_40gbFd(), npf.getFortyGbFd());
+
+        assertEquals(apf.getAutoneg(), npf.getAutoeng());
+        assertEquals(apf.getCopper(), npf.getCopper());
+        assertEquals(apf.getFiber(), npf.getFiber());
+        assertEquals(apf.getOther(), npf.getOther());
+        assertEquals(apf.getPause(), npf.getPause());
+        assertEquals(apf.getPauseAsym(), npf.getPauseAsym());
     }
-
 }
index b4f715de97a62c7fcd6997f19a31ff037aa5395f..cc7ec2352e8a5a98a243d77147961b0e6f74b952 100644 (file)
@@ -51,7 +51,7 @@ public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>,
     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) {
+            final List<BucketsList> bucketDescStats, final short version) {
         final ActionResponseConvertorData data = new ActionResponseConvertorData(version);
         data.setActionPath(ActionPath.GROUP_DESC_STATS_UPDATED_BUCKET_ACTION);
 
@@ -82,7 +82,7 @@ public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>,
 
                 bucketDesc.setAction(actions);
             } else {
-                bucketDesc.setAction(Collections.emptyList());
+                bucketDesc.setAction(Collections.emptyMap());
             }
 
             bucketDesc.setWeight(bucketDetails.getWeight());
@@ -105,7 +105,7 @@ public class GroupDescStatsResponseConvertor extends Convertor<List<GroupDesc>,
     }
 
     @Override
-    public List<GroupDescStats> convert(List<GroupDesc> source, VersionConvertorData data) {
+    public List<GroupDescStats> convert(final List<GroupDesc> source, final VersionConvertorData data) {
         List<GroupDescStats> convertedSALGroupsDesc = new ArrayList<>();
 
         for (GroupDesc groupDesc : source) {
index a78c6a573a14c011345b789bf51715505a7bbe22..d19caa2eccb513fc72b89a13aab1d4c42966ccc6 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 
 import java.util.ArrayList;
@@ -72,10 +71,9 @@ public class MeterConfigStatsResponseConvertor extends Convertor<List<MeterConfi
             meterConfigStatsBuilder.withKey(new MeterConfigStatsKey(meterConfigStatsBuilder.getMeterId()));
             MeterBandHeadersBuilder meterBandHeadersBuilder = new MeterBandHeadersBuilder();
 
-            MeterFlags meterFlags = new MeterFlags(meterConfig.getFlags().isOFPMFBURST(),
-                    meterConfig.getFlags().isOFPMFKBPS(),
-                    meterConfig.getFlags().isOFPMFPKTPS(),
-                    meterConfig.getFlags().isOFPMFSTATS());
+            MeterFlags meterFlags = new MeterFlags(meterConfig.getFlags().getOFPMFBURST(),
+                    meterConfig.getFlags().getOFPMFKBPS(), meterConfig.getFlags().getOFPMFPKTPS(),
+                    meterConfig.getFlags().getOFPMFSTATS());
 
             meterConfigStatsBuilder.setFlags(meterFlags);
             List<MeterBandHeader> listBandHeaders = new ArrayList<>();
index 7e8735faf1bed5f3a7cc1691305d5a12d3786b88..e68614dacc5c975329f91860bbb1fd6b13fbdab9 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 
 import java.util.ArrayList;
@@ -76,7 +75,7 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
         for (MeterBandHeader meterBandHeader : meterBandHeaders.nonnullMeterBandHeader().values()) {
             // The band types :drop,DSCP_Remark or experimenter.
             if (null != meterBandHeader.getMeterBandTypes() && null != meterBandHeader.getMeterBandTypes().getFlags()) {
-                if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtDrop()) {
+                if (meterBandHeader.getMeterBandTypes().getFlags().getOfpmbtDrop()) {
                     if (meterBandHeader.getBandType() != null) {
                         MeterBandDropBuilder meterBandDropBuilder = new MeterBandDropBuilder();
                         meterBandDropBuilder.setType(MeterBandType.OFPMBTDROP);
@@ -93,7 +92,7 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
                     } else {
                         logBandTypeMissing(MeterBandType.OFPMBTDROP);
                     }
-                } else if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtDscpRemark()) {
+                } else if (meterBandHeader.getMeterBandTypes().getFlags().getOfpmbtDscpRemark()) {
                     if (meterBandHeader.getBandType() != null) {
                         MeterBandDscpRemarkBuilder meterBandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
                         meterBandDscpRemarkBuilder.setType(MeterBandType.OFPMBTDSCPREMARK);
@@ -111,7 +110,7 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
                     } else {
                         logBandTypeMissing(MeterBandType.OFPMBTDSCPREMARK);
                     }
-                } else if (meterBandHeader.getMeterBandTypes().getFlags().isOfpmbtExperimenter()) {
+                } else if (meterBandHeader.getMeterBandTypes().getFlags().getOfpmbtExperimenter()) {
                     if (meterBandHeader.getBandType() != null) {
                         MeterBandExperimenterBuilder meterBandExperimenterBuilder = new MeterBandExperimenterBuilder();
                         meterBandExperimenterBuilder.setType(MeterBandType.OFPMBTEXPERIMENTER);
@@ -164,12 +163,8 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
         }
 
         meterModInputBuilder.setMeterId(new MeterId(source.getMeterId().getValue()));
-
-        if (null != source.getFlags()) {
-            meterModInputBuilder.setFlags(new MeterFlags(source.getFlags().isMeterBurst(), source.getFlags()
-                    .isMeterKbps(), source.getFlags().isMeterPktps(), source.getFlags().isMeterStats()));
-        } else {
-
+        final var sourceFlags = source.getFlags();
+        if (sourceFlags == null) {
             /*
              * As per 0F1.3.1,The rate field indicates the rate value above
              * which the corresponding band may apply to packets (see 5.7.1).
@@ -177,8 +172,10 @@ public class MeterConvertor extends Convertor<Meter, MeterModInputBuilder, Versi
              * includes OFPMF_PKTPS, in which case the rate is in packets per
              * seconds.
              */
-
             meterModInputBuilder.setFlags(new MeterFlags(false, false, true, false));
+        } else {
+            meterModInputBuilder.setFlags(new MeterFlags(sourceFlags.getMeterBurst(), sourceFlags.getMeterKbps(),
+                sourceFlags.getMeterPktps(), sourceFlags.getMeterStats()));
         }
 
         if (source.getMeterBandHeaders() != null) {
index 6ba88b45e4c25a966d93d6135e5781ddf32da423..98c505c369216400cc5681bc487c98f4240d38bc 100644 (file)
@@ -52,63 +52,48 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
      * @param version Openflow version
      * @return default empty port mod input
      */
-    public static PortModInput defaultResult(short version) {
+    public static PortModInput defaultResult(final short version) {
         return new PortModInputBuilder()
                 .setVersion(version)
                 .build();
     }
 
     private static PortConfig maskPortConfigFields(
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig configData) {
-
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig configData) {
         if (configData == null) {
             return null;
         }
-
-        Boolean portDown = configData.isPORTDOWN();
-        Boolean noRecv = configData.isNORECV();
-        Boolean noFwd = configData.isNOFWD();
-        Boolean noPacketIn = configData.isNOPACKETIN();
-
-        return new PortConfig(noFwd, noPacketIn, noRecv, portDown);
-
+        return new PortConfig(configData.getNOFWD(), configData.getNOPACKETIN(), configData.getNORECV(),
+            configData.getPORTDOWN());
     }
 
     private static PortConfigV10 maskPortConfigV10Fields(
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig configData) {
-
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortConfig configData) {
         if (configData == null) {
             return null;
         }
-
-        Boolean portDown = configData.isPORTDOWN();
-        Boolean noRecv = configData.isNORECV();
-        Boolean noFwd = configData.isNOFWD();
-        Boolean noPacketIn = configData.isNOPACKETIN();
-
-        return new PortConfigV10(false, noFwd, noPacketIn, noRecv, true, true, portDown);
+        return new PortConfigV10(false, configData.getNOFWD(), configData.getNOPACKETIN(), configData.getNORECV(), true,
+            true, configData.getPORTDOWN());
 
     }
 
-    private static PortFeatures getPortFeatures(
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortFeatures salPortFeatures) {
-
-        return new PortFeatures(salPortFeatures.isHundredGbFd(), salPortFeatures.isHundredMbFd(),
-                salPortFeatures.isHundredMbHd(), salPortFeatures.isTenGbFd(), salPortFeatures.isTenMbFd(),
-                salPortFeatures.isTenMbHd(), salPortFeatures.isOneGbFd(), salPortFeatures.isOneGbHd(),
-                salPortFeatures.isOneTbFd(), salPortFeatures.isFortyGbFd(), salPortFeatures.isAutoeng(),
-                salPortFeatures.isCopper(), salPortFeatures.isFiber(), salPortFeatures.isOther(),
-                salPortFeatures.isPause(), salPortFeatures.isPauseAsym());
+    private static PortFeatures getPortFeatures(final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port
+            .rev130925.PortFeatures salPortFeatures) {
+        return new PortFeatures(salPortFeatures.getHundredGbFd(), salPortFeatures.getHundredMbFd(),
+                salPortFeatures.getHundredMbHd(), salPortFeatures.getTenGbFd(), salPortFeatures.getTenMbFd(),
+                salPortFeatures.getTenMbHd(), salPortFeatures.getOneGbFd(), salPortFeatures.getOneGbHd(),
+                salPortFeatures.getOneTbFd(), salPortFeatures.getFortyGbFd(), salPortFeatures.getAutoeng(),
+                salPortFeatures.getCopper(), salPortFeatures.getFiber(), salPortFeatures.getOther(),
+                salPortFeatures.getPause(), salPortFeatures.getPauseAsym());
     }
 
-    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());
+    private static PortFeaturesV10 getPortFeaturesV10(final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types
+            .port.rev130925.PortFeatures salPortFeatures) {
+        return new PortFeaturesV10(salPortFeatures.getHundredMbFd(), salPortFeatures.getHundredMbHd(),
+                salPortFeatures.getTenGbFd(), salPortFeatures.getTenMbFd(), salPortFeatures.getTenMbHd(),
+                salPortFeatures.getOneGbFd(), salPortFeatures.getOneGbHd(), salPortFeatures.getAutoeng(),
+                salPortFeatures.getCopper(), salPortFeatures.getFiber(), salPortFeatures.getPause(),
+                salPortFeatures.getPauseAsym());
     }
 
     /**
@@ -120,8 +105,8 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
      */
     @VisibleForTesting
     static Ports toPortDesc(
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.FlowCapablePort source,
-            short version) {
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.FlowCapablePort source,
+            final short version) {
 
         PortsBuilder ofPortDescDataBuilder = new PortsBuilder();
 
@@ -150,14 +135,8 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
     }
 
     private static PortState getPortState(
-            org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortState state) {
-
-        boolean isLinkDown = state.isLinkDown();
-        boolean isBlocked = state.isBlocked();
-        boolean isLive = state.isLive();
-
-        return new PortState(isLinkDown, isBlocked, isLive);
-
+            final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortState state) {
+        return new PortState(state.getLinkDown(), state.getBlocked(), state.getLive());
     }
 
     @Override
@@ -166,7 +145,7 @@ public class PortConvertor extends Convertor<Port, PortModInput, VersionConverto
     }
 
     @Override
-    public PortModInput convert(Port source, VersionConvertorData data) {
+    public PortModInput convert(final Port source, final VersionConvertorData data) {
         PortConfig config = maskPortConfigFields(source.getConfiguration());
         PortConfigV10 configV10 = maskPortConfigV10Fields(source.getConfiguration());
 
index 9943c7071eaa904bbb798b23f087e3d9d79c04cd..02aeaf2c7c0389162d45863c6d71e612d65baa0c 100644 (file)
@@ -607,7 +607,7 @@ public class TableFeaturesConvertor extends Convertor<
             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);
-            setMatchEntry(matchEntryBuilder, ofTableFeatureClass, currMatch.isHasMask());
+            setMatchEntry(matchEntryBuilder, ofTableFeatureClass, currMatch.getHasMask());
             matchEntriesList.add(matchEntryBuilder.build());
         }
 
@@ -649,7 +649,7 @@ public class TableFeaturesConvertor extends Convertor<
             ofTableFeatures.setMaxEntries(salTableFeatures.getMaxEntries());
 
             if (salTableFeatures.getConfig() != null) {
-                ofTableFeatures.setConfig(new TableConfig(salTableFeatures.getConfig().isDEPRECATEDMASK()));
+                ofTableFeatures.setConfig(new TableConfig(salTableFeatures.getConfig().getDEPRECATEDMASK()));
             }
 
             ofTableFeatures.setTableFeatureProperties(toTableProperties(salTableFeatures.getTableProperties()));
index a80080aecd6b2056be72b01505c969f420d0a4bb..a95fbca721eedbe43fa9245a651ad3f7a3608a54 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 
 import com.google.common.collect.ImmutableMap;
@@ -542,7 +541,7 @@ public class TableFeaturesResponseConvertor
             Class<? extends MatchField> ofMatchField = currMatch.getOxmMatchField();
 
             if (setHasMask) {
-                setFieldMatchBuilder.setHasMask(currMatch.isHasMask());
+                setFieldMatchBuilder.setHasMask(currMatch.getHasMask());
             }
 
             setFieldMatchBuilder.setMatchType(OF_TO_SAL_TABLE_FEATURE_PROPERTIES.get(ofMatchField));
@@ -583,7 +582,7 @@ public class TableFeaturesResponseConvertor
             }
 
             if (ofTableFeatures.getConfig() != null) {
-                salTableFeatures.setConfig(new TableConfig(ofTableFeatures.getConfig().isOFPTCDEPRECATEDMASK()));
+                salTableFeatures.setConfig(new TableConfig(ofTableFeatures.getConfig().getOFPTCDEPRECATEDMASK()));
             }
 
             salTableFeatures.setMaxEntries(ofTableFeatures.getMaxEntries());
index 8a0bffd2221acdccb2f8d3dd6abcc9e18f85b6c3..d721674d26d13a48470b244c61275a97193e317b 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;
 
 import com.google.common.base.MoreObjects;
@@ -273,7 +272,7 @@ public class FlowConvertor extends Convertor<Flow, List<FlowModInputBuilder>, Ve
         if (flow instanceof AddFlowInput || flow instanceof UpdatedFlow) {
             flowMod.setCommand(FlowModCommand.OFPFCADD);
         } else if (flow instanceof RemoveFlowInput) {
-            if (MoreObjects.firstNonNull(flow.isStrict(), Boolean.FALSE)) {
+            if (MoreObjects.firstNonNull(flow.getStrict(), Boolean.FALSE)) {
                 flowMod.setCommand(FlowModCommand.OFPFCDELETESTRICT);
             } else {
                 flowMod.setCommand(FlowModCommand.OFPFCDELETE);
@@ -405,7 +404,7 @@ public class FlowConvertor extends Convertor<Flow, List<FlowModInputBuilder>, Ve
             // match on vlan tag or vlanid with no mask
             VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(srcVlanMatch);
             VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
-            vlanIdBuilder.setVlanIdPresent(srcVlanMatch.getVlanId().isVlanIdPresent());
+            vlanIdBuilder.setVlanIdPresent(srcVlanMatch.getVlanId().getVlanIdPresent());
             vlanIdBuilder.setVlanId(srcVlanMatch.getVlanId().getVlanId());
             vlanMatchBuilder.setVlanId(vlanIdBuilder.build());
             Match match = new MatchBuilder(srcMatch).setVlanMatch(vlanMatchBuilder.build()).build();
index 3046d791d6f2fc5d2b055a733d2fdc769d74090e..26f2a09f2311d94498b1e2061edc506dc2bc2c7a 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;
 
 import java.util.Collection;
@@ -23,7 +22,6 @@ public class FlowFlagsConvertor extends Convertor<
     private static final List<Class<?>> TYPES = Collections.singletonList(
             org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags.class);
 
-
     /**
      * Create default empty flow flags
      * Use this method, if result from converter is empty.
@@ -47,7 +45,7 @@ public class FlowFlagsConvertor extends Convertor<
             final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags source,
             final VersionConvertorData data) {
         return new FlowModFlags(
-                source.isCHECKOVERLAP(), source.isNOBYTCOUNTS(), source.isNOPKTCOUNTS(),
-                source.isRESETCOUNTS(), source.isSENDFLOWREM());
+                source.getCHECKOVERLAP(), source.getNOBYTCOUNTS(), source.getNOPKTCOUNTS(),
+                source.getRESETCOUNTS(), source.getSENDFLOWREM());
     }
 }
index f1acaa2a09b1a589c93025541bfd3a5bee645d45..1cffa2ced0552bd10893a1a620569a10ff464e15 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;
 
 import java.util.Collection;
@@ -39,6 +38,6 @@ public class FlowFlagsV10Convertor extends Convertor<FlowModFlags, FlowModFlagsV
     @Override
     public FlowModFlagsV10 convert(final FlowModFlags source, final VersionConvertorData data) {
         return new FlowModFlagsV10(
-                source.isCHECKOVERLAP(), FlowConvertor.DEFAULT_OFPFF_EMERGENCY, source.isSENDFLOWREM());
+                source.getCHECKOVERLAP(), FlowConvertor.DEFAULT_OFPFF_EMERGENCY, source.getSENDFLOWREM());
     }
 }
index 606cb62597f6b6542a0937e1f1c2aea4e8f7dbc2..0bcafffc9808f14ba59049e8af49d37d7d465bb5 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;
 
 import java.util.ArrayList;
@@ -169,11 +168,11 @@ public class FlowStatsResponseConvertor extends Convertor<List<FlowStats>, List<
 
 
                 salFlowStatsBuilder.setFlags(
-                        new FlowModFlags(flowStats.getFlags().isOFPFFCHECKOVERLAP(),
-                                flowStats.getFlags().isOFPFFRESETCOUNTS(),
-                                flowStats.getFlags().isOFPFFNOPKTCOUNTS(),
-                                flowStats.getFlags().isOFPFFNOBYTCOUNTS(),
-                                flowStats.getFlags().isOFPFFSENDFLOWREM()));
+                        new FlowModFlags(flowStats.getFlags().getOFPFFCHECKOVERLAP(),
+                                flowStats.getFlags().getOFPFFRESETCOUNTS(),
+                                flowStats.getFlags().getOFPFFNOPKTCOUNTS(),
+                                flowStats.getFlags().getOFPFFNOBYTCOUNTS(),
+                                flowStats.getFlags().getOFPFFSENDFLOWREM()));
             }
 
             if (flowStats.getInstruction() != null) {
@@ -182,7 +181,7 @@ public class FlowStatsResponseConvertor extends Convertor<List<FlowStats>, List<
                         flowStats.getInstruction(), simpleConvertorData);
 
                 salFlowStatsBuilder.setInstructions(instructions.orElse(new InstructionsBuilder()
-                        .setInstruction(Collections.emptyList()).build()));
+                        .setInstruction(Collections.emptyMap()).build()));
             }
 
             result.add(salFlowStatsBuilder.build());
index b0043ed1a64d0b25ea589099eb41287c17fa5142..37dd868714d9932056ff27f5d66d21d256abfc7d 100644 (file)
@@ -373,7 +373,7 @@ public class MatchConvertor extends Convertor<Match, List<MatchEntry>, VersionCo
             Uint16 vidEntryValue = Uint16.ZERO;
             boolean hasmask = false;
 
-            if (Boolean.TRUE.equals(vlanId.isVlanIdPresent())) {
+            if (Boolean.TRUE.equals(vlanId.getVlanIdPresent())) {
                 setCfiBit = true;
                 if (vlanId.getVlanId() != null) {
                     vidEntryValue = vlanId.getVlanId().getValue();
index 9d569b2476aed451794d9b177d1b33045e2c8490..71a6667f3bce48bf2178ef757918d50a093a5d51 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -51,16 +50,18 @@ public final class MatchConvertorUtil {
      * @return integer containing lower 9 bits filled with corresponding flags
      */
     public static Integer ipv6ExthdrFlagsToInt(final Ipv6ExthdrFlags flags) {
+        // FIXME: this should be 'int'
         Integer bitmap = 0;
-        bitmap |= flags.isNonext() ? 1 : 0;
-        bitmap |= flags.isEsp() ? 1 << 1 : 0;
-        bitmap |= flags.isAuth() ? 1 << 2 : 0;
-        bitmap |= flags.isDest() ? 1 << 3 : 0;
-        bitmap |= flags.isFrag() ? 1 << 4 : 0;
-        bitmap |= flags.isRouter() ? 1 << 5 : 0;
-        bitmap |= flags.isHop() ? 1 << 6 : 0;
-        bitmap |= flags.isUnrep() ? 1 << 7 : 0;
-        bitmap |= flags.isUnseq() ? 1 << 8 : 0;
+        // FIXME: use explicit if (flags) { bitmap |= 1 << 2; }
+        bitmap |= flags.getNonext() ? 1 : 0;
+        bitmap |= flags.getEsp() ? 1 << 1 : 0;
+        bitmap |= flags.getAuth() ? 1 << 2 : 0;
+        bitmap |= flags.getDest() ? 1 << 3 : 0;
+        bitmap |= flags.getFrag() ? 1 << 4 : 0;
+        bitmap |= flags.getRouter() ? 1 << 5 : 0;
+        bitmap |= flags.getHop() ? 1 << 6 : 0;
+        bitmap |= flags.getUnrep() ? 1 << 7 : 0;
+        bitmap |= flags.getUnseq() ? 1 << 8 : 0;
         return bitmap;
     }
 
index ed5bf258c2a84c4bb165b05dc9b0d69824a63a9a..8695bb8b29b083f92fa7466fba41762e5d2931b7 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match;
 
 import java.util.Collection;
@@ -72,31 +71,31 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
         OpenflowVersion ofVersion = OpenflowVersion.get(datapathIdConvertorData.getVersion());
         Uint64 datapathid = datapathIdConvertorData.getDatapathId();
 
-        if (!source.getWildcards().isINPORT() && source.getInPort() != null) {
+        if (!source.getWildcards().getINPORT() && source.getInPort() != null) {
             matchBuilder.setInPort(InventoryDataServiceUtil.nodeConnectorIdfromDatapathPortNo(datapathid,
                     Uint32.valueOf(source.getInPort()), ofVersion));
         }
 
-        if (!source.getWildcards().isDLSRC() && source.getDlSrc() != null) {
+        if (!source.getWildcards().getDLSRC() && source.getDlSrc() != null) {
             EthernetSourceBuilder ethSrcBuilder = new EthernetSourceBuilder();
             ethSrcBuilder.setAddress(source.getDlSrc());
             ethMatchBuilder.setEthernetSource(ethSrcBuilder.build());
             matchBuilder.setEthernetMatch(ethMatchBuilder.build());
         }
-        if (!source.getWildcards().isDLDST() && source.getDlDst() != null) {
+        if (!source.getWildcards().getDLDST() && source.getDlDst() != null) {
             EthernetDestinationBuilder ethDstBuilder = new EthernetDestinationBuilder();
             ethDstBuilder.setAddress(source.getDlDst());
             ethMatchBuilder.setEthernetDestination(ethDstBuilder.build());
             matchBuilder.setEthernetMatch(ethMatchBuilder.build());
         }
-        if (!source.getWildcards().isDLTYPE() && source.getDlType() != null) {
+        if (!source.getWildcards().getDLTYPE() && source.getDlType() != null) {
             EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
             ethTypeBuilder.setType(new org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType(
                     Uint32.valueOf(source.getDlType())));
             ethMatchBuilder.setEthernetType(ethTypeBuilder.build());
             matchBuilder.setEthernetMatch(ethMatchBuilder.build());
         }
-        if (!source.getWildcards().isDLVLAN() && source.getDlVlan() != null) {
+        if (!source.getWildcards().getDLVLAN() && source.getDlVlan() != null) {
             VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
             int vlanId = source.getDlVlan().toJava() == 0xffff ? 0 : source.getDlVlan().toJava();
             vlanIdBuilder.setVlanId(
@@ -105,12 +104,12 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
             vlanMatchBuilder.setVlanId(vlanIdBuilder.build());
             matchBuilder.setVlanMatch(vlanMatchBuilder.build());
         }
-        if (!source.getWildcards().isDLVLANPCP() && source.getDlVlanPcp() != null) {
+        if (!source.getWildcards().getDLVLANPCP() && source.getDlVlanPcp() != null) {
             vlanMatchBuilder.setVlanPcp(new org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp(
                     source.getDlVlanPcp()));
             matchBuilder.setVlanMatch(vlanMatchBuilder.build());
         }
-        if (!source.getWildcards().isDLTYPE() && source.getNwSrc() != null) {
+        if (!source.getWildcards().getDLTYPE() && source.getNwSrc() != null) {
             final Ipv4Prefix prefix;
             if (source.getNwSrcMask() != null) {
                 prefix = IetfInetUtil.INSTANCE.ipv4PrefixFor(source.getNwSrc(), source.getNwSrcMask().toJava());
@@ -126,7 +125,7 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
                 matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
             }
         }
-        if (!source.getWildcards().isDLTYPE() && source.getNwDst() != null) {
+        if (!source.getWildcards().getDLTYPE() && source.getNwDst() != null) {
             final Ipv4Prefix prefix;
             if (source.getNwDstMask() != null) {
                 prefix = IetfInetUtil.INSTANCE.ipv4PrefixFor(source.getNwDst(), source.getNwDstMask().toJava());
@@ -142,7 +141,7 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
                 matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
             }
         }
-        if (!source.getWildcards().isNWPROTO() && source.getNwProto() != null) {
+        if (!source.getWildcards().getNWPROTO() && source.getNwProto() != null) {
             Uint8 nwProto = source.getNwProto();
             ipMatchBuilder.setIpProtocol(nwProto);
             matchBuilder.setIpMatch(ipMatchBuilder.build());
@@ -151,12 +150,12 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
             if (proto == PROTO_TCP) {
                 TcpMatchBuilder tcpMatchBuilder = new TcpMatchBuilder();
                 boolean hasTcp = false;
-                if (!source.getWildcards().isTPSRC() && source.getTpSrc() != null) {
+                if (!source.getWildcards().getTPSRC() && source.getTpSrc() != null) {
                     tcpMatchBuilder.setTcpSourcePort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf
                             .inet.types.rev130715.PortNumber(source.getTpSrc()));
                     hasTcp = true;
                 }
-                if (!source.getWildcards().isTPDST() && source.getTpDst() != null) {
+                if (!source.getWildcards().getTPDST() && source.getTpDst() != null) {
                     tcpMatchBuilder.setTcpDestinationPort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
                             .ietf.inet.types.rev130715.PortNumber(source.getTpDst()));
                     hasTcp = true;
@@ -168,12 +167,12 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
             } else if (proto == PROTO_UDP) {
                 UdpMatchBuilder udpMatchBuilder = new UdpMatchBuilder();
                 boolean hasUdp = false;
-                if (!source.getWildcards().isTPSRC() && source.getTpSrc() != null) {
+                if (!source.getWildcards().getTPSRC() && source.getTpSrc() != null) {
                     udpMatchBuilder.setUdpSourcePort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf
                             .inet.types.rev130715.PortNumber(source.getTpSrc()));
                     hasUdp = true;
                 }
-                if (!source.getWildcards().isTPDST() && source.getTpDst() != null) {
+                if (!source.getWildcards().getTPDST() && source.getTpDst() != null) {
                     udpMatchBuilder.setUdpDestinationPort(new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
                             .ietf.inet.types.rev130715.PortNumber(source.getTpDst()));
                     hasUdp = true;
@@ -185,17 +184,17 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
             } else if (proto == PROTO_ICMPV4) {
                 Icmpv4MatchBuilder icmpv4MatchBuilder = new Icmpv4MatchBuilder();
                 boolean hasIcmpv4 = false;
-                if (!source.getWildcards().isTPSRC()) {
+                if (!source.getWildcards().getTPSRC()) {
                     Uint16 type = source.getTpSrc();
                     if (type != null) {
-                        icmpv4MatchBuilder.setIcmpv4Type(type.shortValue());
+                        icmpv4MatchBuilder.setIcmpv4Type(type.toUint8());
                         hasIcmpv4 = true;
                     }
                 }
-                if (!source.getWildcards().isTPDST()) {
+                if (!source.getWildcards().getTPDST()) {
                     Uint16 code = source.getTpDst();
                     if (code != null) {
-                        icmpv4MatchBuilder.setIcmpv4Code(code.shortValue());
+                        icmpv4MatchBuilder.setIcmpv4Code(code.toUint8());
                         hasIcmpv4 = true;
                     }
                 }
@@ -205,7 +204,7 @@ public class MatchV10ResponseConvertor extends Convertor<MatchV10, MatchBuilder,
                 }
             }
         }
-        if (!source.getWildcards().isNWTOS() && source.getNwTos() != null) {
+        if (!source.getWildcards().getNWTOS() && source.getNwTos() != null) {
             ipMatchBuilder.setIpDscp(new Dscp(ActionUtil.tosToDscp(source.getNwTos())));
             matchBuilder.setIpMatch(ipMatchBuilder.build());
         }
index 0b5a134ba5120272f951e4faf13f49bd6511d2ed..72bb9be91c77d7f1fa1d0857073c02cfda5b0220 100644 (file)
@@ -25,15 +25,15 @@ public class OfToSalMplsBosCase extends ConvertorCase<MplsBosCase, MatchBuilder,
     }
 
     @Override
-    public Optional<MatchBuilder> process(@NonNull MplsBosCase source, MatchResponseConvertorData data,
-            ConvertorExecutor convertorExecutor) {
+    public Optional<MatchBuilder> process(@NonNull final MplsBosCase source, final MatchResponseConvertorData data,
+            final ConvertorExecutor convertorExecutor) {
         final MatchBuilder matchBuilder = data.getMatchBuilder();
         final ProtocolMatchFieldsBuilder protocolMatchFieldsBuilder = data.getProtocolMatchFieldsBuilder();
 
         MplsBos mplsBos = source.getMplsBos();
 
         if (mplsBos != null) {
-            protocolMatchFieldsBuilder.setMplsBos(mplsBos.isBos() ? Uint8.ONE : Uint8.ZERO);
+            protocolMatchFieldsBuilder.setMplsBos(mplsBos.getBos() ? Uint8.ONE : Uint8.ZERO);
             matchBuilder.setProtocolMatchFields(protocolMatchFieldsBuilder.build());
         }
 
index 2cf35fdd4140da7af80e1fbdd631858aade7b104..e8776b36716562c68b6dfe5dc55534af8f180180 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.cases;
 
 import java.util.Optional;
@@ -16,7 +15,6 @@ import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Con
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.data.MatchResponseConvertorData;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.vlan.match.fields.VlanIdBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.VlanVidCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.vlan.vid._case.VlanVid;
@@ -27,19 +25,17 @@ public class OfToSalVlanVidCase extends ConvertorCase<VlanVidCase, MatchBuilder,
     }
 
     @Override
-    public Optional<MatchBuilder> process(@NonNull VlanVidCase source, MatchResponseConvertorData data,
-            ConvertorExecutor convertorExecutor) {
+    public Optional<MatchBuilder> process(@NonNull final VlanVidCase source, final MatchResponseConvertorData data,
+            final ConvertorExecutor convertorExecutor) {
         final MatchBuilder matchBuilder = data.getMatchBuilder();
-        final VlanMatchBuilder vlanMatchBuilder = data.getVlanMatchBuilder();
-
         final VlanVid vlanVid = source.getVlanVid();
-
         if (vlanVid != null) {
-            VlanIdBuilder vlanBuilder = new VlanIdBuilder();
-            vlanBuilder.setVlanId(new VlanId(vlanVid.getVlanVid()));
-            vlanBuilder.setVlanIdPresent(vlanVid.isCfiBit());
-            vlanMatchBuilder.setVlanId(vlanBuilder.build());
-            matchBuilder.setVlanMatch(vlanMatchBuilder.build());
+            matchBuilder.setVlanMatch(data.getVlanMatchBuilder()
+                .setVlanId(new VlanIdBuilder()
+                    .setVlanId(new VlanId(vlanVid.getVlanVid()))
+                    .setVlanIdPresent(vlanVid.getCfiBit())
+                    .build())
+                .build());
         }
 
         return Optional.of(matchBuilder);
index f64830ca584b49c484ea4d07a6e995e73112ceb0..b6a7c4c38dd7a5c6be153039602c3639c3d2cfe0 100644 (file)
@@ -85,10 +85,10 @@ public class MeterConfigStatsResponseConvertorTest {
         int cnt = 0;
         for (MeterConfigStats meterConfigStats: meterConfigs) {
             assertEquals(cnt, meterConfigStats.getMeterId().getValue().toJava());
-            assertTrue(meterConfigStats.getFlags().isMeterBurst());
-            assertFalse(meterConfigStats.getFlags().isMeterKbps());
-            assertTrue(meterConfigStats.getFlags().isMeterPktps());
-            assertFalse(meterConfigStats.getFlags().isMeterStats());
+            assertTrue(meterConfigStats.getFlags().getMeterBurst());
+            assertFalse(meterConfigStats.getFlags().getMeterKbps());
+            assertTrue(meterConfigStats.getFlags().getMeterPktps());
+            assertFalse(meterConfigStats.getFlags().getMeterStats());
 
             cnt++;
         }
index b34f3ba9f2aa8adb28f932d4ab740ae3766c2798..adf3d1dc9440dd49990a4c1845e17df9044ee6b1 100644 (file)
@@ -147,7 +147,7 @@ public class MeterConvertorTest {
         MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
 
         assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
-        assertTrue(outMeterModInput.getFlags().isOFPMFBURST());
+        assertTrue(outMeterModInput.getFlags().getOFPMFBURST());
         assertEquals(Uint32.valueOf(10L), outMeterModInput.getMeterId().getValue());
         // BandInformation starts here:
 
@@ -281,8 +281,8 @@ public class MeterConvertorTest {
         MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
 
         assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
-        assertFalse(outMeterModInput.getFlags().isOFPMFBURST());
-        assertTrue(outMeterModInput.getFlags().isOFPMFPKTPS());
+        assertFalse(outMeterModInput.getFlags().getOFPMFBURST());
+        assertTrue(outMeterModInput.getFlags().getOFPMFPKTPS());
         assertEquals(Uint32.TEN, outMeterModInput.getMeterId().getValue());
         // BandInformation starts here:
 
@@ -341,7 +341,7 @@ public class MeterConvertorTest {
         MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
 
         assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
-        assertTrue(outMeterModInput.getFlags().isOFPMFBURST());
+        assertTrue(outMeterModInput.getFlags().getOFPMFBURST());
         assertEquals(Uint32.valueOf(10L), outMeterModInput.getMeterId().getValue());
     }
 
@@ -423,7 +423,7 @@ public class MeterConvertorTest {
         MeterModInputBuilder outMeterModInput = convert(meterInputCommand, new VersionConvertorData((short) 0X4));
 
         assertEquals(MeterModCommand.OFPMCADD, outMeterModInput.getCommand());
-        assertTrue(outMeterModInput.getFlags().isOFPMFBURST());
+        assertTrue(outMeterModInput.getFlags().getOFPMFBURST());
         assertEquals(Uint32.valueOf(10L), outMeterModInput.getMeterId().getValue());
         // BandInformation starts here:
 
index 6494612a4e89ab74db62b34246b3b46a5c90f558..77b86b6678621fa244a2587a50f4928386d7d06d 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor;
 
 import java.util.ArrayList;
@@ -168,7 +167,7 @@ public class TableFeaturesResponseConvertorTest {
         Assert.assertEquals("Wrong name", "Aloha", feature.getName());
         Assert.assertEquals("Wrong metadata match", Uint64.valueOf("0001020304050607", 16), feature.getMetadataMatch());
         Assert.assertEquals("Wrong metadata write", Uint64.valueOf("08090A0B0C0D0E0F", 16), feature.getMetadataWrite());
-        Assert.assertEquals("Wrong config", false, feature.getConfig().isDEPRECATEDMASK());
+        Assert.assertEquals("Wrong config", false, feature.getConfig().getDEPRECATEDMASK());
         Assert.assertEquals("Wrong max-entries", 42, feature.getMaxEntries().intValue());
         Assert.assertEquals("Wrong properties", 0, feature.getTableProperties().nonnullTableFeatureProperties().size());
     }
@@ -521,7 +520,7 @@ public class TableFeaturesResponseConvertorTest {
         Assert.assertEquals("Wrong name", "Aloha", feature.getName());
         Assert.assertEquals("Wrong metadata match", Uint64.valueOf("0001020304050607", 16), feature.getMetadataMatch());
         Assert.assertEquals("Wrong metadata write",Uint64.valueOf("08090A0B0C0D0E0F", 16), feature.getMetadataWrite());
-        Assert.assertEquals("Wrong config", false, feature.getConfig().isDEPRECATEDMASK());
+        Assert.assertEquals("Wrong config", false, feature.getConfig().getDEPRECATEDMASK());
         Assert.assertEquals("Wrong max-entries", 42, feature.getMaxEntries().intValue());
         Assert.assertEquals("Wrong properties", 4, feature.getTableProperties().nonnullTableFeatureProperties().size());
 
@@ -588,7 +587,7 @@ public class TableFeaturesResponseConvertorTest {
         Assert.assertEquals("Wrong name", "Mahalo", feature.getName());
         Assert.assertEquals("Wrong metadata match", Uint64.valueOf("08090A0B0C0D0E0F", 16), feature.getMetadataMatch());
         Assert.assertEquals("Wrong metadata write", Uint64.valueOf("0001020304050607", 16), feature.getMetadataWrite());
-        Assert.assertEquals("Wrong config", false, feature.getConfig().isDEPRECATEDMASK());
+        Assert.assertEquals("Wrong config", false, feature.getConfig().getDEPRECATEDMASK());
         Assert.assertEquals("Wrong max-entries", 24, feature.getMaxEntries().intValue());
         Assert.assertEquals("Wrong properties", 12, feature.getTableProperties().getTableFeatureProperties().size());
         featProps = feature.getTableProperties().nonnullTableFeatureProperties().values().iterator();
index d2dde2223f800f5ea03a564fb21438e506ffdde4..d090cf83ed6a8ed865bcf30f820678b0b8a8a159 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action;
 
 import java.util.ArrayList;
@@ -545,7 +544,7 @@ public class ActionConvertorV13Test {
                 org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanVid.class, false);
         Assert.assertEquals("Wrong vlan vid", 0, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getVlanVid()
                 .intValue());
-        Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().isCfiBit());
+        Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getCfiBit());
 
         action = actions.get(2);
         Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common"
@@ -643,7 +642,7 @@ public class ActionConvertorV13Test {
         Assert.assertEquals("Wrong vlan id", 22, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid()
                 .getVlanVid().intValue());
         Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid()
-                .isCfiBit());
+                .getCfiBit());
 
         action = actions.get(10);
         setFieldCase = (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping
@@ -674,6 +673,6 @@ public class ActionConvertorV13Test {
             final boolean hasMask) {
         Assert.assertEquals("Wrong oxm class", OpenflowBasicClass.class, entry.getOxmClass());
         Assert.assertEquals("Wrong oxm field", field, entry.getOxmMatchField());
-        Assert.assertEquals("Wrong hasMask", hasMask, entry.isHasMask());
+        Assert.assertEquals("Wrong hasMask", hasMask, entry.getHasMask());
     }
 }
index d0c9c855f24097a3926554d162221d435194b0e4..6964a3bd1b68f27a1aba572c972b9c2d31c38179 100644 (file)
@@ -5,12 +5,12 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.flow;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 import org.junit.Assert;
 import org.junit.Before;
@@ -176,8 +176,7 @@ public class FlowConvertorTest {
         instructionBuilder = new InstructionBuilder();
         WriteActionsCaseBuilder writeCaseBuilder = new WriteActionsCaseBuilder();
         WriteActionsBuilder writeBuilder = new WriteActionsBuilder();
-        List<Action> actions = new ArrayList<>();
-        writeBuilder.setAction(actions);
+        writeBuilder.setAction(Map.of());
         writeCaseBuilder.setWriteActions(writeBuilder.build());
         instructionBuilder.setInstruction(writeCaseBuilder.build());
         instructionBuilder.setOrder(2);
@@ -185,8 +184,7 @@ public class FlowConvertorTest {
         instructionBuilder = new InstructionBuilder();
         ApplyActionsCaseBuilder applyCaseBuilder = new ApplyActionsCaseBuilder();
         ApplyActionsBuilder applyBuilder = new ApplyActionsBuilder();
-        actions = new ArrayList<>();
-        applyBuilder.setAction(actions);
+        applyBuilder.setAction(Map.of());
         applyCaseBuilder.setApplyActions(applyBuilder.build());
         instructionBuilder.setInstruction(applyCaseBuilder.build());
         instructionBuilder.setOrder(3);
@@ -194,8 +192,7 @@ public class FlowConvertorTest {
         instructionBuilder = new InstructionBuilder();
         ClearActionsCaseBuilder clearCaseBuilder = new ClearActionsCaseBuilder();
         ClearActionsBuilder clearBuilder = new ClearActionsBuilder();
-        actions = new ArrayList<>();
-        clearBuilder.setAction(actions);
+        clearBuilder.setAction(Map.of());
         clearCaseBuilder.setClearActions(clearBuilder.build());
         instructionBuilder.setInstruction(clearCaseBuilder.build());
         instructionBuilder.setOrder(4);
index c407a36355ca96ef135a5b30088bd12a14caeeac..1133d67477c9925a4ab520a663e2ef0d57a2bd50 100644 (file)
@@ -7,9 +7,11 @@
  */
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
 import java.util.List;
 import java.util.Optional;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowplugin.api.OFConstants;
@@ -229,113 +231,113 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 24, entries.size());
+        assertEquals("Wrong entries size", 24, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, InPort.class, false);
-        Assert.assertEquals("Wrong in port", 1, ((InPortCase) entry.getMatchEntryValue()).getInPort()
+        assertEquals("Wrong in port", 1, ((InPortCase) entry.getMatchEntryValue()).getInPort()
                 .getPortNumber().getValue().intValue());
 
         entry = entries.get(1);
         checkEntryHeader(entry, InPhyPort.class, false);
-        Assert.assertEquals("Wrong in phy port", 2, ((InPhyPortCase) entry.getMatchEntryValue())
+        assertEquals("Wrong in phy port", 2, ((InPhyPortCase) entry.getMatchEntryValue())
                 .getInPhyPort().getPortNumber().getValue().intValue());
 
         entry = entries.get(2);
         checkEntryHeader(entry, Metadata.class, false);
-        Assert.assertArrayEquals("Wrong metadata", new byte[]{0, 0, 0, 0, 0, 0, 0, 3},
+        assertArrayEquals("Wrong metadata", new byte[]{0, 0, 0, 0, 0, 0, 0, 3},
                 ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
         entry = entries.get(3);
         checkEntryHeader(entry, EthDst.class, false);
-        Assert.assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"),
+        assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"),
                 ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMacAddress());
         entry = entries.get(4);
         checkEntryHeader(entry, EthSrc.class, false);
-        Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"),
+        assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"),
                 ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMacAddress());
         entry = entries.get(5);
         checkEntryHeader(entry, EthType.class, false);
-        Assert.assertEquals("Wrong eth type", 4, ((EthTypeCase) entry.getMatchEntryValue())
+        assertEquals("Wrong eth type", 4, ((EthTypeCase) entry.getMatchEntryValue())
                 .getEthType().getEthType().getValue().intValue());
         entry = entries.get(6);
         checkEntryHeader(entry, VlanVid.class, false);
-        Assert.assertEquals("Wrong vlan id", 7, ((VlanVidCase) entry.getMatchEntryValue())
+        assertEquals("Wrong vlan id", 7, ((VlanVidCase) entry.getMatchEntryValue())
                 .getVlanVid().getVlanVid().intValue());
-        Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue())
-                .getVlanVid().isCfiBit());
+        assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getCfiBit());
         entry = entries.get(7);
         checkEntryHeader(entry,
                 org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.VlanPcp.class, false);
-        Assert.assertEquals("Wrong vlan pcp", 7, ((VlanPcpCase) entry.getMatchEntryValue())
+        assertEquals("Wrong vlan pcp", 7, ((VlanPcpCase) entry.getMatchEntryValue())
                 .getVlanPcp().getVlanPcp().intValue());
         entry = entries.get(8);
         checkEntryHeader(entry, IpDscp.class, false);
-        Assert.assertEquals("Wrong ip dscp", 8, ((IpDscpCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ip dscp", 8, ((IpDscpCase) entry.getMatchEntryValue())
                 .getIpDscp().getDscp().getValue().intValue());
         entry = entries.get(9);
         checkEntryHeader(entry, IpEcn.class, false);
-        Assert.assertEquals("Wrong ip ecn", 9, ((IpEcnCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ip ecn", 9, ((IpEcnCase) entry.getMatchEntryValue())
                 .getIpEcn().getEcn().intValue());
         entry = entries.get(10);
         checkEntryHeader(entry, IpProto.class, false);
-        Assert.assertEquals("Wrong ip proto", 10, ((IpProtoCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ip proto", 10, ((IpProtoCase) entry.getMatchEntryValue())
                 .getIpProto().getProtocolNumber().intValue());
         entry = entries.get(11);
         checkEntryHeader(entry, TcpSrc.class, false);
-        Assert.assertEquals("Wrong tcp src", 11, ((TcpSrcCase) entry.getMatchEntryValue())
+        assertEquals("Wrong tcp src", 11, ((TcpSrcCase) entry.getMatchEntryValue())
                 .getTcpSrc().getPort().getValue().intValue());
         entry = entries.get(12);
         checkEntryHeader(entry, TcpDst.class, false);
-        Assert.assertEquals("Wrong tcp dst", 12, ((TcpDstCase) entry.getMatchEntryValue())
+        assertEquals("Wrong tcp dst", 12, ((TcpDstCase) entry.getMatchEntryValue())
                 .getTcpDst().getPort().getValue().intValue());
         entry = entries.get(13);
         checkEntryHeader(entry, Icmpv4Type.class, false);
-        Assert.assertEquals("Wrong icmpv4 type", 13, ((Icmpv4TypeCase) entry.getMatchEntryValue())
+        assertEquals("Wrong icmpv4 type", 13, ((Icmpv4TypeCase) entry.getMatchEntryValue())
                 .getIcmpv4Type().getIcmpv4Type().intValue());
         entry = entries.get(14);
         checkEntryHeader(entry, Icmpv4Code.class, false);
-        Assert.assertEquals("Wrong icmpv4 code", 14, ((Icmpv4CodeCase) entry.getMatchEntryValue())
+        assertEquals("Wrong icmpv4 code", 14, ((Icmpv4CodeCase) entry.getMatchEntryValue())
                 .getIcmpv4Code().getIcmpv4Code().intValue());
         entry = entries.get(15);
         checkEntryHeader(entry, Icmpv6Type.class, false);
-        Assert.assertEquals("Wrong icmpv6 type", 15, ((Icmpv6TypeCase) entry.getMatchEntryValue())
+        assertEquals("Wrong icmpv6 type", 15, ((Icmpv6TypeCase) entry.getMatchEntryValue())
                 .getIcmpv6Type().getIcmpv6Type().intValue());
         entry = entries.get(16);
         checkEntryHeader(entry, Icmpv6Code.class, false);
-        Assert.assertEquals("Wrong icmpv6 code", 16, ((Icmpv6CodeCase) entry.getMatchEntryValue())
+        assertEquals("Wrong icmpv6 code", 16, ((Icmpv6CodeCase) entry.getMatchEntryValue())
                 .getIcmpv6Code().getIcmpv6Code().intValue());
         entry = entries.get(17);
         checkEntryHeader(entry, Ipv4Src.class, false);
-        Assert.assertEquals("Wrong ipv4 src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ipv4 src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue())
                 .getIpv4Src().getIpv4Address().getValue());
         entry = entries.get(18);
         checkEntryHeader(entry, Ipv4Dst.class, false);
-        Assert.assertEquals("Wrong ipv4 dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ipv4 dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue())
                 .getIpv4Dst().getIpv4Address().getValue());
         entry = entries.get(19);
         checkEntryHeader(entry, MplsLabel.class, false);
-        Assert.assertEquals("Wrong mpls label", 17, ((MplsLabelCase) entry.getMatchEntryValue())
+        assertEquals("Wrong mpls label", 17, ((MplsLabelCase) entry.getMatchEntryValue())
                 .getMplsLabel().getMplsLabel().intValue());
         entry = entries.get(20);
         checkEntryHeader(entry, MplsBos.class, false);
-        Assert.assertEquals("Wrong mpls bos", true, ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().isBos());
+        assertEquals("Wrong mpls bos", true, ((MplsBosCase) entry.getMatchEntryValue()).getMplsBos().getBos());
         entry = entries.get(21);
         checkEntryHeader(entry, MplsTc.class, false);
-        Assert.assertEquals("Wrong mpls tc", 18, ((MplsTcCase) entry.getMatchEntryValue())
+        assertEquals("Wrong mpls tc", 18, ((MplsTcCase) entry.getMatchEntryValue())
                 .getMplsTc().getTc().intValue());
         entry = entries.get(22);
         checkEntryHeader(entry, PbbIsid.class, false);
-        Assert.assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue())
+        assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue())
                 .getPbbIsid().getIsid().intValue());
         entry = entries.get(23);
         checkEntryHeader(entry, TunnelId.class, false);
-        Assert.assertArrayEquals("Wrong tunnel id", new byte[]{0, 0, 0, 0, 0, 0, 0, 21},
+        assertArrayEquals("Wrong tunnel id", new byte[]{0, 0, 0, 0, 0, 0, 0, 21},
                 ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getTunnelId());
     }
 
-    private static void checkEntryHeader(MatchEntry entry, Class<? extends MatchField> field, boolean hasMask) {
-        Assert.assertEquals("Wrong oxm class", OpenflowBasicClass.class, entry.getOxmClass());
-        Assert.assertEquals("Wrong oxm field", field, entry.getOxmMatchField());
-        Assert.assertEquals("Wrong hasMask", hasMask, entry.isHasMask());
+    private static void checkEntryHeader(final MatchEntry entry, final Class<? extends MatchField> field,
+            final boolean hasMask) {
+        assertEquals("Wrong oxm class", OpenflowBasicClass.class, entry.getOxmClass());
+        assertEquals("Wrong oxm field", field, entry.getOxmMatchField());
+        assertEquals("Wrong hasMask", hasMask, entry.getHasMask());
     }
 
     @Test
@@ -350,15 +352,15 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match,
                 new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
 
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv4Src.class, false);
-        Assert.assertEquals("wrong Ipv4Address source", "10.2.2.2",
+        assertEquals("wrong Ipv4Address source", "10.2.2.2",
                 ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getIpv4Address().getValue());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv4Dst.class, false);
-        Assert.assertEquals("wrong Ipv4Address destination", "10.1.1.1",
+        assertEquals("wrong Ipv4Address destination", "10.1.1.1",
                 ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address().getValue());
     }
 
@@ -377,15 +379,15 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match,
                 new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
 
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv4Src.class, true);
-        Assert.assertEquals("wrong Ipv4Address source", "10.2.2.2",
+        assertEquals("wrong Ipv4Address source", "10.2.2.2",
                 ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getIpv4Address().getValue());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv4Dst.class, true);
-        Assert.assertEquals("wrong Ipv4Adress destination", "10.1.1.1",
+        assertEquals("wrong Ipv4Adress destination", "10.1.1.1",
                 ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getIpv4Address().getValue());
     }
 
@@ -401,14 +403,14 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, UdpSrc.class, false);
-        Assert.assertEquals("Wrong udp src", 11, ((UdpSrcCase) entry.getMatchEntryValue()).getUdpSrc()
+        assertEquals("Wrong udp src", 11, ((UdpSrcCase) entry.getMatchEntryValue()).getUdpSrc()
                 .getPort().getValue().intValue());
         entry = entries.get(1);
         checkEntryHeader(entry, UdpDst.class, false);
-        Assert.assertEquals("Wrong udp dst", 12, ((UdpDstCase) entry.getMatchEntryValue())
+        assertEquals("Wrong udp dst", 12, ((UdpDstCase) entry.getMatchEntryValue())
                 .getUdpDst().getPort().getValue().intValue());
     }
 
@@ -424,14 +426,14 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv4Src.class, false);
-        Assert.assertEquals("Wrong ipv4 tunnel src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src()
+        assertEquals("Wrong ipv4 tunnel src", "10.0.0.1", ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src()
                 .getIpv4Address().getValue());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv4Dst.class, false);
-        Assert.assertEquals("Wrong ipv4 tunnel dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst()
+        assertEquals("Wrong ipv4 tunnel dst", "10.0.0.2", ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst()
                 .getIpv4Address().getValue());
     }
 
@@ -447,14 +449,14 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, SctpSrc.class, false);
-        Assert.assertEquals("Wrong sctp src", 11, ((SctpSrcCase) entry.getMatchEntryValue()).getSctpSrc()
+        assertEquals("Wrong sctp src", 11, ((SctpSrcCase) entry.getMatchEntryValue()).getSctpSrc()
                 .getPort().getValue().intValue());
         entry = entries.get(1);
         checkEntryHeader(entry, SctpDst.class, false);
-        Assert.assertEquals("Wrong sctp dst", 12, ((SctpDstCase) entry.getMatchEntryValue())
+        assertEquals("Wrong sctp dst", 12, ((SctpDstCase) entry.getMatchEntryValue())
                 .getSctpDst().getPort().getValue().intValue());
     }
 
@@ -478,26 +480,26 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 5, entries.size());
+        assertEquals("Wrong entries size", 5, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, ArpOp.class, false);
-        Assert.assertEquals("Wrong arp op", 5, ((ArpOpCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp op", 5, ((ArpOpCase) entry.getMatchEntryValue())
                 .getArpOp().getOpCode().intValue());
         entry = entries.get(1);
         checkEntryHeader(entry, ArpSpa.class, false);
-        Assert.assertEquals("Wrong arp spa", "10.0.0.3", ((ArpSpaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp spa", "10.0.0.3", ((ArpSpaCase) entry.getMatchEntryValue())
                 .getArpSpa().getIpv4Address().getValue());
         entry = entries.get(2);
         checkEntryHeader(entry, ArpTpa.class, false);
-        Assert.assertEquals("Wrong arp tpa", "10.0.0.4", ((ArpTpaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp tpa", "10.0.0.4", ((ArpTpaCase) entry.getMatchEntryValue())
                 .getArpTpa().getIpv4Address().getValue());
         entry = entries.get(3);
         checkEntryHeader(entry, ArpSha.class, false);
-        Assert.assertEquals("Wrong arp sha", "00:00:00:00:00:05", ((ArpShaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp sha", "00:00:00:00:00:05", ((ArpShaCase) entry.getMatchEntryValue())
                 .getArpSha().getMacAddress().getValue());
         entry = entries.get(4);
         checkEntryHeader(entry, ArpTha.class, false);
-        Assert.assertEquals("Wrong arp tha", "00:00:00:00:00:06", ((ArpThaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp tha", "00:00:00:00:00:06", ((ArpThaCase) entry.getMatchEntryValue())
                 .getArpTha().getMacAddress().getValue());
     }
 
@@ -523,31 +525,31 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 4, entries.size());
+        assertEquals("Wrong entries size", 4, entries.size());
         MatchEntry entry = entries.get(0);
         entry = entries.get(0);
         checkEntryHeader(entry, ArpSpa.class, true);
-        Assert.assertEquals("Wrong arp spa", "10.0.0.0", ((ArpSpaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp spa", "10.0.0.0", ((ArpSpaCase) entry.getMatchEntryValue())
                 .getArpSpa().getIpv4Address().getValue());
-        Assert.assertArrayEquals("Wrong arp spa mask", new byte[]{(byte) 255, 0, 0, 0},
+        assertArrayEquals("Wrong arp spa mask", new byte[]{(byte) 255, 0, 0, 0},
                 ((ArpSpaCase) entry.getMatchEntryValue()).getArpSpa().getMask());
         entry = entries.get(1);
         checkEntryHeader(entry, ArpTpa.class, true);
-        Assert.assertEquals("Wrong arp tpa", "10.0.0.4", ((ArpTpaCase) entry.getMatchEntryValue()).getArpTpa()
+        assertEquals("Wrong arp tpa", "10.0.0.4", ((ArpTpaCase) entry.getMatchEntryValue()).getArpTpa()
                 .getIpv4Address().getValue());
-        Assert.assertArrayEquals("Wrong arp tpa mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, (byte) 254},
+        assertArrayEquals("Wrong arp tpa mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, (byte) 254},
                 ((ArpTpaCase) entry.getMatchEntryValue()).getArpTpa().getMask());
         entry = entries.get(2);
         checkEntryHeader(entry, ArpSha.class, true);
-        Assert.assertEquals("Wrong arp sha", "00:00:00:00:00:05", ((ArpShaCase) entry.getMatchEntryValue())
+        assertEquals("Wrong arp sha", "00:00:00:00:00:05", ((ArpShaCase) entry.getMatchEntryValue())
                 .getArpSha().getMacAddress().getValue());
-        Assert.assertArrayEquals("Wrong arp sha mask", new byte[]{0, 0, 0, 0, 0, 8},
+        assertArrayEquals("Wrong arp sha mask", new byte[]{0, 0, 0, 0, 0, 8},
                 ((ArpShaCase) entry.getMatchEntryValue()).getArpSha().getMask());
         entry = entries.get(3);
         checkEntryHeader(entry, ArpTha.class, true);
-        Assert.assertEquals("Wrong arp tha", "00:00:00:00:00:06", ((ArpThaCase) entry.getMatchEntryValue()).getArpTha()
+        assertEquals("Wrong arp tha", "00:00:00:00:00:06", ((ArpThaCase) entry.getMatchEntryValue()).getArpTha()
                 .getMacAddress().getValue());
-        Assert.assertArrayEquals("Wrong arp tha mask", new byte[]{0, 0, 0, 0, 0, 9},
+        assertArrayEquals("Wrong arp tha mask", new byte[]{0, 0, 0, 0, 0, 9},
                 ((ArpThaCase) entry.getMatchEntryValue()).getArpTha().getMask());
     }
 
@@ -573,37 +575,37 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 7, entries.size());
+        assertEquals("Wrong entries size", 7, entries.size());
         MatchEntry entry = entries.get(0);
         /* Due to conversion ambiguities, we always get "has mask" because
          * an ip with no mask and prefix with /128 (or 32 in v4) cannot
          * be distinguished */
         checkEntryHeader(entry, Ipv6Src.class, false);
-        Assert.assertEquals("Wrong ipv6 src", "::1",
+        assertEquals("Wrong ipv6 src", "::1",
                 ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address().getValue());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv6Dst.class, false);
-        Assert.assertEquals("Wrong ipv6 dst", "::2",
+        assertEquals("Wrong ipv6 dst", "::2",
                 ((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getIpv6Address().getValue());
         entry = entries.get(2);
         checkEntryHeader(entry, Ipv6Flabel.class, false);
-        Assert.assertEquals("Wrong ipv6 flabel", 3,
+        assertEquals("Wrong ipv6 flabel", 3,
                 ((Ipv6FlabelCase) entry.getMatchEntryValue()).getIpv6Flabel().getIpv6Flabel().getValue().intValue());
         entry = entries.get(3);
         checkEntryHeader(entry, Ipv6NdTarget.class, false);
-        Assert.assertEquals("Wrong ipv6 nd target", "::4",
+        assertEquals("Wrong ipv6 nd target", "::4",
                 ((Ipv6NdTargetCase) entry.getMatchEntryValue()).getIpv6NdTarget().getIpv6Address().getValue());
         entry = entries.get(4);
         checkEntryHeader(entry, Ipv6NdSll.class, false);
-        Assert.assertEquals("Wrong ipv6 nd sll", "00:00:00:00:00:05",
+        assertEquals("Wrong ipv6 nd sll", "00:00:00:00:00:05",
                 ((Ipv6NdSllCase) entry.getMatchEntryValue()).getIpv6NdSll().getMacAddress().getValue());
         entry = entries.get(5);
         checkEntryHeader(entry, Ipv6NdTll.class, false);
-        Assert.assertEquals("Wrong ipv6 nd tll", "00:00:00:00:00:06",
+        assertEquals("Wrong ipv6 nd tll", "00:00:00:00:00:06",
                 ((Ipv6NdTllCase) entry.getMatchEntryValue()).getIpv6NdTll().getMacAddress().getValue());
         entry = entries.get(6);
         checkEntryHeader(entry, Ipv6Exthdr.class, false);
-        Assert.assertEquals("Wrong ipv6 ext hdr", new Ipv6ExthdrFlags(false, true, false, true, false,
+        assertEquals("Wrong ipv6 ext hdr", new Ipv6ExthdrFlags(false, true, false, true, false,
             true, false, true, false), ((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
     }
 
@@ -619,18 +621,18 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv6Src.class, true);
-        Assert.assertEquals("Wrong ipv6 src", "::",
+        assertEquals("Wrong ipv6 src", "::",
                 ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address().getValue());
-        Assert.assertArrayEquals("Wrong ipv6 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, 0, 0, 0, 0,
+        assertArrayEquals("Wrong ipv6 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, 0, 0, 0, 0,
             0, 0, 0, 0, 0, 0, 0, 0, 0}, ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getMask());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv6Dst.class, true);
-        Assert.assertEquals("Wrong ipv6 dst", "::",
+        assertEquals("Wrong ipv6 dst", "::",
                 ((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getIpv6Address().getValue());
-        Assert.assertArrayEquals("Wrong ipv6 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, (byte) 255,
+        assertArrayEquals("Wrong ipv6 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, (byte) 255,
             (byte) 255, (byte) 255, (byte) 255, (byte) 255, 0, 0, 0, 0, 0, 0, 0, 0},
             ((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getMask());
     }
@@ -650,12 +652,12 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 1, entries.size());
+        assertEquals("Wrong entries size", 1, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv6Exthdr.class, true);
-        Assert.assertEquals("Wrong ipv6 ext hdr", new Ipv6ExthdrFlags(true, false, true, false, true, false,
+        assertEquals("Wrong ipv6 ext hdr", new Ipv6ExthdrFlags(true, false, true, false, true, false,
                 true, false, true), ((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getPseudoField());
-        Assert.assertArrayEquals("Wrong ipv6 ext hdr mask", new byte[]{1, 2},
+        assertArrayEquals("Wrong ipv6 ext hdr mask", new byte[]{1, 2},
                 ((Ipv6ExthdrCase) entry.getMatchEntryValue()).getIpv6Exthdr().getMask());
     }
 
@@ -701,56 +703,55 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 8, entries.size());
+        assertEquals("Wrong entries size", 8, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Metadata.class, true);
-        Assert.assertArrayEquals("Wrong metadata", new byte[]{0, 0, 0, 0, 0, 0, 0, 3},
+        assertArrayEquals("Wrong metadata", new byte[]{0, 0, 0, 0, 0, 0, 0, 3},
                 ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMetadata());
-        Assert.assertArrayEquals("Wrong metadata mask", new byte[]{0, 0, 0, 0, 0, 0, 0, 15},
+        assertArrayEquals("Wrong metadata mask", new byte[]{0, 0, 0, 0, 0, 0, 0, 15},
                 ((MetadataCase) entry.getMatchEntryValue()).getMetadata().getMask());
         entry = entries.get(1);
         checkEntryHeader(entry, EthDst.class, true);
-        Assert.assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"),
+        assertEquals("Wrong eth dst", new MacAddress("00:00:00:00:00:06"),
                 ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMacAddress());
-        Assert.assertArrayEquals("Wrong eth dst mask", new byte[]{0, 0, 0, 0, 0, 9},
+        assertArrayEquals("Wrong eth dst mask", new byte[]{0, 0, 0, 0, 0, 9},
                 ((EthDstCase) entry.getMatchEntryValue()).getEthDst().getMask());
         entry = entries.get(2);
         checkEntryHeader(entry, EthSrc.class, true);
-        Assert.assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"),
+        assertEquals("Wrong eth src", new MacAddress("00:00:00:00:00:05"),
                 ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMacAddress());
-        Assert.assertArrayEquals("Wrong eth src mask", new byte[]{0, 0, 0, 0, 0, 8},
+        assertArrayEquals("Wrong eth src mask", new byte[]{0, 0, 0, 0, 0, 8},
                 ((EthSrcCase) entry.getMatchEntryValue()).getEthSrc().getMask());
         entry = entries.get(3);
         checkEntryHeader(entry, VlanVid.class, true);
-        Assert.assertEquals("Wrong vlan id", 0, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid()
+        assertEquals("Wrong vlan id", 0, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid()
                 .getVlanVid().intValue());
-        Assert.assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid()
-                .isCfiBit());
-        Assert.assertArrayEquals("Wrong vlanId mask", new byte[]{16, 0},
+        assertEquals("Wrong cfi bit", true, ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getCfiBit());
+        assertArrayEquals("Wrong vlanId mask", new byte[]{16, 0},
                 ((VlanVidCase) entry.getMatchEntryValue()).getVlanVid().getMask());
         entry = entries.get(4);
         checkEntryHeader(entry, Ipv4Src.class, true);
-        Assert.assertEquals("Wrong ipv4 src", "10.0.0.0", ((Ipv4SrcCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ipv4 src", "10.0.0.0", ((Ipv4SrcCase) entry.getMatchEntryValue())
                 .getIpv4Src().getIpv4Address().getValue());
-        Assert.assertArrayEquals("Wrong ipv4 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, 0},
+        assertArrayEquals("Wrong ipv4 src mask", new byte[]{(byte) 255, (byte) 255, (byte) 255, 0},
                 ((Ipv4SrcCase) entry.getMatchEntryValue()).getIpv4Src().getMask());
         entry = entries.get(5);
         checkEntryHeader(entry, Ipv4Dst.class, true);
-        Assert.assertEquals("Wrong ipv4 dst", "10.0.0.0", ((Ipv4DstCase) entry.getMatchEntryValue())
+        assertEquals("Wrong ipv4 dst", "10.0.0.0", ((Ipv4DstCase) entry.getMatchEntryValue())
                 .getIpv4Dst().getIpv4Address().getValue());
-        Assert.assertArrayEquals("Wrong ipv4 dst mask", new byte[]{(byte) 255, 0, 0, 0},
+        assertArrayEquals("Wrong ipv4 dst mask", new byte[]{(byte) 255, 0, 0, 0},
                 ((Ipv4DstCase) entry.getMatchEntryValue()).getIpv4Dst().getMask());
         entry = entries.get(6);
         checkEntryHeader(entry, PbbIsid.class, true);
-        Assert.assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue())
+        assertEquals("Wrong pbb isid", 20, ((PbbIsidCase) entry.getMatchEntryValue())
                 .getPbbIsid().getIsid().intValue());
-        Assert.assertArrayEquals("Wrong pbb isid mask", new byte[]{0, 0, 8},
+        assertArrayEquals("Wrong pbb isid mask", new byte[]{0, 0, 8},
                 ((PbbIsidCase) entry.getMatchEntryValue()).getPbbIsid().getMask());
         entry = entries.get(7);
         checkEntryHeader(entry, TunnelId.class, true);
-        Assert.assertArrayEquals("Wrong tunnel id", new byte[]{0, 0, 0, 0, 0, 0, 0, 21},
+        assertArrayEquals("Wrong tunnel id", new byte[]{0, 0, 0, 0, 0, 0, 0, 21},
                 ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getTunnelId());
-        Assert.assertArrayEquals("Wrong tunnel id mask", new byte[]{0, 0, 0, 0, 0, 0, 0, 14},
+        assertArrayEquals("Wrong tunnel id mask", new byte[]{0, 0, 0, 0, 0, 0, 0, 14},
                 ((TunnelIdCase) entry.getMatchEntryValue()).getTunnelId().getMask());
     }
 
@@ -773,15 +774,15 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional = converterManager.convert(match,
                 new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 2, entries.size());
+        assertEquals("Wrong entries size", 2, entries.size());
 
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, Ipv6Src.class, true);
-        Assert.assertEquals("wrong Ipv6Adress source", "fbA0:FFB6:FFF0:FFF0:FFF0:FFF0:FFF0:AFF0",
+        assertEquals("wrong Ipv6Adress source", "fbA0:FFB6:FFF0:FFF0:FFF0:FFF0:FFF0:AFF0",
                 ((Ipv6SrcCase) entry.getMatchEntryValue()).getIpv6Src().getIpv6Address().getValue());
         entry = entries.get(1);
         checkEntryHeader(entry, Ipv6Dst.class, true);
-        Assert.assertEquals("wrong Ipv6Adress destination", "fbA0:FFB6:FFF0:FFF0:FFF0:FFF0:FFF0:AFF0",
+        assertEquals("wrong Ipv6Adress destination", "fbA0:FFB6:FFF0:FFF0:FFF0:FFF0:FFF0:AFF0",
                 ((Ipv6DstCase) entry.getMatchEntryValue()).getIpv6Dst().getIpv6Address().getValue());
     }
 
@@ -794,10 +795,10 @@ public class MatchConvertorTest {
         Optional<List<MatchEntry>> entriesOptional =
                 converterManager.convert(match, new VersionConvertorData(OFConstants.OFP_VERSION_1_3));
         List<MatchEntry> entries = entriesOptional.get();
-        Assert.assertEquals("Wrong entries size", 1, entries.size());
+        assertEquals("Wrong entries size", 1, entries.size());
         MatchEntry entry = entries.get(0);
         checkEntryHeader(entry, PacketType.class, false);
-        Assert.assertEquals("Wrong in port", 0x1894f,
+        assertEquals("Wrong in port", 0x1894f,
                 ((PacketTypeCase) entry.getMatchEntryValue()).getPacketType().getPacketType().longValue());
     }
 }
index 303b52075cafc0534352adeca4c49dcafcb9d110..73716df91a2d2909077fc482cd35e8216437295a 100644 (file)
@@ -554,7 +554,7 @@ public class MatchResponseConvertor2Test {
                 builtMatch.getEthernetMatch().getEthernetType().getType().getValue().intValue());
         Assert.assertEquals("Wrong vlan id", 4,
                 builtMatch.getVlanMatch().getVlanId().getVlanId().getValue().intValue());
-        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());
+        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().getVlanIdPresent());
         Assert.assertEquals("Wrong vlan pcp", 5, builtMatch.getVlanMatch().getVlanPcp().getValue().intValue());
         Assert.assertEquals("Wrong ip dscp", 6, builtMatch.getIpMatch().getIpDscp().getValue().intValue());
         Assert.assertEquals("Wrong ip ecn", 7, builtMatch.getIpMatch().getIpEcn().intValue());
@@ -717,7 +717,7 @@ public class MatchResponseConvertor2Test {
                 builtMatch.getEthernetMatch().getEthernetSource().getMask());
         Assert.assertEquals("Wrong vlan id", 4,
                 builtMatch.getVlanMatch().getVlanId().getVlanId().getValue().intValue());
-        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().isVlanIdPresent());
+        Assert.assertEquals("Wrong vlan id entries", true, builtMatch.getVlanMatch().getVlanId().getVlanIdPresent());
         final Ipv4Match ipv4Match = (Ipv4Match) builtMatch.getLayer3Match();
         Assert.assertEquals("Wrong ipv4 src address", "10.0.0.0/24", ipv4Match.getIpv4Source().getValue());
         Assert.assertEquals("Wrong ipv4 dst address", "10.0.0.0/20", ipv4Match.getIpv4Destination().getValue());
index 591d0e2f4642bdb6cc3cc71c909873e84d45f5db..8c96520c11718172c14c409fe0ed376ca80f6b9d 100644 (file)
@@ -113,7 +113,7 @@ public class MatchResponseConvertorTest {
             int expectedVid = vid < 0 ? 0 : vid;
             Boolean expectedCfi = vid != 0;
             assertEquals(expectedVid, vlanMatch.getVlanId().getVlanId().getValue().intValue());
-            assertEquals(expectedCfi, vlanMatch.getVlanId().isVlanIdPresent());
+            assertEquals(expectedCfi, vlanMatch.getVlanId().getVlanIdPresent());
             assertEquals(null, vlanMatch.getVlanPcp());
         }
     }
@@ -276,7 +276,7 @@ public class MatchResponseConvertorTest {
 
     private static void checkDefaultV10(final Match match, final FlowWildcardsV10 wc, final int vid) {
         EthernetMatch ethMatch = match.getEthernetMatch();
-        if (wc.isDLSRC()) {
+        if (wc.getDLSRC()) {
             if (ethMatch != null) {
                 assertEquals(null, ethMatch.getEthernetSource());
             }
@@ -285,7 +285,7 @@ public class MatchResponseConvertorTest {
         }
 
         if (ethMatch != null) {
-            if (wc.isDLDST()) {
+            if (wc.getDLDST()) {
                 assertEquals(null, ethMatch.getEthernetDestination());
             } else {
                 assertNotEquals(null, ethMatch.getEthernetDestination());
@@ -294,7 +294,7 @@ public class MatchResponseConvertorTest {
             }
         }
 
-        if (wc.isDLTYPE()) {
+        if (wc.getDLTYPE()) {
             if (ethMatch != null) {
                 assertEquals(null, ethMatch.getEthernetType());
             }
@@ -309,7 +309,7 @@ public class MatchResponseConvertorTest {
         }
 
         VlanMatch vlanMatch = match.getVlanMatch();
-        if (wc.isDLVLAN()) {
+        if (wc.getDLVLAN()) {
             assertEquals(null, vlanMatch);
         } else {
             int expectedVid;
@@ -322,9 +322,9 @@ public class MatchResponseConvertorTest {
                 expectedCfi = Boolean.TRUE;
             }
             assertEquals(expectedVid, vlanMatch.getVlanId().getVlanId().getValue().intValue());
-            assertEquals(expectedCfi, vlanMatch.getVlanId().isVlanIdPresent());
+            assertEquals(expectedCfi, vlanMatch.getVlanId().getVlanIdPresent());
 
-            if (wc.isDLVLANPCP()) {
+            if (wc.getDLVLANPCP()) {
                 assertEquals(null, vlanMatch.getVlanPcp());
             } else {
                 assertEquals(VLAN_PCP, vlanMatch.getVlanPcp().getValue());