Bump upstreams 33/109933/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Jan 2024 11:46:20 +0000 (12:46 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 23 Jan 2024 18:30:16 +0000 (19:30 +0100)
Adopt:
- odparent-13.0.10
- infrautils-6.0.5
- yangtools-11.0.5
- mdsal-12.0.4
- controller-8.0.4
- aaa-0.18.4
- netconf-6.0.6

Also fixes up fallout from I35697d2544464d6cdc4ee88d13978eaabcf33353,
which broke unregistration -- this is now found by SpotBugs.

Change-Id: Id58314c7a4157e3c00a1ac0929964b9302be1756
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
82 files changed:
applications/arbitratorreconciliation/pom.xml
applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterSequential.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/AbstractListeningCommiter.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/ListenerRegistrationHelper.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/TableForwarder.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyFlatBatchImpl.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/impl/strategy/SyncPlanPushStrategyIncrementalImpl.java
applications/pom.xml
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/cli/GetRegisteredServices.java
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/ReconciliationServiceImpl.java
applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/cli/Reconciliation.java
applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableTopologyProvider.java
artifacts/pom.xml
distribution/karaf/pom.xml
extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml
extension/features-extension-aggregator/odl-openflowplugin-eric-extensions/pom.xml
extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml
extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml
extension/features-extension-aggregator/pom.xml
extension/pom.xml
features-aggregator/features-openflowplugin/pom.xml
features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml
features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml
features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml
features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml
features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml
features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml
features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml
features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml
features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml
features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml
features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml
features-aggregator/odl-openflowplugin-app-topology/pom.xml
features-aggregator/odl-openflowplugin-drop-test/pom.xml
features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml
features-aggregator/odl-openflowplugin-flow-services/pom.xml
features-aggregator/odl-openflowplugin-libraries/pom.xml
features-aggregator/odl-openflowplugin-nsf-model/pom.xml
features-aggregator/odl-openflowplugin-southbound/pom.xml
features-aggregator/pom.xml
libraries/liblldp/src/main/java/org/opendaylight/openflowplugin/libraries/liblldp/Packet.java
libraries/pom.xml
model/pom.xml
openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml
openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml
openflowjava/features-openflowjava-aggregator/pom.xml
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDatagramPacketDecoder.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFDatagramPacketEncoder.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/ServerFacade.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpConnectionInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpHandler.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/UdpHandler.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MeterModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/OF13MatchSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/ConnectionContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/listener/HandshakeListenerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/MatchDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyExperimenterDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyTableFeaturesDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/match/MatchSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/MeterMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/role/RoleContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImpl.java
parent/pom.xml
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/LearningSwitchManagerSimpleImpl.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/WakeupOnNode.java
samples/learning-switch/src/main/java/org/opendaylight/openflowplugin/learningswitch/multi/LearningSwitchManagerMultiImpl.java
samples/pom.xml
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/SendEvent.java
test-common/src/main/java/org/opendaylight/openflowplugin/testcommon/DropTestCommiter.java
test-common/src/main/java/org/opendaylight/openflowplugin/testcommon/DropTestRpcSender.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginMeterTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestServiceProvider.java

index 7dd9e094ea987b957c50b19cc70ce7e10080843b..9f090762420389d045711c6731622b75ab5b5588 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index d09d8d0c20279c7df0bd998c4d1a65bfebf79e72..e5694e3f3213db05893ca34e89e84bbdc764a93d 100644 (file)
@@ -23,24 +23,23 @@ import org.slf4j.LoggerFactory;
 
 public class FlowWriterSequential implements FlowCounterMBean {
     private static final Logger LOG = LoggerFactory.getLogger(FlowWriterSequential.class);
+
     private final DataBroker dataBroker;
     private final ExecutorService flowPusher;
-    protected int dpnCount;
     private long startTime;
     private final AtomicInteger writeOpStatus = new AtomicInteger(FlowCounter.OperationStatus.INIT.status());
     private final AtomicInteger countDpnWriteCompletion = new AtomicInteger();
     private final AtomicLong taskCompletionTime = new AtomicLong();
 
-    public FlowWriterSequential(final DataBroker dataBroker, ExecutorService flowPusher) {
+    public FlowWriterSequential(final DataBroker dataBroker, final ExecutorService flowPusher) {
         this.dataBroker = dataBroker;
         this.flowPusher = flowPusher;
         LOG.info("Using Sequential implementation of Flow Writer.");
     }
 
-    public void addFlows(Integer count, Integer flowsPerDPN, int batchSize, int sleepMillis, short startTableId,
-            short endTableId, boolean isCreateParents) {
+    public void addFlows(final Integer count, final Integer flowsPerDPN, final int batchSize, final int sleepMillis,
+            final short startTableId, final short endTableId, final boolean isCreateParents) {
         LOG.info("Using Sequential implementation of Flow Writer.");
-        this.dpnCount = count;
         countDpnWriteCompletion.set(count);
         startTime = System.nanoTime();
         for (int i = 1; i <= count; i++) {
@@ -50,8 +49,8 @@ public class FlowWriterSequential implements FlowCounterMBean {
         }
     }
 
-    public void deleteFlows(Integer count, Integer flowsPerDPN, int batchSize, short startTableId,
-            short endTableId) {
+    public void deleteFlows(final Integer count, final Integer flowsPerDPN, final int batchSize,
+            final short startTableId, final short endTableId) {
         LOG.info("Using Sequential implementation of Flow Writer.");
         countDpnWriteCompletion.set(count);
         for (int i = 1; i <= count; i++) {
@@ -71,7 +70,7 @@ public class FlowWriterSequential implements FlowCounterMBean {
         return taskCompletionTime.get();
     }
 
-    private class FlowHandlerTask implements Runnable {
+    private final class FlowHandlerTask implements Runnable {
         private final String dpId;
         private final int flowsPerDpn;
         private final boolean add;
@@ -85,7 +84,7 @@ public class FlowWriterSequential implements FlowCounterMBean {
                         final int flowsPerDpn,
                         final boolean add,
                         final int batchSize,
-                        int sleepMillis,
+                        final int sleepMillis,
                         final short startTableId,
                         final short endTableId,
                         final boolean isCreateParents) {
@@ -136,8 +135,8 @@ public class FlowWriterSequential implements FlowCounterMBean {
                     MoreExecutors.directExecutor());
         }
 
-        private void addFlowToTx(WriteTransaction writeTransaction, String flowId, InstanceIdentifier<Flow> flowIid,
-                Flow flow) {
+        private void addFlowToTx(final WriteTransaction writeTransaction, final String flowId,
+                final InstanceIdentifier<Flow> flowIid, final Flow flow) {
             if (add) {
                 LOG.trace("Adding flow for flowId: {}, flowIid: {}", flowId, flowIid);
                 if (isCreateParents) {
@@ -157,7 +156,7 @@ public class FlowWriterSequential implements FlowCounterMBean {
 
             private int sourceIp;
 
-            DsCallBack(String dpId, int sourceIp, short tableId) {
+            DsCallBack(final String dpId, final int sourceIp, final short tableId) {
                 this.dpId = dpId;
                 this.sourceIp = sourceIp;
                 short numberA = 1;
@@ -166,7 +165,7 @@ public class FlowWriterSequential implements FlowCounterMBean {
             }
 
             @Override
-            public void onSuccess(Object notUsed) {
+            public void onSuccess(final Object notUsed) {
                 if (sourceIp > flowsPerDpn) {
                     long dur = System.nanoTime() - startTime;
                     LOG.info("Completed all flows installation for: dpid: {}, tableId: {}, sourceIp: {} in {}ns", dpId,
@@ -214,7 +213,7 @@ public class FlowWriterSequential implements FlowCounterMBean {
             }
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(final Throwable error) {
                 LOG.error("Error: {} in Datastore write operation: dpid: {}, tableId: {}, sourceIp: {}", error, dpId,
                         tableId, sourceIp);
                 writeOpStatus.set(FlowCounter.OperationStatus.FAILURE.status());
index 731232da9a71f552e1fa6ffca14518d5cafc4b88..e638febbbca40553f86e0fc45b5c60285ac7ae79 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.MoreExecutors;
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.Collection;
-import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
@@ -37,19 +36,19 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class AbstractListeningCommiter<T extends DataObject>
         implements ForwardingRulesCommiter<T>, RecoverableListener {
-
     private static final Logger LOG = LoggerFactory.getLogger(AbstractListeningCommiter.class);
+
     final ForwardingRulesManager provider;
     NodeConfigurator nodeConfigurator;
     protected final DataBroker dataBroker;
-    protected final ListenerRegistrationHelper registrationHelper;
-    protected ListenerRegistration<AbstractListeningCommiter> listenerRegistration;
+    private final ListenerRegistrationHelper registrationHelper;
+    private ListenerRegistration<AbstractListeningCommiter> listenerRegistration;
 
     @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "See FIXME below")
     protected AbstractListeningCommiter(final ForwardingRulesManager provider, final DataBroker dataBroker,
                                      final ListenerRegistrationHelper registrationHelper) {
         this.provider = requireNonNull(provider, "ForwardingRulesManager can not be null!");
-        this.nodeConfigurator = requireNonNull(provider.getNodeConfigurator(), "NodeConfigurator can not be null!");
+        nodeConfigurator = requireNonNull(provider.getNodeConfigurator(), "NodeConfigurator can not be null!");
         this.dataBroker = requireNonNull(dataBroker, "DataBroker can not be null!");
         this.registrationHelper = requireNonNull(registrationHelper, "registrationHelper can not be null!");
 
@@ -89,24 +88,22 @@ public abstract class AbstractListeningCommiter<T extends DataObject>
                                     IllegalArgumentException("Unhandled modification type "
                                     + mod.getModificationType());
                     }
-                } else {
-                    if (provider.isStaleMarkingEnabled()) {
-                        LOG.info("Stale-Marking ENABLED and switch {} is NOT connected, storing stale entities",
-                                nodeIdent.toString());
-                        // Switch is NOT connected
-                        switch (mod.getModificationType()) {
-                            case DELETE:
-                                createStaleMarkEntity(key, mod.getDataBefore(), nodeIdent);
-                                break;
-                            case SUBTREE_MODIFIED:
-                                break;
-                            case WRITE:
-                                break;
-                            default:
-                                throw new
-                                        IllegalArgumentException("Unhandled modification type "
-                                        + mod.getModificationType());
-                        }
+                } else if (provider.isStaleMarkingEnabled()) {
+                    LOG.info("Stale-Marking ENABLED and switch {} is NOT connected, storing stale entities",
+                            nodeIdent.toString());
+                    // Switch is NOT connected
+                    switch (mod.getModificationType()) {
+                        case DELETE:
+                            createStaleMarkEntity(key, mod.getDataBefore(), nodeIdent);
+                            break;
+                        case SUBTREE_MODIFIED:
+                            break;
+                        case WRITE:
+                            break;
+                        default:
+                            throw new
+                                    IllegalArgumentException("Unhandled modification type "
+                                    + mod.getModificationType());
                     }
                 }
             } catch (RuntimeException e) {
@@ -117,22 +114,33 @@ public abstract class AbstractListeningCommiter<T extends DataObject>
 
     @Override
     public final void registerListener() {
-        final DataTreeIdentifier<T> treeId =
-                DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, getWildCardPath());
-        Futures.addCallback(registrationHelper.checkedRegisterListener(treeId, this),
-                new FutureCallback<ListenerRegistration<AbstractListeningCommiter>>() {
-                    @Override
-                    public void onSuccess(
-                            @Nullable final ListenerRegistration<AbstractListeningCommiter> flowListenerRegistration) {
-                        LOG.info("{} registered successfully", flowListenerRegistration.getInstance());
-                        listenerRegistration = flowListenerRegistration;
-                    }
+        Futures.addCallback(registrationHelper.checkedRegisterListener(
+            DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, getWildCardPath()), this),
+            new FutureCallback<ListenerRegistration<AbstractListeningCommiter>>() {
+                @Override
+                public void onSuccess(final ListenerRegistration<AbstractListeningCommiter> flowListenerRegistration) {
+                    LOG.info("{} registered successfully", flowListenerRegistration.getInstance());
+                    listenerRegistration = flowListenerRegistration;
+                }
 
-                    @Override
-                    public void onFailure(final Throwable throwable) {
-                        LOG.error("Registration failed ", throwable);
-                    }
-                }, MoreExecutors.directExecutor());
+                @Override
+                public void onFailure(final Throwable throwable) {
+                    LOG.error("Registration failed ", throwable);
+                }
+            }, MoreExecutors.directExecutor());
+    }
+
+    @Override
+    public void deregisterListener() {
+        close();
+    }
+
+    @Override
+    public void close() {
+        if (listenerRegistration != null) {
+            listenerRegistration.close();
+            listenerRegistration = null;
+        }
     }
 
     /**
index 6b237623548778bde0c2fce9b364725f3cf95f07..6ff32f3089242bcef2f60886aa850a0f4d5dd90a 100644 (file)
@@ -60,7 +60,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef
 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.openflowplugin.extension.onf.rev170124.BundleId;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -77,32 +76,12 @@ import org.slf4j.LoggerFactory;
  * {@link org.opendaylight.mdsal.binding.api.DataTreeModification}.
  */
 public class FlowForwarder extends AbstractListeningCommiter<Flow> {
-
     private static final Logger LOG = LoggerFactory.getLogger(FlowForwarder.class);
-
     private static final String GROUP_EXISTS_IN_DEVICE_ERROR = "GROUPEXISTS";
 
-    private ListenerRegistration<FlowForwarder> listenerRegistration;
-
-    private final BundleFlowForwarder bundleFlowForwarder;
-
     public FlowForwarder(final ForwardingRulesManager manager, final DataBroker db,
                          final ListenerRegistrationHelper registrationHelper) {
         super(manager, db, registrationHelper);
-        bundleFlowForwarder = new BundleFlowForwarder(manager);
-    }
-
-    @Override
-    public  void deregisterListener() {
-        close();
-    }
-
-    @Override
-    public void close() {
-        if (listenerRegistration != null) {
-            listenerRegistration.close();
-            listenerRegistration = null;
-        }
     }
 
     @Override
index 9b65c0374ba471d13623aad372380d95399f5bd0..7fe5f8fc932e814f3fd0e6a106aa1e8b98e9f578 100644 (file)
@@ -44,7 +44,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef
 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.openflowplugin.extension.onf.rev170124.BundleId;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.Uint32;
@@ -59,29 +58,11 @@ import org.slf4j.LoggerFactory;
  * {@link org.opendaylight.mdsal.binding.api.DataTreeModification}.
  */
 public class GroupForwarder extends AbstractListeningCommiter<Group> {
-
     private static final Logger LOG = LoggerFactory.getLogger(GroupForwarder.class);
-    private ListenerRegistration<GroupForwarder> listenerRegistration;
-
-    private final BundleGroupForwarder bundleGroupForwarder;
 
     public GroupForwarder(final ForwardingRulesManager manager, final DataBroker db,
                           final ListenerRegistrationHelper registrationHelper) {
         super(manager, db, registrationHelper);
-        this.bundleGroupForwarder = new BundleGroupForwarder(manager);
-    }
-
-    @Override
-    public  void deregisterListener() {
-        close();
-    }
-
-    @Override
-    public void close() {
-        if (listenerRegistration != null) {
-            listenerRegistration.close();
-            listenerRegistration = null;
-        }
     }
 
     @Override
@@ -109,7 +90,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
                         .build();
 
                 final ListenableFuture<RpcResult<RemoveGroupOutput>> resultFuture =
-                    this.provider.getSalGroupService()
+                    provider.getSalGroupService()
                             .removeGroup(removeGroup);
                 Futures.addCallback(resultFuture,
                     new RemoveGroupCallBack(removeDataObj.getGroupId().getValue(), nodeId),
@@ -131,7 +112,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
         builder.setGroupRef(new GroupRef(identifier));
         builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
-        return this.provider.getSalGroupService().removeGroup(builder.build());
+        return provider.getSalGroupService().removeGroup(builder.build());
     }
 
     @Override
@@ -152,7 +133,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
                 builder.setUpdatedGroup(new UpdatedGroupBuilder(updatedGroup).build());
                 builder.setOriginalGroup(new OriginalGroupBuilder(originalGroup).build());
                 UpdateGroupInput updateGroupInput = builder.build();
-                final ListenableFuture<RpcResult<UpdateGroupOutput>> resultFuture = this.provider.getSalGroupService()
+                final ListenableFuture<RpcResult<UpdateGroupOutput>> resultFuture = provider.getSalGroupService()
                         .updateGroup(updateGroupInput);
                 LoggingFutures.addErrorLogging(resultFuture, LOG, "updateGroup");
                 Futures.addCallback(resultFuture,
@@ -180,7 +161,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
                         builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
                         AddGroupInput addGroupInput = builder.build();
                         final ListenableFuture<RpcResult<AddGroupOutput>> resultFuture;
-                        resultFuture = this.provider.getSalGroupService().addGroup(addGroupInput);
+                        resultFuture = provider.getSalGroupService().addGroup(addGroupInput);
                         Futures.addCallback(resultFuture,
                                 new AddGroupCallBack(addGroupInput.getGroupId().getValue(), nodeId),
                                 MoreExecutors.directExecutor());
@@ -190,21 +171,21 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
     }
 
     @Override
-    public void createStaleMarkEntity(InstanceIdentifier<Group> identifier, Group del,
-            InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    public void createStaleMarkEntity(final InstanceIdentifier<Group> identifier, final Group del,
+            final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         LOG.debug("Creating Stale-Mark entry for the switch {} for Group {} ", nodeIdent, del);
         StaleGroup staleGroup = makeStaleGroup(identifier, del, nodeIdent);
         persistStaleGroup(staleGroup, nodeIdent);
 
     }
 
-    private static StaleGroup makeStaleGroup(InstanceIdentifier<Group> identifier, Group del,
-            InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    private static StaleGroup makeStaleGroup(final InstanceIdentifier<Group> identifier, final Group del,
+            final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         StaleGroupBuilder staleGroupBuilder = new StaleGroupBuilder(del);
         return staleGroupBuilder.setGroupId(del.getGroupId()).build();
     }
 
-    private void persistStaleGroup(StaleGroup staleGroup, InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    private void persistStaleGroup(final StaleGroup staleGroup, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         writeTransaction.put(LogicalDatastoreType.CONFIGURATION, getStaleGroupInstanceIdentifier(staleGroup, nodeIdent),
                 staleGroup);
@@ -213,15 +194,15 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         handleStaleGroupResultFuture(submitFuture);
     }
 
-    private static void handleStaleGroupResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleGroupResultFuture(final FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
-            public void onSuccess(Object result) {
+            public void onSuccess(final Object result) {
                 LOG.debug("Stale Group creation success");
             }
 
             @Override
-            public void onFailure(Throwable throwable) {
+            public void onFailure(final Throwable throwable) {
                 LOG.error("Stale Group creation failed", throwable);
             }
         }, MoreExecutors.directExecutor());
@@ -229,7 +210,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
 
     private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.group
         .types.rev131018.groups.StaleGroup> getStaleGroupInstanceIdentifier(
-            StaleGroup staleGroup, InstanceIdentifier<FlowCapableNode> nodeIdent) {
+            final StaleGroup staleGroup, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleGroup.class, new StaleGroupKey(new GroupId(staleGroup.getGroupId())));
     }
 
@@ -243,7 +224,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onSuccess(RpcResult<AddGroupOutput> result) {
+        public void onSuccess(final RpcResult<AddGroupOutput> result) {
             if (result.isSuccessful()) {
                 provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
                 LOG.debug("Group add with id {} finished without error for node {}", groupId, nodeId);
@@ -254,7 +235,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onFailure(Throwable throwable) {
+        public void onFailure(final Throwable throwable) {
             LOG.error("Service call for adding group {} failed for node with error {}", groupId, nodeId, throwable);
         }
     }
@@ -269,7 +250,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onSuccess(RpcResult<UpdateGroupOutput> result) {
+        public void onSuccess(final RpcResult<UpdateGroupOutput> result) {
             if (result.isSuccessful()) {
                 provider.getDevicesGroupRegistry().storeGroup(nodeId, groupId);
                 LOG.debug("Group update with id {} finished without error for node {}", groupId, nodeId);
@@ -280,7 +261,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onFailure(Throwable throwable) {
+        public void onFailure(final Throwable throwable) {
             LOG.error("Service call for updating group {} failed for node {} with", groupId, nodeId,
                     throwable);
         }
@@ -296,7 +277,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onSuccess(RpcResult<RemoveGroupOutput> result) {
+        public void onSuccess(final RpcResult<RemoveGroupOutput> result) {
             if (result.isSuccessful()) {
                 LOG.debug("Group remove with id {} finished without error for node {}", groupId, nodeId);
                 provider.getDevicesGroupRegistry().removeGroup(nodeId, groupId);
@@ -307,7 +288,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         }
 
         @Override
-        public void onFailure(Throwable throwable) {
+        public void onFailure(final Throwable throwable) {
             LOG.error("Service call for removing group {} failed for node with error {}", groupId, nodeId, throwable);
         }
     }
index e01c3cd43492bf5c543d24b9c20c8ccceff2d2c8..9410feae01261884371fc849b5ecbf80a1cfb4d2 100644 (file)
@@ -30,7 +30,6 @@ public class ListenerRegistrationHelper {
     private static final Logger LOG = LoggerFactory.getLogger(ListenerRegistrationHelper.class);
     private static final long INVENTORY_CHECK_TIMER = 1;
 
-    private final String operational = "OPERATIONAL";
     private final ListeningExecutorService listeningExecutorService;
     private final DataBroker dataBroker;
 
@@ -47,9 +46,9 @@ public class ListenerRegistrationHelper {
 
     public <T extends DataObject, L extends ClusteredDataTreeChangeListener<T>>
             ListenableFuture<ListenerRegistration<L>> checkedRegisterListener(
-                DataTreeIdentifier<T> treeId, L listener) {
+                final DataTreeIdentifier<T> treeId, final L listener) {
         return listeningExecutorService.submit(() -> {
-            while (!getInventoryConfigDataStoreStatus().equals(operational)) {
+            while (!getInventoryConfigDataStoreStatus().equals("OPERATIONAL")) {
                 try {
                     LOG.debug("Retrying for datastore to become operational for listener {}", listener);
                     Thread.sleep(INVENTORY_CHECK_TIMER * 1000);
index ecf18514a3dffe0e706f3c583ef49c8921a80109..9c437f7f3f0d64eac9918a97c51545b1cddc90c0 100644 (file)
@@ -48,7 +48,6 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class MeterForwarder extends AbstractListeningCommiter<Meter> {
-
     private static final Logger LOG = LoggerFactory.getLogger(MeterForwarder.class);
 
     public MeterForwarder(final ForwardingRulesManager manager, final DataBroker db,
@@ -56,19 +55,6 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         super(manager, db, listenerRegistrationHelper);
     }
 
-    @Override
-    public void deregisterListener() {
-        close();
-    }
-
-    @Override
-    public void close() {
-        if (listenerRegistration != null) {
-            listenerRegistration.close();
-            listenerRegistration = null;
-        }
-    }
-
     @Override
     protected InstanceIdentifier<Meter> getWildCardPath() {
         return InstanceIdentifier.create(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class)
@@ -85,7 +71,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         builder.setMeterRef(new MeterRef(identifier));
         builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
 
-        LoggingFutures.addErrorLogging(this.provider.getSalMeterService().removeMeter(builder.build()), LOG,
+        LoggingFutures.addErrorLogging(provider.getSalMeterService().removeMeter(builder.build()), LOG,
             "removeMeter");
     }
 
@@ -98,7 +84,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
         builder.setMeterRef(new MeterRef(identifier));
         builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
-        return this.provider.getSalMeterService().removeMeter(builder.build());
+        return provider.getSalMeterService().removeMeter(builder.build());
     }
 
     @Override
@@ -113,7 +99,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         builder.setUpdatedMeter(new UpdatedMeterBuilder(update).build());
         builder.setOriginalMeter(new OriginalMeterBuilder(original).build());
 
-        LoggingFutures.addErrorLogging(this.provider.getSalMeterService().updateMeter(builder.build()), LOG,
+        LoggingFutures.addErrorLogging(provider.getSalMeterService().updateMeter(builder.build()), LOG,
             "updateMeter");
     }
 
@@ -126,23 +112,23 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
         builder.setMeterRef(new MeterRef(identifier));
         builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
-        return this.provider.getSalMeterService().addMeter(builder.build());
+        return provider.getSalMeterService().addMeter(builder.build());
     }
 
     @Override
-    public void createStaleMarkEntity(InstanceIdentifier<Meter> identifier, Meter del,
-            InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    public void createStaleMarkEntity(final InstanceIdentifier<Meter> identifier, final Meter del,
+            final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         LOG.debug("Creating Stale-Mark entry for the switch {} for meter {} ", nodeIdent, del);
         StaleMeter staleMeter = makeStaleMeter(del);
         persistStaleMeter(staleMeter, nodeIdent);
     }
 
-    private static StaleMeter makeStaleMeter(Meter del) {
+    private static StaleMeter makeStaleMeter(final Meter del) {
         StaleMeterBuilder staleMeterBuilder = new StaleMeterBuilder(del);
         return staleMeterBuilder.setMeterId(del.getMeterId()).build();
     }
 
-    private void persistStaleMeter(StaleMeter staleMeter, InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    private void persistStaleMeter(final StaleMeter staleMeter, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         writeTransaction.put(LogicalDatastoreType.CONFIGURATION, getStaleMeterInstanceIdentifier(staleMeter, nodeIdent),
                 staleMeter);
@@ -151,15 +137,15 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         handleStaleMeterResultFuture(submitFuture);
     }
 
-    private static void handleStaleMeterResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleMeterResultFuture(final FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
-            public void onSuccess(Object result) {
+            public void onSuccess(final Object result) {
                 LOG.debug("Stale Meter creation success");
             }
 
             @Override
-            public void onFailure(Throwable throwable) {
+            public void onFailure(final Throwable throwable) {
                 LOG.error("Stale Meter creation failed", throwable);
             }
         }, MoreExecutors.directExecutor());
@@ -167,7 +153,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
 
     private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819
         .meters.StaleMeter> getStaleMeterInstanceIdentifier(
-            StaleMeter staleMeter, InstanceIdentifier<FlowCapableNode> nodeIdent) {
+            final StaleMeter staleMeter, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleMeter.class, new StaleMeterKey(new MeterId(staleMeter.getMeterId())));
     }
 }
index ebfb2ae744c6f7c1b385ba1be65d33f1cab9c257..b2ff5f0ac5e0d700e82a84690a6a90192bc0ffa2 100644 (file)
@@ -29,7 +29,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
-
     private static final Logger LOG = LoggerFactory.getLogger(TableForwarder.class);
 
     public TableForwarder(final ForwardingRulesManager manager, final DataBroker db,
@@ -37,19 +36,6 @@ public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
         super(manager, db, registrationHelper);
     }
 
-    @Override
-    public  void deregisterListener() {
-        close();
-    }
-
-    @Override
-    public void close() {
-        if (listenerRegistration != null) {
-            listenerRegistration.close();
-            listenerRegistration = null;
-        }
-    }
-
     @Override
     protected InstanceIdentifier<TableFeatures> getWildCardPath() {
         return InstanceIdentifier.create(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class)
@@ -94,11 +80,11 @@ public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
             .build());
         LOG.debug("Invoking SalTableService ");
 
-        if (this.provider.getSalTableService() != null) {
-            LOG.debug(" Handle to SalTableServices {}", this.provider.getSalTableService());
+        if (provider.getSalTableService() != null) {
+            LOG.debug(" Handle to SalTableServices {}", provider.getSalTableService());
         }
 
-        LoggingFutures.addErrorLogging(this.provider.getSalTableService().updateTable(builder.build()), LOG,
+        LoggingFutures.addErrorLogging(provider.getSalTableService().updateTable(builder.build()), LOG,
             "updateTable");
     }
 
@@ -109,14 +95,14 @@ public class TableForwarder extends AbstractListeningCommiter<TableFeatures> {
     }
 
     @Override
-    public void createStaleMarkEntity(InstanceIdentifier<TableFeatures> identifier, TableFeatures del,
-            InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    public void createStaleMarkEntity(final InstanceIdentifier<TableFeatures> identifier, final TableFeatures del,
+            final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         LOG.debug("NO-OP");
     }
 
     @Override
-    public Future<? extends RpcResult<?>> removeWithResult(InstanceIdentifier<TableFeatures> identifier,
-            TableFeatures del, InstanceIdentifier<FlowCapableNode> nodeIdent) {
+    public Future<? extends RpcResult<?>> removeWithResult(final InstanceIdentifier<TableFeatures> identifier,
+            final TableFeatures del, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return null;
     }
 }
index d954cf2129263e86fbb59c2183036dfb45c49413..7e7e0d90b0c57c218852b2296a6a5b716d166318 100644 (file)
@@ -100,11 +100,9 @@ import org.slf4j.LoggerFactory;
  * Execute CRUD API for flow + group + meter involving flat-batch strategy.
  */
 public class SyncPlanPushStrategyFlatBatchImpl implements SyncPlanPushStrategy {
-
     private static final Logger LOG = LoggerFactory.getLogger(SyncPlanPushStrategyFlatBatchImpl.class);
 
-    private SalFlatBatchService flatBatchService;
-    private TableForwarder tableForwarder;
+    private SalFlatBatchService flatBatchService = null;
 
     @Override
     public ListenableFuture<RpcResult<Void>> executeSyncStrategy(ListenableFuture<RpcResult<Void>> resultVehicle,
@@ -482,8 +480,8 @@ public class SyncPlanPushStrategyFlatBatchImpl implements SyncPlanPushStrategy {
         return this;
     }
 
+    @Deprecated(since = "0.17.2", forRemoval = true)
     public SyncPlanPushStrategyFlatBatchImpl setTableForwarder(final TableForwarder tableForwarder) {
-        this.tableForwarder = tableForwarder;
         return this;
     }
 }
index da2117120f17711f16eee157436f27bfaa3e8c1d..8299322df7f54e659b3a09c5d70f1762a254f48a 100644 (file)
@@ -55,13 +55,11 @@ import org.slf4j.LoggerFactory;
  * Execute CRUD API for flow + group + meter involving one-by-one (incremental) strategy.
  */
 public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy {
-
     private static final Logger LOG = LoggerFactory.getLogger(SyncPlanPushStrategyIncrementalImpl.class);
 
     private FlowForwarder flowForwarder;
     private MeterForwarder meterForwarder;
     private GroupForwarder groupForwarder;
-    private TableForwarder tableForwarder;
     private FlowCapableTransactionService transactionService;
 
     @Override
@@ -75,59 +73,37 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy
         // TODO enable table-update when ready
         //resultVehicle = updateTableFeatures(nodeIdent, configTree);
 
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-                //final ListenableFuture<RpcResult<Void>> singleVoidUpdateResult = Futures.transform(
-                //        Futures.asList Arrays.asList(input, output),
-                //        ReconcileUtil.<UpdateFlowOutput>createRpcResultCondenser("TODO"));
-            // }
-            return addMissingGroups(nodeId, nodeIdent, diffInput.getGroupsToAddOrUpdate(), counters);
-        }, MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> addMissingGroups(nodeId, nodeIdent, diffInput.getGroupsToAddOrUpdate(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "addMissingGroups"),
-                MoreExecutors.directExecutor());
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-            // }
-            return addMissingMeters(nodeId, nodeIdent, diffInput.getMetersToAddOrUpdate(), counters);
-        }, MoreExecutors.directExecutor());
+            MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> addMissingMeters(nodeId, nodeIdent, diffInput.getMetersToAddOrUpdate(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "addMissingMeters"),
-                MoreExecutors.directExecutor());
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-            // }
-            return addMissingFlows(nodeId, nodeIdent, diffInput.getFlowsToAddOrUpdate(), counters);
-        }, MoreExecutors.directExecutor());
+            MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> addMissingFlows(nodeId, nodeIdent, diffInput.getFlowsToAddOrUpdate(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "addMissingFlows"),
-                MoreExecutors.directExecutor());
-
+            MoreExecutors.directExecutor());
 
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-            // }
-            return removeRedundantFlows(nodeId, nodeIdent, diffInput.getFlowsToRemove(), counters);
-        }, MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> removeRedundantFlows(nodeId, nodeIdent, diffInput.getFlowsToRemove(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "removeRedundantFlows"),
-                MoreExecutors.directExecutor());
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-            // }
-            return removeRedundantMeters(nodeId, nodeIdent, diffInput.getMetersToRemove(), counters);
-        }, MoreExecutors.directExecutor());
+            MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> removeRedundantMeters(nodeId, nodeIdent, diffInput.getMetersToRemove(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "removeRedundantMeters"),
-                MoreExecutors.directExecutor());
-        resultVehicle = Futures.transformAsync(resultVehicle, input -> {
-            // if (!input.isSuccessful()) {
-                //TODO chain errors but not skip processing on first error return Futures.immediateFuture(input);
-            // }
-            return removeRedundantGroups(nodeId, nodeIdent, diffInput.getGroupsToRemove(), counters);
-        }, MoreExecutors.directExecutor());
+            MoreExecutors.directExecutor());
+        resultVehicle = Futures.transformAsync(resultVehicle,
+            input -> removeRedundantGroups(nodeId, nodeIdent, diffInput.getGroupsToRemove(), counters),
+            MoreExecutors.directExecutor());
         Futures.addCallback(resultVehicle, FxChainUtil.logResultCallback(nodeId, "removeRedundantGroups"),
-                MoreExecutors.directExecutor());
+            MoreExecutors.directExecutor());
         return resultVehicle;
     }
 
@@ -483,8 +459,8 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy
         return this;
     }
 
+    @Deprecated(since = "0.17.2", forRemoval = true)
     public SyncPlanPushStrategyIncrementalImpl setTableForwarder(final TableForwarder tableForwarder) {
-        this.tableForwarder = tableForwarder;
         return this;
     }
 
@@ -503,5 +479,4 @@ public class SyncPlanPushStrategyIncrementalImpl implements SyncPlanPushStrategy
         this.transactionService = transactionService;
         return this;
     }
-
 }
index 43281973e9aa6e6713b95027ab3f7f9c74355394..25661a3b7ddc88461bb58c6df2b94f8885ebc9a4 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index ae0161edc553ad0df90f01376bb3aa340381bc64..07f4a6c0b727eb350fa5d9411e0e820aa071ad13 100644 (file)
@@ -17,17 +17,17 @@ import org.opendaylight.openflowplugin.applications.reconciliation.Reconciliatio
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@Command(scope = "reconciliation", name = "getRegisteredServices", description = "displaying services registered to "
-        + "Reconciliation Framework")
 /*
- * CLI to display the service priority, service name and service status TODO
- * service status
+ * CLI to display the service priority, service name and service status
+ * FIXME: service status
  */
+@Command(scope = "reconciliation", name = "getRegisteredServices",
+    description = "displaying services registered to Reconciliation Framework")
 public class GetRegisteredServices extends OsgiCommandSupport {
     private static final Logger LOG = LoggerFactory.getLogger(GetRegisteredServices.class);
     private static final String CLI_FORMAT = "%d %-20s ";
 
-    private ReconciliationManager reconciliationManager;
+    private ReconciliationManager reconciliationManager = null;
 
     public void setReconciliationManager(final ReconciliationManager reconciliationManager) {
         this.reconciliationManager = requireNonNull(reconciliationManager, "ReconciliationManager can not be null!");
index fb00d4e0842dae27a56982655620e080ec5d7c22..6a9118eb6a23c43d39df2686fb315364bbb8d2fd 100644 (file)
@@ -70,10 +70,9 @@ public class ReconciliationServiceImpl implements ReconciliationService, AutoClo
     private final FrmReconciliationService frmReconciliationService;
     private final AlarmAgent alarmAgent;
     private final NodeListener nodeListener;
-    private final int threadPoolSize = 10;
     private final Map<String, ReconciliationState> reconciliationStates;
 
-    private ExecutorService executor = Executors.newWorkStealingPool(threadPoolSize);
+    private ExecutorService executor = Executors.newWorkStealingPool(10);
 
     public ReconciliationServiceImpl(final DataBroker broker, final FrmReconciliationService frmReconciliationService,
                                      final AlarmAgent alarmAgent, final NodeListener nodeListener,
index 5a9cf4a21feacdbecc7d7e0d456ce37f0eabf879..de09ed3635939ef20efc45f95a9dcc62e790e991 100644 (file)
@@ -28,9 +28,9 @@ import org.slf4j.LoggerFactory;
 
 @Command(scope = "openflow", name = "reconcile", description = "Launch reconciliation for openflow nodes")
 public class Reconciliation extends OsgiCommandSupport {
-
     private static final Logger LOG = LoggerFactory.getLogger(Reconciliation.class);
-    private ReconciliationService reconciliationService;
+
+    private ReconciliationService reconciliationService = null;
 
     public void setReconciliationService(final ReconciliationService reconciliationService) {
         this.reconciliationService = reconciliationService;
index b0594925e54bf7673fe5c136def48369d246921e..35bdd55f8d40380d3d5ad0dc91450c20f5572b91 100644 (file)
@@ -43,8 +43,9 @@ public class FlowCapableTopologyProvider implements ClusterSingletonService, Aut
     private final NotificationService notificationService;
     private final OperationProcessor processor;
     private final ClusterSingletonServiceProvider clusterSingletonServiceProvider;
+
     private InstanceIdentifier<Topology> topologyPathIID;
-    private TransactionChainManager transactionChainManager;
+    private TransactionChainManager transactionChainManager = null;
     private Registration listenerRegistration;
     private ClusterSingletonServiceRegistration singletonServiceRegistration;
 
index 6cd9de214212de3b32ef8b6b18e8b3a212dc4923..198717a4989cfacb5b102eba79d86486b3788d4b 100644 (file)
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index df9f4b70acf452001fcf949a50e34aea8ead224c..fb73dcafe689281c54b87a073e5f560cd5724e0c 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
   </parent>
   <groupId>org.opendaylight.openflowplugin</groupId>
   <artifactId>openflowplugin-karaf</artifactId>
index 438a6d75c9514a14544938b1cc02da0abceccede..1418697767b72b9d5a97fb67accd8c71b7b2ffaf 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 1881641148d86e292da8181d5d004c391cea6003..e1561fe1b68cc4d51cc098c18b6bff6b3a8df8bf 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index be346b9a0360a596cd1cc5faa1728d68f73f8b8c..93f8ee3983048dc61a2742dff8427a452c129fe3 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index a4973e80204ad8bae2c83561ad48cfcfe8b9a8a4..d9cad742a4675943709d2fa2a2eaaa9e1220f086 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index e38569f7a740f5ea3aeb0e25ab66a05a423544c3..d7c6c05cb1af5dd05509d4fdfe45824da104bb35 100644 (file)
@@ -3,7 +3,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
index 27cfc01925391ae5c0cde8bc673928e69fce69ce..2b5828f8e7fd4ad183c19803d10f0c787ff99078 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index fa3212ee1aa027aad98b410de4f8fcc31bd6ffa7..872fe47be84384992f68bbcd0667a5dd5f4e75a8 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 18a1cc87a5edb1484ccce600196e9fa00f6d2f35..8244e3cf541587a0b08601d85e8852c1664bf739 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 0314f1f368b2037467667ba08da153e34fb96d7e..1a8f8d836080d71cfb44fe7c7a05aa3145b70e46 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 7c6f6460ec29aa4fd6396ea6871ba5912a031dab..a32746e730aff6ab9b2617bf61826cbfa8a5d111 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 752cf3432dcdfd106b3535418bc946fee6c35d48..8f780eb55d093e4d49ecfa8665764ac809033bf6 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 2e2eedf0da8921162065ac8818ffcd7c2be90db9..7bfc17d876ae4c16c72699775436badbc96bcdec 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index f6fe877fee2700bf484345d4b987476724a6e1a4..6adef19ac58913db3789a2bf22a1d2638abef197 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 7a40042c206505e385ef0d107d0acddd922d1b46..b60d133bc4df6eb2da9be743b1447588b2cf06bf 100644 (file)
@@ -4,7 +4,7 @@
 <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>single-feature-parent</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
 </parent>
 
index 452d9ba81bd1835c339656a788e1145c5fccdc10..587e0489a1ed42a31696086e510a18c25d6f73ae 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index ca2641ee1618a7a22b0796181e9c3c546fcc9e8d..d2c6cbf276a9a998ab5bcac5dfb347b205c2972a 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 038c771c37b296fde59d07fdfddb1df253594ea4..6a322cc7a6d1648e07d325e54bf485d0bea25923 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 69fe489daa3775cc3ddb5d10043bf6e828427e17..c17311638ce49ff9a986ed2342829b9321c50eb9 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 6e5a0531d9117a9a4915046990cb92b00299e98e..39763300c607b7a80d12969c2cd1bb136c6064ef 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 49c3bc043c69b195267bd6070f330b4b4a0afaab..f704bbf7cd2a7560ac77ba7e91cc02918f5fbba9 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 4724d0ba57702803f2bb8999c43bd267f0b67d53..37dc2ae26b9df62911ef5a1be228cde2e1756564 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
@@ -21,7 +21,7 @@
             <dependency>
                 <groupId>org.opendaylight.netconf</groupId>
                 <artifactId>netconf-artifacts</artifactId>
-                <version>6.0.5</version>
+                <version>6.0.6</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 2ec32bbd3243f26f2a645f306088cf75d9d58825..5cecf01b06c3b674bdf2190416c5bb796dd58183 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 52eef7226b3c276bd33ce7265b1b37724312aa2a..22b43252dc0b21771f64a13730ce3327f20df65e 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index b0bba32570b0cda50c920a8c4689f3c598b03e83..c060fcd04886996241f351306266b13c661b5812 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
@@ -21,7 +21,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>12.0.3</version>
+                <version>12.0.4</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
@@ -30,7 +30,7 @@
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>controller-artifacts</artifactId>
-                <version>8.0.3</version>
+                <version>8.0.4</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index f036369bbb3f075d934d53b080d05f6e10080c3d..6ba07905058e054f37a3636f4adeeedbfd9431da 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>controller-artifacts</artifactId>
-                <version>8.0.3</version>
+                <version>8.0.4</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.infrautils</groupId>
                 <artifactId>infrautils-artifacts</artifactId>
-                <version>6.0.4</version>
+                <version>6.0.5</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index eb7b9b374b4bc128d12b4070a4a6b552db5b8a79..9c8ac8bbbd4c49ebd680cb6c2cd68de8a6a09802 100644 (file)
@@ -4,7 +4,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 2822b2736f1d765ec0310a60d58df4f98022099a..e17d955dc7c495c3b48dc1148423176090e67d93 100644 (file)
@@ -22,11 +22,10 @@ import org.slf4j.LoggerFactory;
  * deserialize.
  */
 public abstract class Packet {
-
     private static final Logger LOG = LoggerFactory.getLogger(Packet.class);
 
     // Access level granted to this packet
-    protected boolean writeAccess;
+    protected final boolean writeAccess;
 
     // When deserialized from wire, packet could result corrupted
     protected boolean corrupted;
@@ -99,8 +98,8 @@ public abstract class Packet {
         for (Entry<String, Pair<Integer, Integer>> pairs : hdrFieldCoordMap
                 .entrySet()) {
             String hdrField = pairs.getKey();
-            startOffset = bitOffset + this.getfieldOffset(hdrField);
-            numBits = this.getfieldnumBits(hdrField);
+            startOffset = bitOffset + getfieldOffset(hdrField);
+            numBits = getfieldnumBits(hdrField);
 
             byte[] hdrFieldBytes;
             try {
@@ -114,7 +113,7 @@ public abstract class Packet {
              * Store the raw read value, checks the payload type and set the
              * payloadClass accordingly
              */
-            this.setHeaderField(hdrField, hdrFieldBytes);
+            setHeaderField(hdrField, hdrFieldBytes);
 
             if (LOG.isTraceEnabled()) {
                 LOG.trace("{}: {}: {} (offset {} bitsize {})", this.getClass().getSimpleName(), hdrField,
@@ -165,7 +164,7 @@ public abstract class Packet {
         int payloadSize = payloadBytes == null ? 0 : payloadBytes.length;
 
         // Allocate the buffer to contain the full (header + payload) packet
-        int headerSize = this.getHeaderSize() / NetUtils.NUM_BITS_IN_A_BYTE;
+        int headerSize = getHeaderSize() / NetUtils.NUM_BITS_IN_A_BYTE;
         byte[] packetBytes = new byte[headerSize + payloadSize];
         if (payloadBytes != null) {
             System.arraycopy(payloadBytes, 0, packetBytes, headerSize, payloadSize);
@@ -303,7 +302,7 @@ public abstract class Packet {
      * @param bytes The raw payload as byte array
      */
     public void setRawPayload(final byte[] bytes) {
-        this.rawPayload = Arrays.copyOf(bytes, bytes.length);
+        rawPayload = Arrays.copyOf(bytes, bytes.length);
     }
 
     /**
@@ -326,7 +325,7 @@ public abstract class Packet {
         final int prime = 31;
         int result = super.hashCode();
         result = prime * result
-                + (this.hdrFieldsMap == null ? 0 : hdrFieldsMap.hashCode());
+                + (hdrFieldsMap == null ? 0 : hdrFieldsMap.hashCode());
         return result;
     }
 
index 9919ea106e902de73978625bea0ed10568a3f805..b4c4f6c3540837a0de63bfaf040ec70b4f9fce36 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index e7b992ec9f7efa6548e88b23e652e542fa4fbf2d..7aaed7278dbe41948ada5a71f4d15dd4f84455a7 100644 (file)
@@ -6,7 +6,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index d740ce8d763333bf51287754286643355932c70d..7d5223366bc5d5ffc64229cb2807fe04618b7bff 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>feature-repo-parent</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index e7c77248fae59f0d0aed760427ead010b580f21b..2dd8540260cda017a256accb64f0e7eb51f0b85d 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
@@ -33,7 +33,7 @@
             <dependency>
                 <groupId>org.opendaylight.infrautils</groupId>
                 <artifactId>infrautils-artifacts</artifactId>
-                <version>6.0.4</version>
+                <version>6.0.5</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
@@ -42,7 +42,7 @@
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>11.0.4</version>
+                <version>11.0.5</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
@@ -51,7 +51,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>12.0.3</version>
+                <version>12.0.4</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 5f31add01247eb02868ff3581fc89e3e572237ea..6e274bb4ce01b4ec98faf094fe54fb8302038474 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index 3fa1ef506e390d32237aac31b374ba9e5f6fd6a8..fd2086b0edcef5a2848788fcdce5fd50f4b60809 100644 (file)
@@ -23,9 +23,9 @@ import org.slf4j.LoggerFactory;
  * @author michal.polkorab
  */
 public class OFDatagramPacketDecoder extends SimpleChannelInboundHandler<VersionMessageUdpWrapper> {
-
     private static final Logger LOG = LoggerFactory.getLogger(OFDatagramPacketDecoder.class);
-    private DeserializationFactory deserializationFactory;
+
+    private DeserializationFactory deserializationFactory = null;
 
     @Override
     @SuppressWarnings("checkstyle:IllegalCatch")
index f4f7f97dfa54d737adf657e0d95ffd2bcbe621c4..573973cfce4c68d8af0197b2458b3cdb881c3778 100644 (file)
@@ -26,9 +26,9 @@ import org.slf4j.LoggerFactory;
  * @author michal.polkorab
  */
 public class OFDatagramPacketEncoder extends MessageToMessageEncoder<UdpMessageListenerWrapper> {
-
     private static final Logger LOG = LoggerFactory.getLogger(OFDatagramPacketEncoder.class);
-    private SerializationFactory serializationFactory;
+
+    private SerializationFactory serializationFactory = null;
 
     @Override
     @SuppressWarnings("checkstyle:IllegalCatch")
index 18c80e34c268feb57dda1be68e6b576572a14073..67bb0a3d32ea7c0ea9f56df5625c40ef914e384e 100644 (file)
@@ -5,8 +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.openflowjava.protocol.impl.core;
 
 import org.opendaylight.openflowjava.protocol.api.connection.ThreadConfiguration;
@@ -17,11 +15,11 @@ import org.opendaylight.openflowjava.protocol.api.connection.ThreadConfiguration
  * @author mirehak
  */
 public interface ServerFacade extends ShutdownProvider, OnlineProvider, Runnable {
-
     /**
      * Sets thread configuration.
      *
      * @param threadConfig desired thread configuration
      */
+    @Deprecated(since = "0.17.2", forRemoval = true)
     void setThreadConfig(ThreadConfiguration threadConfig);
 }
index 2c0f711f4e3972882eb14ee4296771a0227b2ac8..9e8d1fa9bebabb132b2cd811aa55f586a5f241c1 100644 (file)
@@ -40,7 +40,7 @@ public class TcpConnectionInitializer implements ServerFacade, ConnectionInitial
      *
      * @param workerGroup - shared worker group
      */
-    public TcpConnectionInitializer(EventLoopGroup workerGroup, boolean isEpollEnabled) {
+    public TcpConnectionInitializer(final EventLoopGroup workerGroup, final boolean isEpollEnabled) {
         this.workerGroup = requireNonNull(workerGroup, "WorkerGroup can't be null");
         this.isEpollEnabled = isEpollEnabled;
     }
@@ -69,12 +69,13 @@ public class TcpConnectionInitializer implements ServerFacade, ConnectionInitial
     }
 
     @Override
-    public void setThreadConfig(ThreadConfiguration threadConfig) {
+    @Deprecated(since = "0.17.2", forRemoval = true)
+    public void setThreadConfig(final ThreadConfiguration threadConfig) {
         // IGNORE
     }
 
     @Override
-    public void initiateConnection(String host, int port) {
+    public void initiateConnection(final String host, final int port) {
         try {
             bootstrap.connect(host, port).sync();
         } catch (InterruptedException e) {
@@ -82,7 +83,7 @@ public class TcpConnectionInitializer implements ServerFacade, ConnectionInitial
         }
     }
 
-    public void setChannelInitializer(TcpChannelInitializer channelInitializer) {
+    public void setChannelInitializer(final TcpChannelInitializer channelInitializer) {
         this.channelInitializer = channelInitializer;
     }
 }
index 9ca513ae0ece53c2f19c018cf1575f0e44e330b1..25789dcc1dfb12fad1167c615209e319718293b2 100644 (file)
@@ -55,7 +55,6 @@ public class TcpHandler implements ServerFacade {
     private EventLoopGroup workerGroup;
     private EventLoopGroup bossGroup;
     private final SettableFuture<Boolean> isOnlineFuture = SettableFuture.create();
-    private ThreadConfiguration threadConfig;
 
     private TcpChannelInitializer channelInitializer;
 
@@ -66,7 +65,7 @@ public class TcpHandler implements ServerFacade {
      *
      * @param port listening port of TCPHandler server
      */
-    public TcpHandler(final int port, Runnable readyRunnable) {
+    public TcpHandler(final int port, final Runnable readyRunnable) {
         this(null, port, readyRunnable);
     }
 
@@ -75,9 +74,9 @@ public class TcpHandler implements ServerFacade {
      * @param address listening address of TCPHandler server
      * @param port listening port of TCPHandler server
      */
-    public TcpHandler(final InetAddress address, final int port, Runnable readyRunnable) {
+    public TcpHandler(final InetAddress address, final int port, final Runnable readyRunnable) {
         this.port = port;
-        this.startupAddress = address;
+        startupAddress = address;
         this.readyRunnable = readyRunnable;
     }
 
@@ -132,7 +131,7 @@ public class TcpHandler implements ServerFacade {
             address = isa.getHostString();
 
             // Update port, as it may have been specified as 0
-            this.port = isa.getPort();
+            port = isa.getPort();
 
             LOG.debug("address from tcphandler: {}", address);
             LOG.info("Switch listener started and ready to accept incoming tcp/tls connections on port: {}", port);
@@ -187,13 +186,14 @@ public class TcpHandler implements ServerFacade {
         return address;
     }
 
-    public void setChannelInitializer(TcpChannelInitializer channelInitializer) {
+    public void setChannelInitializer(final TcpChannelInitializer channelInitializer) {
         this.channelInitializer = channelInitializer;
     }
 
     @Override
-    public void setThreadConfig(ThreadConfiguration threadConfig) {
-        this.threadConfig = threadConfig;
+    @Deprecated(since = "0.17.2", forRemoval = true)
+    public void setThreadConfig(final ThreadConfiguration threadConfig) {
+        // No-op
     }
 
     /**
@@ -201,7 +201,7 @@ public class TcpHandler implements ServerFacade {
      *
      * @param threadConfiguration number of threads to be created, if not specified in threadConfig
      */
-    public void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled) {
+    public void initiateEventLoopGroups(final ThreadConfiguration threadConfiguration, final boolean isEpollEnabled) {
         if (isEpollEnabled) {
             initiateEpollEventLoopGroups(threadConfiguration);
         } else {
@@ -214,7 +214,7 @@ public class TcpHandler implements ServerFacade {
      *
      * @param threadConfiguration number of threads to be created, if not specified in threadConfig
      */
-    public void initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration) {
+    public void initiateNioEventLoopGroups(final ThreadConfiguration threadConfiguration) {
         socketChannelClass = NioServerSocketChannel.class;
         if (threadConfiguration != null) {
             bossGroup = new NioEventLoopGroup(threadConfiguration.getBossThreadCount());
@@ -232,7 +232,7 @@ public class TcpHandler implements ServerFacade {
      * @param threadConfiguration the ThreadConfiguration
      */
     @SuppressWarnings("checkstyle:IllegalCatch")
-    protected void initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration) {
+    protected void initiateEpollEventLoopGroups(final ThreadConfiguration threadConfiguration) {
         try {
             socketChannelClass = EpollServerSocketChannel.class;
             if (threadConfiguration != null) {
index 3a373c96b0e817882d9925e7acf4935e92d99725..f4ad4b2e4ae033b4121a99593baed1b13c490a90 100644 (file)
@@ -39,8 +39,8 @@ public final class UdpHandler implements ServerFacade {
     private final InetAddress startupAddress;
     private final Runnable readyRunnable;
     private final SettableFuture<Boolean> isOnlineFuture = SettableFuture.create();
+
     private UdpChannelInitializer channelInitializer;
-    private ThreadConfiguration threadConfig;
     private Class<? extends DatagramChannel> datagramChannelClass;
 
     /**
@@ -48,7 +48,7 @@ public final class UdpHandler implements ServerFacade {
      *
      * @param port listening port of UdpHandler server
      */
-    public UdpHandler(final int port, Runnable readyRunnable) {
+    public UdpHandler(final int port, final Runnable readyRunnable) {
         this(null, port, readyRunnable);
     }
 
@@ -57,9 +57,9 @@ public final class UdpHandler implements ServerFacade {
      * @param address listening address of UdpHandler server
      * @param port listening port of UdpHandler server
      */
-    public UdpHandler(final InetAddress address, final int port, Runnable readyRunnable) {
+    public UdpHandler(final InetAddress address, final int port, final Runnable readyRunnable) {
         this.port = port;
-        this.startupAddress = address;
+        startupAddress = address;
         this.readyRunnable = readyRunnable;
     }
 
@@ -91,7 +91,7 @@ public final class UdpHandler implements ServerFacade {
             String address = isa.getHostString();
 
             // Update port, as it may have been specified as 0
-            this.port = isa.getPort();
+            port = isa.getPort();
 
             LOG.debug("Address from udpHandler: {}", address);
             LOG.info("Switch listener started and ready to accept incoming udp connections on port: {}", port);
@@ -128,13 +128,14 @@ public final class UdpHandler implements ServerFacade {
         return port;
     }
 
-    public void setChannelInitializer(UdpChannelInitializer channelInitializer) {
+    public void setChannelInitializer(final UdpChannelInitializer channelInitializer) {
         this.channelInitializer = channelInitializer;
     }
 
     @Override
-    public void setThreadConfig(ThreadConfiguration threadConfig) {
-        this.threadConfig = threadConfig;
+    @Deprecated(since = "0.17.2", forRemoval = true)
+    public void setThreadConfig(final ThreadConfiguration threadConfig) {
+        // No-op
     }
 
     /**
@@ -142,7 +143,7 @@ public final class UdpHandler implements ServerFacade {
      *
      * @param threadConfiguration number of threads to be created, if not specified in threadConfig
      */
-    public void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled) {
+    public void initiateEventLoopGroups(final ThreadConfiguration threadConfiguration, final boolean isEpollEnabled) {
         if (isEpollEnabled) {
             initiateEpollEventLoopGroups(threadConfiguration);
         } else {
@@ -155,7 +156,7 @@ public final class UdpHandler implements ServerFacade {
      *
      * @param threadConfiguration number of threads to be created, if not specified in threadConfig
      */
-    public void initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration) {
+    public void initiateNioEventLoopGroups(final ThreadConfiguration threadConfiguration) {
         datagramChannelClass = NioDatagramChannel.class;
         if (threadConfiguration != null) {
             group = new NioEventLoopGroup(threadConfiguration.getWorkerThreadCount());
@@ -170,7 +171,7 @@ public final class UdpHandler implements ServerFacade {
      * @param threadConfiguration the ThreadConfiguration
      */
     @SuppressWarnings("checkstyle:IllegalCatch")
-    protected void initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration) {
+    protected void initiateEpollEventLoopGroups(final ThreadConfiguration threadConfiguration) {
         try {
             datagramChannelClass = EpollDatagramChannel.class;
             if (threadConfiguration != null) {
index 4ab309a272041e368bde833922b8859ed15f0e09..c9a43575521c52b950f9cdb0da002f568685f1b9 100755 (executable)
@@ -38,16 +38,15 @@ import org.slf4j.LoggerFactory;
  * @author timotej.kubas
  * @author michal.polkorab
  */
-public class MeterModInputMessageFactory implements OFSerializer<MeterModInput>,
-        SerializerRegistryInjector {
+public class MeterModInputMessageFactory implements OFSerializer<MeterModInput>, SerializerRegistryInjector {
+    private static final Logger LOG = LoggerFactory .getLogger(MeterModInputMessageFactory.class);
 
-    private static final Logger LOG = LoggerFactory
-            .getLogger(MeterModInputMessageFactory.class);
     private static final byte MESSAGE_TYPE = 29;
     private static final short LENGTH_OF_METER_BANDS = 16;
     private static final short PADDING_IN_METER_BAND_DROP = 4;
     private static final short PADDING_IN_METER_BAND_DSCP_REMARK = 3;
-    private SerializerRegistry registry;
+
+    private SerializerRegistry registry = null;
 
     @Override
     public void serialize(final MeterModInput message, final ByteBuf outBuffer) {
@@ -71,19 +70,16 @@ public class MeterModInputMessageFactory implements OFSerializer<MeterModInput>,
         if (bands != null) {
             for (Bands currentBand : bands) {
                 MeterBand meterBand = currentBand.getMeterBand();
-                if (meterBand instanceof MeterBandDropCase) {
-                    MeterBandDropCase dropBandCase = (MeterBandDropCase) meterBand;
+                if (meterBand instanceof MeterBandDropCase dropBandCase) {
                     MeterBandDrop dropBand = dropBandCase.getMeterBandDrop();
                     writeBandCommonFields(dropBand, outBuffer);
                     outBuffer.writeZero(PADDING_IN_METER_BAND_DROP);
-                } else if (meterBand instanceof MeterBandDscpRemarkCase) {
-                    MeterBandDscpRemarkCase dscpRemarkBandCase = (MeterBandDscpRemarkCase) meterBand;
+                } else if (meterBand instanceof MeterBandDscpRemarkCase dscpRemarkBandCase) {
                     MeterBandDscpRemark dscpRemarkBand = dscpRemarkBandCase.getMeterBandDscpRemark();
                     writeBandCommonFields(dscpRemarkBand, outBuffer);
                     outBuffer.writeByte(dscpRemarkBand.getPrecLevel().toJava());
                     outBuffer.writeZero(PADDING_IN_METER_BAND_DSCP_REMARK);
-                } else if (meterBand instanceof MeterBandExperimenterCase) {
-                    MeterBandExperimenterCase experimenterBandCase = (MeterBandExperimenterCase) meterBand;
+                } else if (meterBand instanceof MeterBandExperimenterCase experimenterBandCase) {
                     MeterBandExperimenter experimenterBand = experimenterBandCase.getMeterBandExperimenter();
                     ExperimenterIdMeterBand expIdMeterBand =
                             experimenterBand.augmentation(ExperimenterIdMeterBand.class);
index b208e9e449fd7a6a513f1bf4f9794fb8e751dc1f..0da56924fe97bd190655fd03ced1392982ffbc3a 100644 (file)
@@ -34,7 +34,8 @@ public class OF13MatchSerializer implements OFSerializer<Match>, SerializerRegis
     private static final Logger LOG = LoggerFactory.getLogger(OF13MatchSerializer.class);
     private static final byte STANDARD_MATCH_TYPE_CODE = 0;
     private static final byte OXM_MATCH_TYPE_CODE = 1;
-    private SerializerRegistry registry;
+
+    private SerializerRegistry registry = null;
 
     @Override
     public void serialize(final Match match, final ByteBuf outBuffer) {
index a4fa77a4e8086b07bc242946ee44a9e9e69875ff..e4834f2ad869ef37b697057f41ff80c64d9250a6 100644 (file)
@@ -40,17 +40,17 @@ import org.slf4j.LoggerFactory;
 public class ConnectionContextImpl implements ConnectionContext {
     private static final Logger LOG = LoggerFactory.getLogger(ConnectionContextImpl.class);
 
+    private final List<PortStatusMessage> portStatusMessages = new ArrayList<>();
     private final ConnectionAdapter connectionAdapter;
+
     private volatile CONNECTION_STATE connectionState;
-    private FeaturesReply featuresReply;
+    private FeaturesReply featuresReply = null;
     private NodeId nodeId;
     private DeviceDisconnectedHandler deviceDisconnectedHandler;
     private OutboundQueueProvider outboundQueueProvider;
     private OutboundQueueHandlerRegistration<OutboundQueueProvider> outboundQueueHandlerRegistration;
-    private HandshakeContext handshakeContext;
-    private DeviceInfo deviceInfo;
-    private final List<PortStatusMessage> portStatusMessages = new ArrayList<>();
-    private final DeviceConnectionStatusProvider deviceConnectionStatusProvider;
+    private HandshakeContext handshakeContext = null;
+    private DeviceInfo deviceInfo = null;
 
     /**
      * Constructor.
@@ -60,7 +60,6 @@ public class ConnectionContextImpl implements ConnectionContext {
     public ConnectionContextImpl(final ConnectionAdapter connectionAdapter,
                                  final DeviceConnectionStatusProvider deviceConnectionStatusProvider) {
         this.connectionAdapter = connectionAdapter;
-        this.deviceConnectionStatusProvider = deviceConnectionStatusProvider;
     }
 
     @Override
index f087f27440b11acc96f05395a9d9e891d96354bd..db894575883b8dde4a41fbe65eaa8ac7d0e45f27 100644 (file)
@@ -29,13 +29,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class HandshakeListenerImpl implements HandshakeListener {
-
     private static final Logger LOG = LoggerFactory.getLogger(HandshakeListenerImpl.class);
     private static final Logger OF_EVENT_LOG = LoggerFactory.getLogger("OfEventLog");
 
     private final ConnectionContext connectionContext;
     private final DeviceConnectedHandler deviceConnectedHandler;
-    private HandshakeContext handshakeContext;
+
+    private HandshakeContext handshakeContext = null;
 
     /**
      * Constructor.
@@ -55,7 +55,7 @@ public class HandshakeListenerImpl implements HandshakeListener {
             LOG.debug("handshake succeeded: {}", connectionContext.getConnectionAdapter().getRemoteAddress());
         }
         OF_EVENT_LOG.debug("Connect, Node: {}", featureOutput.getDatapathId());
-        this.handshakeContext.close();
+        handshakeContext.close();
         connectionContext.changeStateToWorking();
         connectionContext.setFeatures(featureOutput);
         connectionContext.setNodeId(InventoryDataServiceUtil.nodeIdFromDatapathId(featureOutput.getDatapathId()));
@@ -104,16 +104,16 @@ public class HandshakeListenerImpl implements HandshakeListener {
                 .setXid(xid)
                 .setVersion(version)
                 .build();
-        return this.connectionContext.getConnectionAdapter().barrier(barrierInput);
+        return connectionContext.getConnectionAdapter().barrier(barrierInput);
     }
 
     @Override
     public void onHandshakeFailure() {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("handshake failed: {}", this.connectionContext.getConnectionAdapter().getRemoteAddress());
+            LOG.debug("handshake failed: {}", connectionContext.getConnectionAdapter().getRemoteAddress());
         }
-        this.handshakeContext.close();
-        this.connectionContext.closeConnection(false);
+        handshakeContext.close();
+        connectionContext.closeConnection(false);
     }
 
     @Override
index 47ee1a6c77c8a55f7267468c0b70d975f7b0701c..d655953c69625a364c616a392b086463f7f27614 100644 (file)
@@ -29,11 +29,12 @@ import org.slf4j.LoggerFactory;
 
 public class MatchDeserializer implements OFDeserializer<Match>, HeaderDeserializer<Match>,
         MatchEntryDeserializerRegistry, MatchEntryDeserializer, DeserializerRegistryInjector {
-
     private static final Logger LOG = LoggerFactory.getLogger(MatchDeserializer.class);
+
     private final Map<MatchEntryDeserializerKey, MatchEntryDeserializer> entryRegistry = new HashMap<>();
     private final MatchPath matchPath;
-    private DeserializerRegistry registry;
+
+    private DeserializerRegistry registry = null;
 
     public MatchDeserializer(final MatchPath matchPath) {
         this.matchPath = matchPath;
index 514fae0b79a985bf3feb32455937c48e29cab2ae..47ab7112023bad766fe6172c7867d40f07b0dbf1 100644 (file)
@@ -25,13 +25,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.experimenter.types.rev151020.experimenter.core.message.ExperimenterMessageOfChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.experimenter.types.rev151020.multipart.reply.multipart.reply.body.MultipartReplyExperimenterBuilder;
 import org.opendaylight.yangtools.yang.common.Uint32;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class MultipartReplyExperimenterDeserializer implements OFDeserializer<MultipartReplyBody>,
         DeserializerRegistryInjector {
-    private static final Logger LOG = LoggerFactory.getLogger(MultipartReplyExperimenterDeserializer.class);
-    private DeserializerRegistry registry;
+    private DeserializerRegistry registry = null;
 
     @Override
     @SuppressWarnings("unchecked")
index 954796c48e6df05998e88a0236c7776b9656e735..9b11140fbde2069fe2c0ff17ad6e99598aba8000 100644 (file)
@@ -78,7 +78,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
     private static final TableFeaturesMatchFieldDeserializer MATCH_FIELD_DESERIALIZER =
             new TableFeaturesMatchFieldDeserializer();
 
-    private DeserializerRegistry registry;
+    private DeserializerRegistry registry = null;
 
     @Override
     public MultipartReplyBody deserialize(final ByteBuf message) {
index 46ecfead402a7d6a96d5d3ef879c2d4b225c0843..c9565dbaa62fa641dfaa2258ae449f1d4b2c6a23 100644 (file)
@@ -37,13 +37,12 @@ import org.slf4j.LoggerFactory;
 
 public class MatchSerializer implements OFSerializer<Match>, HeaderSerializer<Match>,
         MatchEntrySerializerRegistry, SerializerRegistryInjector {
-
     private static final Logger LOG = LoggerFactory.getLogger(MatchSerializer.class);
     private static final byte OXM_MATCH_TYPE_CODE = 1;
 
     private final Map<org.opendaylight.openflowplugin.api.openflow.protocol.serialization.MatchEntrySerializerKey,
             MatchEntrySerializer> entryRegistry = new LinkedHashMap<>();
-    private SerializerRegistry registry;
+    private SerializerRegistry registry = null;
 
     @Override
     public void serialize(final Match match, final ByteBuf outBuffer) {
index 6241e383871d1ac51cd9af4de80bcc5ddd44a869..c7069887fa4e760d5f64f6dc4b26ba84c0cc0597 100644 (file)
@@ -40,7 +40,7 @@ public class MeterMessageSerializer extends AbstractMessageSerializer<MeterMessa
     private static final short PADDING_IN_METER_BAND_DSCP_REMARK = 3;
     private static final int DEFAULT_METER_FLAGS = createMeterFlagsBitMask(new MeterFlags(false, false, true, false));
 
-    private SerializerRegistry registry;
+    private SerializerRegistry registry = null;
 
     @Override
     public void serialize(final MeterMessage message, final ByteBuf outBuffer) {
index 286219fc32c5d2a289660eaa92e5565965db33d8..44805d3dc15979875e2c922018c9fd165f1a1fea 100644 (file)
@@ -47,15 +47,15 @@ public class RoleContextImpl implements RoleContext {
     // Timeout  after what we will give up on propagating role
     private static final long SET_ROLE_TIMEOUT = 10000;
 
-    private final DeviceInfo deviceInfo;
-    private final HashedWheelTimer timer;
     private final AtomicReference<ListenableFuture<RpcResult<SetRoleOutput>>> lastRoleFuture = new AtomicReference<>();
     private final Collection<RequestContext<?>> requestContexts = new HashSet<>();
+    private final DeviceInfo deviceInfo;
+    private final HashedWheelTimer timer;
     private final Timeout slaveTask;
     private final OpenflowProviderConfig config;
     private final ExecutorService executorService;
     private ContextChainMastershipWatcher contextChainMastershipWatcher;
-    private SalRoleService roleService;
+    private SalRoleService roleService = null;
 
     RoleContextImpl(@NonNull final DeviceInfo deviceInfo,
                     @NonNull final HashedWheelTimer timer,
@@ -68,8 +68,7 @@ public class RoleContextImpl implements RoleContext {
         this.executorService = executorService;
         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,
+        LOG.info("Started timer for setting SLAVE role on device {} if no role will be set in {}s.", deviceInfo,
                 checkRoleMasterTimeout / 1000L);
     }
 
@@ -85,7 +84,7 @@ public class RoleContextImpl implements RoleContext {
 
     @Override
     public void registerMastershipWatcher(@NonNull final ContextChainMastershipWatcher newWatcher) {
-        this.contextChainMastershipWatcher = newWatcher;
+        contextChainMastershipWatcher = newWatcher;
     }
 
     @Override
index 3ac23e840cd720070dbf5f4cb6d10291ea9de22b..2911a89b161f2a31e9f328b8424216d5cf12000f 100644 (file)
@@ -57,7 +57,8 @@ class RpcContextImpl implements RpcContext {
     private final ExtensionConverterProvider extensionConverterProvider;
     private final ConvertorExecutor convertorExecutor;
     private final NotificationPublishService notificationPublishService;
-    private ContextChainMastershipWatcher contextChainMastershipWatcher;
+
+    private ContextChainMastershipWatcher contextChainMastershipWatcher = null;
 
     RpcContextImpl(@NonNull final RpcProviderService rpcProviderRegistry,
                    final int maxRequests,
@@ -67,15 +68,15 @@ class RpcContextImpl implements RpcContext {
                    @NonNull final NotificationPublishService notificationPublishService,
                    final boolean statisticsRpcEnabled) {
         this.deviceContext = deviceContext;
-        this.deviceInfo = deviceContext.getDeviceInfo();
-        this.nodeInstanceIdentifier = deviceContext.getDeviceInfo().getNodeInstanceIdentifier();
-        this.messageSpy = deviceContext.getMessageSpy();
+        deviceInfo = deviceContext.getDeviceInfo();
+        nodeInstanceIdentifier = deviceContext.getDeviceInfo().getNodeInstanceIdentifier();
+        messageSpy = deviceContext.getMessageSpy();
         this.rpcProviderRegistry = rpcProviderRegistry;
         this.extensionConverterProvider = extensionConverterProvider;
         this.notificationPublishService = notificationPublishService;
         this.convertorExecutor = convertorExecutor;
-        this.isStatisticsRpcEnabled = statisticsRpcEnabled;
-        this.tracker = new Semaphore(maxRequests, true);
+        isStatisticsRpcEnabled = statisticsRpcEnabled;
+        tracker = new Semaphore(maxRequests, true);
     }
 
     @Override
@@ -161,17 +162,17 @@ class RpcContextImpl implements RpcContext {
 
     @VisibleForTesting
     boolean isEmptyRpcRegistrations() {
-        return this.rpcRegistrations.isEmpty();
+        return rpcRegistrations.isEmpty();
     }
 
     @Override
     public DeviceInfo getDeviceInfo() {
-        return this.deviceInfo;
+        return deviceInfo;
     }
 
     @Override
     public void registerMastershipWatcher(@NonNull final ContextChainMastershipWatcher newWatcher) {
-        this.contextChainMastershipWatcher = newWatcher;
+        contextChainMastershipWatcher = newWatcher;
     }
 
     @Override
index 8da330554c37ab3ee9beb1c2caa1abe4e003a5ca..4dec25895ab3c6ae8698ca9c87fe175d78d6f896 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>12.0.3</version>
+        <version>12.0.4</version>
         <relativePath/>
     </parent>
 
             <dependency>
                 <groupId>org.opendaylight.controller</groupId>
                 <artifactId>controller-artifacts</artifactId>
-                <version>8.0.3</version>
+                <version>8.0.4</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.infrautils</groupId>
                 <artifactId>infrautils-artifacts</artifactId>
-                <version>6.0.4</version>
+                <version>6.0.5</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index d624643a45057ae9007f80c7202960bf5e37e88f..26c582bbc65706e46e646aefb2f4e56deb8954c7 100644 (file)
@@ -35,13 +35,13 @@ import org.slf4j.LoggerFactory;
  */
 public class LearningSwitchManagerSimpleImpl
         implements DataTreeChangeListenerRegistrationHolder, LearningSwitchManager {
-
     private static final Logger LOG = LoggerFactory.getLogger(LearningSwitchManagerSimpleImpl.class);
-    private NotificationService notificationService;
+
+    private NotificationService notificationService = null;
     private PacketProcessingService packetProcessingService;
-    private DataBroker data;
-    private Registration packetInRegistration;
-    private ListenerRegistration<DataTreeChangeListener> dataTreeChangeListenerRegistration;
+    private DataBroker data = null;
+    private Registration packetInRegistration = null;
+    private ListenerRegistration<DataTreeChangeListener> dataTreeChangeListenerRegistration = null;
 
     /**
      * Sets the NotificationService.
@@ -49,7 +49,7 @@ public class LearningSwitchManagerSimpleImpl
      * @param notificationService the notificationService to set
      */
     @Override
-    public void setNotificationService(NotificationService notificationService) {
+    public void setNotificationService(final NotificationService notificationService) {
         this.notificationService = notificationService;
     }
 
@@ -60,7 +60,7 @@ public class LearningSwitchManagerSimpleImpl
      */
     @Override
     public void setPacketProcessingService(
-            PacketProcessingService packetProcessingService) {
+            final PacketProcessingService packetProcessingService) {
         this.packetProcessingService = packetProcessingService;
     }
 
@@ -68,7 +68,7 @@ public class LearningSwitchManagerSimpleImpl
      * Sets the DataBroker.
      */
     @Override
-    public void setDataBroker(DataBroker broker) {
+    public void setDataBroker(final DataBroker broker) {
         data = broker;
     }
 
index 32b72cf7d4fd88ff5ec7f68cf766c15f149c19d8..c355cc4f4f4e4ade3ed5016e13f212d02a01237e 100644 (file)
@@ -8,38 +8,31 @@
 package org.opendaylight.openflowplugin.learningswitch;
 
 import java.util.Collection;
-import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType;
 import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.Uint8;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class WakeupOnNode implements DataTreeChangeListener<Table> {
-
     private static final Logger LOG = LoggerFactory.getLogger(WakeupOnNode.class);
-    private LearningSwitchHandler learningSwitchHandler;
+
+    private LearningSwitchHandler learningSwitchHandler = null;
 
     @Override
-    public void onDataTreeChanged(@NonNull Collection<DataTreeModification<Table>> modifications) {
+    public void onDataTreeChanged(final Collection<DataTreeModification<Table>> modifications) {
         Uint8 requiredTableId = Uint8.ZERO;
         // TODO add flow
 
-        for (DataTreeModification<Table> modification : modifications) {
+        for (var modification : modifications) {
             if (modification.getRootNode().getModificationType() == ModificationType.SUBTREE_MODIFIED) {
-                DataObject table = modification.getRootNode().getDataAfter();
-                if (table instanceof Table) {
-                    Table tableSure = (Table) table;
+                var table = modification.getRootNode().getDataAfter();
+                if (table != null) {
                     LOG.trace("table: {}", table);
-
-                    if (requiredTableId.equals(tableSure.getId())) {
-                        InstanceIdentifier<Table> tablePath =
-                                modification.getRootPath().getRootIdentifier();
-                        learningSwitchHandler.onSwitchAppeared(tablePath);
+                    if (requiredTableId.equals(table.getId())) {
+                        learningSwitchHandler.onSwitchAppeared(modification.getRootPath().getRootIdentifier());
                     }
                 }
             }
@@ -51,8 +44,7 @@ public class WakeupOnNode implements DataTreeChangeListener<Table> {
      *
      * @param learningSwitchHandler the learningSwitchHandler to set
      */
-    public void setLearningSwitchHandler(
-            LearningSwitchHandler learningSwitchHandler) {
+    public void setLearningSwitchHandler(final LearningSwitchHandler learningSwitchHandler) {
         this.learningSwitchHandler = learningSwitchHandler;
     }
 }
index 9a8a03d874952acb2c33cbada789846b1eb23b10..7ad5bcea9257c8ec1293b7c6653884f426216793 100644 (file)
@@ -39,13 +39,13 @@ import org.slf4j.LoggerFactory;
  * </ul>
  */
 public class LearningSwitchManagerMultiImpl implements DataTreeChangeListenerRegistrationHolder, LearningSwitchManager {
-
     private static final Logger LOG = LoggerFactory.getLogger(LearningSwitchManagerMultiImpl.class);
-    private NotificationService notificationService;
+
+    private NotificationService notificationService = null;
     private PacketProcessingService packetProcessingService;
-    private DataBroker data;
-    private Registration packetInRegistration;
-    private ListenerRegistration<DataTreeChangeListener> dataTreeChangeListenerRegistration;
+    private DataBroker data = null;
+    private Registration packetInRegistration = null;
+    private ListenerRegistration<DataTreeChangeListener> dataTreeChangeListenerRegistration = null;
 
     /**
      * Sets the NotificationService.
@@ -53,7 +53,7 @@ public class LearningSwitchManagerMultiImpl implements DataTreeChangeListenerReg
      * @param notificationService the notificationService to set
      */
     @Override
-    public void setNotificationService(NotificationService notificationService) {
+    public void setNotificationService(final NotificationService notificationService) {
         this.notificationService = notificationService;
     }
 
@@ -64,7 +64,7 @@ public class LearningSwitchManagerMultiImpl implements DataTreeChangeListenerReg
      */
     @Override
     public void setPacketProcessingService(
-            PacketProcessingService packetProcessingService) {
+            final PacketProcessingService packetProcessingService) {
         this.packetProcessingService = packetProcessingService;
     }
 
@@ -74,7 +74,7 @@ public class LearningSwitchManagerMultiImpl implements DataTreeChangeListenerReg
      * @param broker the data to set
      */
     @Override
-    public void setDataBroker(DataBroker broker) {
+    public void setDataBroker(final DataBroker broker) {
         data = broker;
     }
 
index 253c588f2af8d6ce55f116669629282757e04069..330f63081f4f86d006d018921b4770791ae85f18 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index fc70a14f354c18f110f5211d2d88f01f2bbe8fb8..d1c5ca2402439bf90f1a78fb74e2bf2ceef67631 100644 (file)
@@ -15,6 +15,7 @@ import io.netty.channel.EventLoopGroup;
 import io.netty.channel.socket.nio.NioSocketChannel;
 import java.net.InetAddress;
 import java.util.concurrent.Callable;
+import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
@@ -24,8 +25,7 @@ import org.slf4j.LoggerFactory;
  * @author Jozef Bacigal
  */
 public class CallableClient implements Callable<Boolean>, OFClient {
-
-    private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(CallableClient.class);
+    private static final Logger LOG = LoggerFactory.getLogger(CallableClient.class);
 
     private int port = 6653;
     private boolean securedClient = false;
@@ -33,8 +33,8 @@ public class CallableClient implements Callable<Boolean>, OFClient {
     private String name = "Empty name";
 
     private final EventLoopGroup workerGroup;
-    private SettableFuture<Boolean> isOnlineFuture;
-    private SettableFuture<Boolean> scenarioDone;
+    private final SettableFuture<Boolean> isOnlineFuture = null;
+    private final SettableFuture<Boolean> scenarioDone = null;
     private ScenarioHandler scenarioHandler = null;
     private Bootstrap bootstrap = null;
 
@@ -49,7 +49,7 @@ public class CallableClient implements Callable<Boolean>, OFClient {
         this.port = port;
         this.securedClient = securedClient;
         this.ipAddress = requireNonNull(ipAddress, "IP address cannot be null");
-        this.workerGroup = eventExecutors;
+        workerGroup = eventExecutors;
         this.bootstrap = bootstrap;
         this.name = name;
         this.scenarioHandler = requireNonNull(scenarioHandler, "Scenario handler cannot be null");
@@ -67,7 +67,7 @@ public class CallableClient implements Callable<Boolean>, OFClient {
 
     @Override
     public void setScenarioHandler(final ScenarioHandler scenario) {
-        this.scenarioHandler = scenario;
+        scenarioHandler = scenario;
     }
 
     @Override
@@ -81,7 +81,7 @@ public class CallableClient implements Callable<Boolean>, OFClient {
     public Boolean call() throws Exception {
         requireNonNull(bootstrap);
         requireNonNull(workerGroup);
-        LOG.info("Switch {} trying connect to controller", this.name);
+        LOG.info("Switch {} trying connect to controller", name);
         SimpleClientInitializer clientInitializer = new SimpleClientInitializer(isOnlineFuture, securedClient);
         clientInitializer.setScenario(scenarioHandler);
         try {
@@ -101,9 +101,9 @@ public class CallableClient implements Callable<Boolean>, OFClient {
             return false;
         }
         if (scenarioHandler.isFinishedOK()) {
-            LOG.info("Device {} finished scenario OK", this.name);
+            LOG.info("Device {} finished scenario OK", name);
         } else {
-            LOG.error("Device {} finished scenario with error", this.name);
+            LOG.error("Device {} finished scenario with error", name);
         }
         return scenarioHandler.isFinishedOK();
 
index fa4936a3b3e16410fb30380aabbcddb66f6c5d72..f733b106408438f32d97d028d2466e01092781f7 100644 (file)
@@ -20,17 +20,17 @@ import org.slf4j.LoggerFactory;
  * @author michal.polkorab
  */
 public class SendEvent implements ClientEvent {
-
     private static final Logger LOG = LoggerFactory.getLogger(SendEvent.class);
+
     protected byte[] msgToSend;
-    protected ChannelHandlerContext ctx;
+    protected ChannelHandlerContext ctx = null;
 
     /**
      * Constructor.
      *
      * @param msgToSend message to be sent
      */
-    public SendEvent(byte[] msgToSend) {
+    public SendEvent(final byte[] msgToSend) {
         this.msgToSend = new byte[msgToSend.length];
         System.arraycopy(msgToSend, 0, this.msgToSend, 0, msgToSend.length);
     }
@@ -55,8 +55,7 @@ public class SendEvent implements ClientEvent {
      *
      * @param ctx context which will be used for sending messages (SendEvents)
      */
-    public void setCtx(ChannelHandlerContext ctx) {
+    public void setCtx(final ChannelHandlerContext ctx) {
         this.ctx = ctx;
     }
-
 }
index 6bb4d4ca2ca551d20aa64d7b7bcbe019917dcfed..beb60d73855f42e5e00092ca8f8e150c0469e93e 100644 (file)
@@ -39,10 +39,7 @@ import org.slf4j.LoggerFactory;
 public class DropTestCommiter extends AbstractDropTest {
     private static final Logger LOG = LoggerFactory.getLogger(DropTestCommiter.class);
     private static final TableKey ZERO_TABLE = new TableKey(Uint8.ZERO);
-    private DataBroker dataService;
-
     private static final AtomicLong ID_COUNTER = new AtomicLong();
-
     private static final ThreadLocal<FlowBuilder> BUILDER = ThreadLocal.withInitial(() -> {
         final var cookie = new FlowCookie(Uint64.TEN);
         return new FlowBuilder()
@@ -56,9 +53,9 @@ public class DropTestCommiter extends AbstractDropTest {
             .setFlags(new FlowModFlags(false, false, false, false, false));
     });
 
-    private NotificationService notificationService;
-
-    private Registration notificationRegistration;
+    private NotificationService notificationService = null;
+    private Registration notificationRegistration = null;
+    private DataBroker dataService = null;
 
     /**
      * start listening on packetIn.
index 885b1191676eda05a9b13596fa81e182bdb6b81c..8906f8bf38a89a18b230fd68b404aac519e4f480 100644 (file)
@@ -36,13 +36,6 @@ import org.slf4j.LoggerFactory;
  */
 public class DropTestRpcSender extends AbstractDropTest {
     private static final Logger LOG = LoggerFactory.getLogger(DropTestRpcSender.class);
-
-    private SalFlowService flowService;
-
-    public void setFlowService(final SalFlowService flowService) {
-        this.flowService = flowService;
-    }
-
     private static final ThreadLocal<AddFlowInputBuilder> BUILDER = ThreadLocal.withInitial(() -> {
         final var cookie = new FlowCookie(Uint64.TEN);
         return new AddFlowInputBuilder()
@@ -56,9 +49,13 @@ public class DropTestRpcSender extends AbstractDropTest {
             .setFlags(new FlowModFlags(false, false, false, false, false));
     });
 
-    private NotificationService notificationService;
+    private NotificationService notificationService = null;
+    private Registration notificationRegistration = null;
+    private SalFlowService flowService = null;
 
-    private Registration notificationRegistration;
+    public void setFlowService(final SalFlowService flowService) {
+        this.flowService = flowService;
+    }
 
     /**
      * Start listening on packetIn.
index ce2880ef24300a27117beb69b54a194b4f255ee3..5c82d1d419cd94bff555af857d1b41ec4094d6d0 100644 (file)
@@ -98,11 +98,12 @@ import org.slf4j.LoggerFactory;
 
 public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvider {
     private static final Logger LOG = LoggerFactory.getLogger(OpenflowPluginBulkGroupTransactionProvider.class);
+    private static final String ORIGINAL_FLOW_NAME = "Foo";
+    private static final String ORIGINAL_GROUP_NAME = "Foo";
+
     private final DataBroker dataBroker;
     private final BundleContext ctx;
-    private final String originalFlowName = "Foo";
     private Node testNode12;
-    private final String originalGroupName = "Foo";
 
     public OpenflowPluginBulkGroupTransactionProvider(final DataBroker dataBroker, final BundleContext ctx) {
         this.dataBroker = dataBroker;
@@ -306,7 +307,8 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
                 .build()));
     }
 
-    private FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg, final String tableId) {
+    private static FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg,
+            final String tableId) {
 
         FlowBuilder flow = new FlowBuilder();
         long id = 123;
@@ -409,7 +411,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
         flow.withKey(key);
         flow.setPriority(Uint16.TWO);
-        flow.setFlowName(originalFlowName + "X" + flowType);
+        flow.setFlowName(ORIGINAL_FLOW_NAME + "X" + flowType);
         return flow;
     }
 
@@ -629,7 +631,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
         }, MoreExecutors.directExecutor());
     }
 
-    private GroupBuilder createTestGroup(String actionType, String groupType, final String groupmod,
+    private static GroupBuilder createTestGroup(String actionType, String groupType, final String groupmod,
             final String strId) {
         // Sample data , committing to DataStore
 
@@ -712,7 +714,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
         return group.withKey(new GroupKey(new GroupId(Uint32.valueOf(strId))))
             // .group.setInstall(false)
-            .setGroupName(originalGroupName)
+            .setGroupName(ORIGINAL_GROUP_NAME)
             .setBarrier(false)
             .setBuckets(new BucketsBuilder().setBucket(BindingMap.of(bucket.build())).build());
     }
index d7a97d4cc3311fffcc310b5b42e537b973babd6b..4d19dc7f64290d226e495a8f0185c7c988666f39 100644 (file)
@@ -104,10 +104,10 @@ import org.slf4j.LoggerFactory;
 
 public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
     private static final Logger LOG = LoggerFactory.getLogger(OpenflowPluginBulkTransactionProvider.class);
+    private static final String ORIGINAL_FLOW_NAME = "Foo";
 
     private final DataBroker dataBroker;
     private final BundleContext ctx;
-    private final String originalFlowName = "Foo";
 
     public OpenflowPluginBulkTransactionProvider(final DataBroker dataBroker, final BundleContext ctx) {
         this.dataBroker = dataBroker;
@@ -131,7 +131,8 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         return "No help";
     }
 
-    private FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg, final String tableId) {
+    private static FlowBuilder createTestFlow(final NodeBuilder nodeBuilder, final String flowTypeArg,
+            final String tableId) {
 
         FlowBuilder flow = new FlowBuilder();
         long id = 123;
@@ -394,7 +395,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         FlowKey key = new FlowKey(new FlowId(Long.toString(id)));
         flow.withKey(key);
         flow.setPriority(Uint16.TWO);
-        flow.setFlowName(originalFlowName + "X" + flowType);
+        flow.setFlowName(ORIGINAL_FLOW_NAME + "X" + flowType);
         return flow;
     }
 
@@ -417,49 +418,47 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         FlowBuilder tf;
         FlowBuilder tf1;
         FlowBuilder tf2;
-        FlowBuilder tf3;
-        switch (flowcnt) {
-            case 1:
+        FlowBuilder tf3 = switch (flowcnt) {
+            case 1 -> {
                 tf = createTestFlow(tn, "f1", "10");
                 tf1 = createTestFlow(tn, "f2", "11");
                 tf2 = createTestFlow(tn, "f3", "12");
-                tf3 = createTestFlow(tn, "f4", "13");
-                break;
-            case 2:
+                yield createTestFlow(tn, "f4", "13");
+            }
+            case 2 -> {
                 tf = createTestFlow(tn, "f3", "3");
                 tf1 = createTestFlow(tn, "f4", "4");
                 tf2 = createTestFlow(tn, "f5", "5");
-                tf3 = createTestFlow(tn, "f6", "6");
-                break;
-            case 3:
+                yield createTestFlow(tn, "f6", "6");
+            }
+            case 3 -> {
                 tf = createTestFlow(tn, "f7", "7");
                 tf1 = createTestFlow(tn, "f8", "8");
                 tf2 = createTestFlow(tn, "f9", "9");
-                tf3 = createTestFlow(tn, "f10", "10");
-                break;
-            case 4:
+                yield createTestFlow(tn, "f10", "10");
+            }
+            case 4 -> {
                 // -ve scenario
                 tf = createTestFlow(tn, "f23", "3");
                 tf1 = createTestFlow(tn, "f34", "4");
                 tf2 = createTestFlow(tn, "f35", "5");
-                tf3 = createTestFlow(tn, "f36", "6");
-                break;
-            case 5:
+                yield createTestFlow(tn, "f36", "6");
+            }
+            case 5 -> {
                 // +ve scenario
                 // modify case 6 -ve
                 tf = createTestFlow(tn, "f230", "3");
                 tf1 = createTestFlow(tn, "f34", "4");
                 tf2 = createTestFlow(tn, "f35", "5");
-                tf3 = createTestFlow(tn, "f36", "6");
-                break;
-
-            default:
+                yield createTestFlow(tn, "f36", "6");
+            }
+            default -> {
                 tf = createTestFlow(tn, "f42", "42");
                 tf1 = createTestFlow(tn, "f43", "43");
                 tf2 = createTestFlow(tn, "f44", "44");
-                tf3 = createTestFlow(tn, "f45", "45");
-
-        }
+                yield createTestFlow(tn, "f45", "45");
+            }
+        };
         writeFlow(ci, tf, tf1, tf2, tf3, tn);
     }
 
@@ -475,50 +474,47 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         FlowBuilder tf;
         FlowBuilder tf1;
         FlowBuilder tf2;
-        FlowBuilder tf3;
-        switch (flowcnt) {
-            case 1:
+        FlowBuilder tf3 = switch (flowcnt) {
+            case 1 -> {
                 tf = createTestFlow(tn, "f82", "10");
                 tf1 = createTestFlow(tn, "f83", "11");
                 tf2 = createTestFlow(tn, "f84", "12");
-                tf3 = createTestFlow(tn, "f85", "13");
-                break;
-            case 2:
+                yield createTestFlow(tn, "f85", "13");
+            }
+            case 2 -> {
                 tf = createTestFlow(tn, "f700", "3");
                 tf1 = createTestFlow(tn, "f4", "4");
                 tf2 = createTestFlow(tn, "f900", "5");
-                tf3 = createTestFlow(tn, "f86", "6");
-                break;
-            case 3:
+                yield createTestFlow(tn, "f86", "6");
+            }
+            case 3 -> {
                 // +
                 tf = createTestFlow(tn, "f91", "7");
                 tf1 = createTestFlow(tn, "f92", "8");
                 tf2 = createTestFlow(tn, "f93", "9");
-                tf3 = createTestFlow(tn, "f94", "10");
-                break;
-            case 4:
+                yield createTestFlow(tn, "f94", "10");
+            }
+            case 4 -> {
                 // +ve scenario
                 tf = createTestFlow(tn, "f230", "3");
                 tf1 = createTestFlow(tn, "f99", "4");
                 tf2 = createTestFlow(tn, "f100", "5");
-                tf3 = createTestFlow(tn, "f101", "6");
-                break;
-            case 5:
+                yield createTestFlow(tn, "f101", "6");
+            }
+            case 5 -> {
                 // -
                 tf = createTestFlow(tn, "f23", "3");
                 tf1 = createTestFlow(tn, "f99", "4");
                 tf2 = createTestFlow(tn, "f100", "5");
-                tf3 = createTestFlow(tn, "f101", "6");
-                break;
-
-            default:
+                yield createTestFlow(tn, "f101", "6");
+            }
+            default -> {
                 tf = createTestFlow(tn, "f87", "12");
                 tf1 = createTestFlow(tn, "f88", "13");
                 tf2 = createTestFlow(tn, "f89", "14");
-                tf3 = createTestFlow(tn, "f90", "15");
-
-        }
-
+                yield createTestFlow(tn, "f90", "15");
+            }
+        };
         writeFlow(ci, tf, tf1, tf2, tf3, tn);
     }
 
@@ -532,74 +528,73 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider {
         FlowBuilder tf1 = null;
         FlowBuilder tf2 = null;
         FlowBuilder tf3 = null;
-        switch (flowcnt) {
-            case 1:
+        tf3 = switch (flowcnt) {
+            case 1 -> {
                 // add case 1
                 tf = createTestFlow(tn, "f1", "10");
                 tf1 = createTestFlow(tn, "f2", "11");
                 tf2 = createTestFlow(tn, "f3", "12");
-                tf3 = createTestFlow(tn, "f4", "13");
-                break;
-            case 2:
+                yield createTestFlow(tn, "f4", "13");
+            }
+            case 2 -> {
                 // modify case 1
                 tf = createTestFlow(tn, "f82", "10");
                 tf1 = createTestFlow(tn, "f83", "11");
                 tf2 = createTestFlow(tn, "f84", "12");
-                tf3 = createTestFlow(tn, "f85", "13");
-                break;
-            case 3:
+                yield createTestFlow(tn, "f85", "13");
+            }
+            case 3 -> {
                 // add case 2
                 tf = createTestFlow(tn, "f3", "3");
                 tf1 = createTestFlow(tn, "f4", "4");
                 tf2 = createTestFlow(tn, "f5", "5");
-                tf3 = createTestFlow(tn, "f6", "6");
-                break;
-            case 4:
+                yield createTestFlow(tn, "f6", "6");
+            }
+            case 4 -> {
                 // modify case 2
                 tf = createTestFlow(tn, "f700", "3");
                 tf1 = createTestFlow(tn, "f4", "4");
                 tf2 = createTestFlow(tn, "f900", "5");
-                tf3 = createTestFlow(tn, "f86", "6");
-                break;
-            case 5:
+                yield createTestFlow(tn, "f86", "6");
+            }
+            case 5 -> {
                 // add case 3
                 tf = createTestFlow(tn, "f7", "7");
                 tf1 = createTestFlow(tn, "f8", "8");
                 tf2 = createTestFlow(tn, "f9", "9");
-                tf3 = createTestFlow(tn, "f10", "10");
-                break;
-            case 6:
+                yield createTestFlow(tn, "f10", "10");
+            }
+            case 6 -> {
                 // modify case 3
                 tf = createTestFlow(tn, "f91", "7");
                 tf1 = createTestFlow(tn, "f92", "8");
                 tf2 = createTestFlow(tn, "f93", "9");
-                tf3 = createTestFlow(tn, "f94", "10");
-                break;
-            case 7:
+                yield createTestFlow(tn, "f94", "10");
+            }
+            case 7 -> {
                 // -ve scenario
                 tf = createTestFlow(tn, "f23", "3");
                 tf1 = createTestFlow(tn, "f34", "4");
                 tf2 = createTestFlow(tn, "f35", "5");
-                tf3 = createTestFlow(tn, "f36", "6");
-                break;
-            case 8:
+                yield createTestFlow(tn, "f36", "6");
+            }
+            case 8 -> {
                 // +ve scenario
                 // modify case 6 -ve
                 tf = createTestFlow(tn, "f23", "3");
                 tf1 = createTestFlow(tn, "f99", "4");
                 tf2 = createTestFlow(tn, "f100", "5");
-                tf3 = createTestFlow(tn, "f101", "6");
-                break;
-            case 9:
+                yield createTestFlow(tn, "f101", "6");
+            }
+            case 9 -> {
                 // modify case 6
                 tf = createTestFlow(tn, "f700", "7");
                 tf1 = createTestFlow(tn, "f230", "23");
                 tf2 = createTestFlow(tn, "f900", "9");
-                tf3 = createTestFlow(tn, "f1000", "10");
-                break;
-            default:
-                throw new IllegalArgumentException("Invalid flowtype: " + flowtype);
-        }
+                yield createTestFlow(tn, "f1000", "10");
+            }
+            default -> throw new IllegalArgumentException("Invalid flowtype: " + flowtype);
+        };
 
         InstanceIdentifier<Flow> path1 = InstanceIdentifier.create(Nodes.class).child(Node.class, tn.key())
                 .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tf.getTableId()))
index 17a2e79bf502f975eb21cc7930a65953408ee325..202081bda33538a0efcf99ae59c636482aa68501 100644 (file)
@@ -29,13 +29,11 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
-        SalGroupService {
+public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable, SalGroupService {
+    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginGroupTestServiceProvider.class);
 
-    private static final Logger LOG = LoggerFactory
-            .getLogger(OpenflowpluginGroupTestServiceProvider.class);
-    private ObjectRegistration<SalGroupService> groupRegistration;
-    private NotificationPublishService notificationService;
+    private ObjectRegistration<SalGroupService> groupRegistration = null;
+    private NotificationPublishService notificationService = null;
 
     /**
      * Get group registration.
@@ -70,8 +68,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
     }
 
     public void start() {
-        OpenflowpluginGroupTestServiceProvider.LOG
-                .info("SalGroupServiceProvider Started.");
+        LOG.info("SalGroupServiceProvider Started.");
     }
 
     /*
@@ -81,8 +78,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
      */
     @Override
     public void close() {
-        OpenflowpluginGroupTestServiceProvider.LOG
-                .info("SalGroupServiceProvide stopped.");
+        LOG.info("SalGroupServiceProvide stopped.");
         groupRegistration.close();
     }
 
@@ -97,7 +93,7 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
-        OpenflowpluginGroupTestServiceProvider.LOG.info("addGroup - {}", input);
+        LOG.info("addGroup - {}", input);
         return null;
     }
 
@@ -111,9 +107,8 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
      * .group.service.rev130918.RemoveGroupInput)
      */
     @Override
-    public ListenableFuture<RpcResult<RemoveGroupOutput>> removeGroup(
-            final RemoveGroupInput input) {
-        OpenflowpluginGroupTestServiceProvider.LOG.info("removeGroup - {}", input);
+    public ListenableFuture<RpcResult<RemoveGroupOutput>> removeGroup(final RemoveGroupInput input) {
+        LOG.info("removeGroup - {}", input);
         return null;
     }
 
@@ -127,9 +122,8 @@ public class OpenflowpluginGroupTestServiceProvider implements AutoCloseable,
      * .group.service.rev130918.UpdateGroupInput)
      */
     @Override
-    public ListenableFuture<RpcResult<UpdateGroupOutput>> updateGroup(
-            final UpdateGroupInput input) {
-        OpenflowpluginGroupTestServiceProvider.LOG.info("updateGroup - {}", input);
+    public ListenableFuture<RpcResult<UpdateGroupOutput>> updateGroup(final UpdateGroupInput input) {
+        LOG.info("updateGroup - {}", input);
         return null;
     }
 
index c04e4084bb5135fc76a947715508fddf16b710c5..6c71f581f26c4e99e3fa170e5831a2f3e77469cc 100644 (file)
@@ -37,11 +37,10 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 import org.opendaylight.yangtools.yang.common.Uint32;
 import org.opendaylight.yangtools.yang.common.Uint8;
 import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
-    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginMeterTestCommandProvider.class);
+    private static final String ORIGINAL_METER_NAME = "Foo";
+    private static final String UPDATED_METER_NAME = "Bar";
 
     private final DataBroker dataBroker;
     private final BundleContext ctx;
@@ -49,8 +48,6 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
     private Meter testMeter1;
     private Meter testMeter2;
     private Node testNode;
-    private final String originalMeterName = "Foo";
-    private final String updatedMeterName = "Bar";
 
     public OpenflowpluginMeterTestCommandProvider(final DataBroker dataBroker, final BundleContext ctx) {
         this.dataBroker = dataBroker;
@@ -81,7 +78,7 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
             .setContainerName("abcd")
             .withKey(new MeterKey(new MeterId(Uint32.valueOf(12))))
             .setMeterId(new MeterId(Uint32.valueOf(9)))
-            .setMeterName(originalMeterName)
+            .setMeterName(ORIGINAL_METER_NAME)
             .setFlags(new MeterFlags(true, false, false, false))
             .setMeterBandHeaders(new MeterBandHeadersBuilder()
                 .setMeterBandHeader(BindingMap.of(new MeterBandHeaderBuilder()
@@ -119,10 +116,10 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
             .setBandId(new BandId(Uint32.ZERO));
 
         if (s2.equalsIgnoreCase("modify")) {
-            meter.setMeterName(updatedMeterName);
+            meter.setMeterName(UPDATED_METER_NAME);
             bandHeader.setBandRate(Uint32.valueOf(234));
         } else {
-            meter.setMeterName(originalMeterName);
+            meter.setMeterName(ORIGINAL_METER_NAME);
             bandHeader.setBandRate(Uint32.valueOf(123));
         }
 
@@ -375,9 +372,9 @@ public class OpenflowpluginMeterTestCommandProvider implements CommandProvider {
             createUserNode(nref);
         }
         MeterBuilder meter = createTestMeter();
-        meter.setMeterName(updatedMeterName);
+        meter.setMeterName(UPDATED_METER_NAME);
         writeMeter(ci, meter.build());
-        meter.setMeterName(originalMeterName);
+        meter.setMeterName(ORIGINAL_METER_NAME);
         writeMeter(ci, meter.build());
     }
 
index 3a54042e9c22a2619687838b3fbecf6762f8744f..b70ebccc097d78d4011872cb02580cc3e6f540f7 100644 (file)
@@ -30,13 +30,12 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
-        SalMeterService {
-    private static final Logger LOG = LoggerFactory
-            .getLogger(OpenflowpluginMeterTestServiceProvider.class);
-    private DataBroker dataService;
-    private ObjectRegistration<SalMeterService> meterRegistration;
-    private NotificationPublishService notificationService;
+public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable, SalMeterService {
+    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginMeterTestServiceProvider.class);
+
+    private DataBroker dataService = null;
+    private ObjectRegistration<SalMeterService> meterRegistration = null;
+    private NotificationPublishService notificationService = null;
 
     /**
      * Gets the data service.
@@ -44,7 +43,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      * @return {@link #dataService}
      */
     public DataBroker getDataService() {
-        return this.dataService;
+        return dataService;
     }
 
     /**
@@ -60,7 +59,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      * @return {@link #meterRegistration}
      */
     public ObjectRegistration<SalMeterService> getMeterRegistration() {
-        return this.meterRegistration;
+        return meterRegistration;
     }
 
     /**
@@ -76,7 +75,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      * @return {@link #notificationService}
      */
     public NotificationPublishService getNotificationService() {
-        return this.notificationService;
+        return notificationService;
     }
 
     /**
@@ -87,8 +86,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
     }
 
     public void start() {
-        OpenflowpluginMeterTestServiceProvider.LOG
-                .info("SalMeterServiceProvider Started.");
+        LOG.info("SalMeterServiceProvider Started.");
     }
 
     /*
@@ -98,8 +96,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      */
     @Override
     public void close() {
-        OpenflowpluginMeterTestServiceProvider.LOG
-                .info("SalMeterServiceProvide stopped.");
+        LOG.info("SalMeterServiceProvide stopped.");
         meterRegistration.close();
     }
 
@@ -114,7 +111,7 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      */
     @Override
     public ListenableFuture<RpcResult<AddMeterOutput>> addMeter(final AddMeterInput input) {
-        OpenflowpluginMeterTestServiceProvider.LOG.info("addMeter - {}", input);
+        LOG.info("addMeter - {}", input);
         return null;
     }
 
@@ -128,9 +125,8 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      * .meter.service.rev130918.RemoveMeterInput)
      */
     @Override
-    public ListenableFuture<RpcResult<RemoveMeterOutput>> removeMeter(
-            final RemoveMeterInput input) {
-        OpenflowpluginMeterTestServiceProvider.LOG.info("removeMeter - {}", input);
+    public ListenableFuture<RpcResult<RemoveMeterOutput>> removeMeter(final RemoveMeterInput input) {
+        LOG.info("removeMeter - {}", input);
         return null;
     }
 
@@ -144,9 +140,8 @@ public class OpenflowpluginMeterTestServiceProvider implements AutoCloseable,
      * .meter.service.rev130918.UpdateMeterInput)
      */
     @Override
-    public ListenableFuture<RpcResult<UpdateMeterOutput>> updateMeter(
-            final UpdateMeterInput input) {
-        OpenflowpluginMeterTestServiceProvider.LOG.info("updateMeter - {}", input);
+    public ListenableFuture<RpcResult<UpdateMeterOutput>> updateMeter(final UpdateMeterInput input) {
+        LOG.info("updateMeter - {}", input);
         return null;
     }
 
index 64836a6578d2d95d22f558a60176bb61d27af81c..e618a7c8086e0431b0d7f7bbb849cb2bb6bff5ea 100644 (file)
@@ -15,22 +15,23 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 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.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTable;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.UpdateTableOutputBuilder;
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
 import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OpenflowpluginTableFeaturesTestServiceProvider implements
-        AutoCloseable, SalTableService {
+public class OpenflowpluginTableFeaturesTestServiceProvider implements AutoCloseable, UpdateTable {
+    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginTableFeaturesTestServiceProvider.class);
 
-    private static final Logger LOG = LoggerFactory
-            .getLogger(OpenflowpluginTableFeaturesTestServiceProvider.class);
-    private ObjectRegistration<SalTableService> tableRegistration;
+    private Registration tableRegistration = null;
     private NotificationPublishService notificationService;
 
     /**
@@ -38,14 +39,14 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
      *
      * @return {@link #tableRegistration}
      */
-    public ObjectRegistration<SalTableService> getTableRegistration() {
-        return this.tableRegistration;
+    public Registration getTableRegistration() {
+        return tableRegistration;
     }
 
     /**
      * Set {@link #tableRegistration}.
      */
-    public void setTableRegistration(final ObjectRegistration<SalTableService> tableRegistration) {
+    public void setTableRegistration(final Registration tableRegistration) {
         this.tableRegistration = tableRegistration;
     }
 
@@ -55,7 +56,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
      * @return {@link #notificationService}
      */
     public NotificationPublishService getNotificationService() {
-        return this.notificationService;
+        return notificationService;
     }
 
     /**
@@ -66,41 +67,24 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     }
 
     public void start() {
-        OpenflowpluginTableFeaturesTestServiceProvider.LOG
-                .info("SalTableServiceProvider Started.");
+        LOG.info("SalTableServiceProvider Started.");
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see java.lang.AutoCloseable#close()
-     */
     @Override
     public void close() {
-        OpenflowpluginTableFeaturesTestServiceProvider.LOG
-                .info("SalTableServiceProvider stopped.");
+        LOG.info("SalTableServiceProvider stopped.");
         tableRegistration.close();
     }
 
-    /*
-     * (non-Javadoc)
-     *
-     * @see
-     * org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026
-     * .SalTableService
-     * #updateTable(org.opendaylight.yang.gen.v1.urn.opendaylight
-     * .table.service.rev131026.UpdateTableInput)
-     */
     @Override
-    public ListenableFuture<RpcResult<UpdateTableOutput>> updateTable(
-            final UpdateTableInput input) {
-        OpenflowpluginTableFeaturesTestServiceProvider.LOG.info("updateTable - {}", input);
-        return null;
+    public ListenableFuture<RpcResult<UpdateTableOutput>> invoke(final UpdateTableInput input) {
+        LOG.info("updateTable - {}", input);
+        return RpcResultBuilder.success(new UpdateTableOutputBuilder().build()).buildFuture();
     }
 
     public ObjectRegistration<OpenflowpluginTableFeaturesTestServiceProvider> register(
             final RpcProviderService rpcRegistry) {
-        setTableRegistration(rpcRegistry.registerRpcImplementation(SalTableService.class, this, ImmutableSet.of(
+        setTableRegistration(rpcRegistry.registerRpcImplementation(this, ImmutableSet.of(
             InstanceIdentifier.create(Nodes.class)
             .child(Node.class, new NodeKey(new NodeId(OpenflowpluginTestActivator.NODE_ID))))));
 
index 521ce330e1321a8541a6dac912ea6d018a08555d..00d76392440e6d1757d55720eafdbcb0ba22f9b9 100644 (file)
@@ -30,16 +30,14 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OpenflowpluginTestServiceProvider implements AutoCloseable,
-        SalFlowService {
-
-    private static final Logger LOG = LoggerFactory
-            .getLogger(OpenflowpluginTestServiceProvider.class);
+public class OpenflowpluginTestServiceProvider implements AutoCloseable, SalFlowService {
+    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginTestServiceProvider.class);
 
     private final DataBroker dataService;
-    private ObjectRegistration<SalFlowService> flowRegistration;
     private final NotificationPublishService notificationProviderService;
 
+    private ObjectRegistration<SalFlowService> flowRegistration = null;
+
     public OpenflowpluginTestServiceProvider(final DataBroker dataService,
             final NotificationPublishService notificationProviderService) {
         this.dataService = dataService;