From 27af68032ea70b228af9779d8a0aa5a06fb18fae Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 11 Mar 2022 11:36:29 +0100 Subject: [PATCH] Bump MRI upstreams Adopt the following versions: - odlparent-10.0.0 - infrautils-3.0.0 - yangtools-8.0.2 - mdsal-9.0.1 - controller-5.0.1 - aaa-0.15.1 - netconf-3.0.0 Change-Id: I7dfe7fdbf88eb787a59e031e24559a9601fde878 Signed-off-by: Robert Varga --- commons/binding-parent/pom.xml | 6 +- commons/it/pom.xml | 4 +- commons/pom.xml | 2 +- .../hwvtepsouthbound-artifacts/pom.xml | 2 +- .../features/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-api/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-ovsdb-hwvtepsouthbound-rest/pom.xml | 4 +- .../odl-ovsdb-hwvtepsouthbound-test/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-ui/pom.xml | 4 +- .../odl-ovsdb-hwvtepsouthbound/pom.xml | 2 +- .../hwvtepsouthbound-features/pom.xml | 2 +- .../hwvtepsouthbound-impl/pom.xml | 9 +- .../HwvtepConnectionManager.java | 2 +- .../HwvtepDataChangeListener.java | 2 +- .../HwvtepOperGlobalListener.java | 2 +- .../HwvtepSouthboundProvider.java | 2 +- .../HwvtepSouthboundUtil.java | 6 +- .../InstanceIdentifierCodec.java | 2 +- .../HwvtepReconciliationManager.java | 4 +- .../transact/LogicalRouterRemoveCommand.java | 3 - .../LogicalSwitchUcastsRemoveCommand.java | 2 +- .../transact/PhysicalSwitchUpdateCommand.java | 27 +-- .../transact/PlainLogicalSwitchRemoveCmd.java | 2 +- .../transact/TransactCommandAggregator.java | 9 +- .../transactions/md/GlobalUpdateCommand.java | 2 +- .../md/HwvtepLogicalRouterUpdateCommand.java | 3 +- .../md/HwvtepLogicalSwitchUpdateCommand.java | 4 +- .../md/HwvtepManagerUpdateCommand.java | 4 +- .../md/HwvtepMcastMacsLocalUpdateCommand.java | 2 +- .../HwvtepMcastMacsRemoteUpdateCommand.java | 3 +- .../HwvtepOperationalCommandAggregator.java | 17 +- .../HwvtepPhysicalLocatorUpdateCommand.java | 3 +- .../md/HwvtepPhysicalPortUpdateCommand.java | 2 +- .../md/HwvtepPhysicalSwitchUpdateCommand.java | 4 +- .../md/HwvtepTunnelRemoveCommand.java | 4 +- .../md/HwvtepTunnelUpdateCommand.java | 4 +- .../md/HwvtepUcastMacsLocalUpdateCommand.java | 4 +- .../HwvtepUcastMacsRemoteUpdateCommand.java | 2 +- .../md/TransactionInvokerImpl.java | 5 +- hwvtepsouthbound/hwvtepsouthbound-it/pom.xml | 2 +- .../hwvtepsouthbound-karaf/pom.xml | 2 +- hwvtepsouthbound/pom.xml | 2 +- library/artifacts/pom.xml | 2 +- library/features/features/pom.xml | 2 +- library/features/odl-ovsdb-library/pom.xml | 4 +- .../src/main/feature/feature.xml | 6 +- library/features/pom.xml | 2 +- library/impl/pom.xml | 7 +- .../lib/impl/OvsdbConnectionService.java | 5 - library/karaf/pom.xml | 2 +- library/pom.xml | 2 +- pom.xml | 2 +- schemas/pom.xml | 2 +- southbound/pom.xml | 2 +- southbound/southbound-artifacts/pom.xml | 2 +- .../southbound-features/features/pom.xml | 2 +- .../odl-ovsdb-southbound-api/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-ovsdb-southbound-impl-rest/pom.xml | 4 +- .../odl-ovsdb-southbound-impl-ui/pom.xml | 4 +- .../odl-ovsdb-southbound-impl/pom.xml | 4 +- .../src/main/feature/feature.xml | 6 +- .../odl-ovsdb-southbound-test/pom.xml | 2 +- southbound/southbound-features/pom.xml | 2 +- southbound/southbound-impl/pom.xml | 13 + .../southbound/InstanceIdentifierCodec.java | 2 + .../southbound/OvsdbConnectionInstance.java | 35 +-- .../southbound/OvsdbConnectionManager.java | 5 +- .../OvsdbDataTreeChangeListener.java | 2 +- .../southbound/OvsdbOperGlobalListener.java | 2 +- .../ovsdb/southbound/SouthboundProvider.java | 10 +- .../ovsdb/transact/BridgeUpdateCommand.java | 11 +- .../transact/OvsdbNodeUpdateCommand.java | 2 + .../ovsdb/transact/QosUpdateCommand.java | 2 + .../ovsdb/transact/QueueUpdateCommand.java | 2 + .../TerminationPointCreateCommand.java | 9 +- .../TerminationPointUpdateCommand.java | 8 + .../OvsdbUpgradeStateListener.java | 2 +- .../reconciliation/ReconciliationManager.java | 3 - .../md/OvsdbAutoAttachRemovedCommand.java | 5 +- .../md/OvsdbAutoAttachUpdateCommand.java | 5 +- .../md/OvsdbBridgeUpdateCommand.java | 2 + .../md/OvsdbControllerRemovedCommand.java | 2 + .../md/OvsdbControllerUpdateCommand.java | 2 + .../md/OvsdbManagersRemovedCommand.java | 5 +- .../md/OvsdbManagersUpdateCommand.java | 5 +- .../md/OvsdbOperationalCommandAggregator.java | 6 +- .../md/OvsdbQosRemovedCommand.java | 2 + .../md/OvsdbQosUpdateCommand.java | 2 + .../md/OvsdbQueueRemovedCommand.java | 5 +- .../md/OvsdbQueueUpdateCommand.java | 2 + .../md/TransactionInvokerImpl.java | 3 +- .../southbound/OvsdbMonitorCallbackTest.java | 3 +- .../southbound/SouthboundMapperTest.java | 7 +- .../transact/BridgeOperationalStateTest.java | 8 +- .../TransactCommandAggregatorTest.java | 3 +- .../transact/TransactInvokerImplTest.java | 3 +- .../md/OvsdbAutoAttachUpdateCommandTest.java | 5 +- .../md/OvsdbBridgeRemovedCommandTest.java | 5 +- ...OvsdbOperationalCommandAggregatorTest.java | 3 +- southbound/southbound-it/pom.xml | 2 +- .../ovsdb/southbound/it/SouthboundIT.java | 227 +++++------------- southbound/southbound-karaf/pom.xml | 2 +- utils/config/pom.xml | 2 +- .../utils/NotifyingDataChangeListener.java | 2 +- utils/odl-ovsdb-utils/pom.xml | 4 +- .../src/main/feature/feature.xml | 2 +- utils/ovsdb-it-utils/pom.xml | 4 +- .../ovsdb/utils/ovsdb/it/utils/DockerOvs.java | 20 +- .../ovsdb/utils/ovsdb/it/utils/ProcUtils.java | 20 +- utils/pom.xml | 2 +- utils/servicehelper/pom.xml | 2 +- 113 files changed, 319 insertions(+), 412 deletions(-) diff --git a/commons/binding-parent/pom.xml b/commons/binding-parent/pom.xml index 544a5af2a..bff727771 100644 --- a/commons/binding-parent/pom.xml +++ b/commons/binding-parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 8.0.11 + 9.0.1 @@ -25,7 +25,7 @@ org.opendaylight.infrautils infrautils-artifacts - 2.0.13 + 3.0.0 pom import @@ -39,7 +39,7 @@ org.opendaylight.aaa aaa-artifacts - 0.14.10 + 0.15.1 pom import diff --git a/commons/it/pom.xml b/commons/it/pom.xml index 8486c03c4..dc86083a3 100644 --- a/commons/it/pom.xml +++ b/commons/it/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller mdsal-it-parent - 4.0.10 + 5.0.1 @@ -70,7 +70,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 8.0.11 + 9.0.1 pom import diff --git a/commons/pom.xml b/commons/pom.xml index 7fdfa2c3e..a5360e557 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index 24afc2f24..f070d672a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index dbd692541..34f03099c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 9.0.13 + 10.0.0 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml index 9c57ab72e..09b978d81 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -22,7 +22,7 @@ org.opendaylight.mdsal mdsal-artifacts - 8.0.11 + 9.0.1 pom import diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml index 1847b8d86..42da1bd0c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/src/main/feature/feature.xml @@ -8,7 +8,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal - odl-mdsal-model-odl-l2-types + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-odl-l2-types diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml index e1ac13426..b21fc8ba3 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf odl-restconf - 2.0.14 + 3.0.0 xml features diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml index 3b84ea3c0..27b9dfa4f 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml index a5a9cc580..b80e52344 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf odl-mdsal-apidocs - 2.0.14 + 3.0.0 xml features diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml index 090fd545b..114fc4735 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml index ff2aaf089..5afd2ecb6 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 org.opendaylight.ovsdb diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml index 5473aa4eb..48157f52e 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/pom.xml @@ -26,10 +26,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ODL :: ovsdb :: ${project.artifactId} - - org.osgi - osgi.core - org.opendaylight.yangtools yang-data-util @@ -95,6 +91,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.apache.karaf.shell.core provided + + + org.osgi + org.osgi.framework + diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java index 10412e837..21ead14ef 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepConnectionManager.java @@ -673,7 +673,7 @@ public class HwvtepConnectionManager implements OvsdbConnectionListener, AutoClo return entityConnectionMap.get(entity); } - private static class HwvtepDeviceEntityOwnershipListener implements EntityOwnershipListener { + private static final class HwvtepDeviceEntityOwnershipListener implements EntityOwnershipListener { private final HwvtepConnectionManager hcm; private final EntityOwnershipListenerRegistration listenerRegistration; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java index a7d583c44..e45466b79 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepDataChangeListener.java @@ -41,7 +41,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener, AutoCloseable { +public final class HwvtepDataChangeListener implements ClusteredDataTreeChangeListener, AutoCloseable { private ListenerRegistration registration; private final HwvtepConnectionManager hcm; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java index 9bdb13718..aee9a548a 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepOperGlobalListener.java @@ -35,7 +35,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepOperGlobalListener implements ClusteredDataTreeChangeListener, AutoCloseable { +public final class HwvtepOperGlobalListener implements ClusteredDataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(HwvtepOperGlobalListener.class); private static final Map, ConnectionInfo> NODE_CONNECTION_INFO = new ConcurrentHashMap<>(); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java index c34eb4492..c5ce15ffe 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java @@ -221,7 +221,7 @@ public class HwvtepSouthboundProvider } } - private static class HwvtepsbPluginInstanceEntityOwnershipListener implements EntityOwnershipListener { + private static final class HwvtepsbPluginInstanceEntityOwnershipListener implements EntityOwnershipListener { private final HwvtepSouthboundProvider hsp; private final EntityOwnershipListenerRegistration listenerRegistration; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java index fc0e3a2c1..dfc112e26 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundUtil.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.hwvtepsouthbound; import static java.util.Objects.requireNonNull; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Map; import java.util.Optional; @@ -56,8 +57,9 @@ public final class HwvtepSouthboundUtil { // Prevent instantiating a utility class } - // FIXME: eliminate this static wiring by encaspulating the codec into a service - @Deprecated + // FIXME: eliminate this static wiring by encapsulating the codec into a service + @Deprecated(forRemoval = true) + @SuppressFBWarnings("EI_EXPOSE_STATIC_REP2") public static void setInstanceIdentifierCodec(InstanceIdentifierCodec iidc) { instanceIdentifierCodec = iidc; } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java index bc169b945..85c4dab8e 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java @@ -20,7 +20,7 @@ import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener; import org.opendaylight.yangtools.yang.model.api.Module; -public class InstanceIdentifierCodec +public final class InstanceIdentifierCodec // FIXME: this really wants to be wired as yangtools-data-codec-gson's codecs, because ... extends AbstractModuleStringInstanceIdentifierCodec implements EffectiveModelContextListener { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationManager.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationManager.java index 72de9ce65..422ff64e5 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationManager.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/configuration/HwvtepReconciliationManager.java @@ -26,9 +26,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepReconciliationManager implements ClusteredDataTreeChangeListener, AutoCloseable { - +public final class HwvtepReconciliationManager implements ClusteredDataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(HwvtepReconciliationManager.class); + private final ListenerRegistration registration; private final HwvtepConnectionManager hcm; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterRemoveCommand.java index dd7f86576..10907bd08 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalRouterRemoveCommand.java @@ -9,7 +9,6 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.transact; import static org.opendaylight.ovsdb.lib.operations.Operations.op; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -74,8 +73,6 @@ public class LogicalRouterRemoveCommand } } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private void removeLogicalRouter(final TransactionBuilder transaction, final InstanceIdentifier instanceIdentifier, final List routerList) { for (LogicalRouters lrouter: routerList) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchUcastsRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchUcastsRemoveCommand.java index 9a7affa47..63cb5ad8f 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchUcastsRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/LogicalSwitchUcastsRemoveCommand.java @@ -42,7 +42,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class LogicalSwitchUcastsRemoveCommand +public final class LogicalSwitchUcastsRemoveCommand extends AbstractTransactCommand { private static final Logger LOG = LoggerFactory.getLogger(LogicalSwitchUcastsRemoveCommand.class); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java index 3c1331c79..f0aebff57 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PhysicalSwitchUpdateCommand.java @@ -51,7 +51,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { +public final class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { private static final Logger LOG = LoggerFactory.getLogger(PhysicalSwitchUpdateCommand.class); public PhysicalSwitchUpdateCommand(final HwvtepOperationalState state, @@ -235,13 +235,9 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { if (bfdParams != null) { Map bfdParamMap = new HashMap<>(); for (BfdParams bfdParam : bfdParams.values()) { - bfdParamMap.put(bfdParam.getBfdParamKey(), bfdParam.getBfdParamValue()); - } - try { - tunnel.setBfdParams(ImmutableMap.copyOf(bfdParamMap)); - } catch (NullPointerException e) { - LOG.warn("Incomplete BFD Params for tunnel", e); + bfdParamMap.put(bfdParam.requireBfdParamKey(), bfdParam.requireBfdParamValue()); } + tunnel.setBfdParams(ImmutableMap.copyOf(bfdParamMap)); } } @@ -250,13 +246,9 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { if (bfdLocalConfigs != null) { Map configLocalMap = new HashMap<>(); for (BfdLocalConfigs localConfig : bfdLocalConfigs.values()) { - configLocalMap.put(localConfig.getBfdLocalConfigKey(), localConfig.getBfdLocalConfigValue()); - } - try { - tunnel.setBfdConfigLocal(ImmutableMap.copyOf(configLocalMap)); - } catch (NullPointerException e) { - LOG.warn("Incomplete BFD LocalConfig for tunnel", e); + configLocalMap.put(localConfig.requireBfdLocalConfigKey(), localConfig.requireBfdLocalConfigValue()); } + tunnel.setBfdConfigLocal(ImmutableMap.copyOf(configLocalMap)); } } @@ -265,13 +257,10 @@ public class PhysicalSwitchUpdateCommand extends AbstractTransactCommand { if (bfdRemoteConfigs != null) { Map configRemoteMap = new HashMap<>(); for (BfdRemoteConfigs remoteConfig : bfdRemoteConfigs.values()) { - configRemoteMap.put(remoteConfig.getBfdRemoteConfigKey(), remoteConfig.getBfdRemoteConfigValue()); - } - try { - tunnel.setBfdConfigRemote(ImmutableMap.copyOf(configRemoteMap)); - } catch (NullPointerException e) { - LOG.warn("Incomplete BFD RemoteConfig for tunnel", e); + configRemoteMap.put(remoteConfig.requireBfdRemoteConfigKey(), + remoteConfig.requireBfdRemoteConfigValue()); } + tunnel.setBfdConfigRemote(ImmutableMap.copyOf(configRemoteMap)); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PlainLogicalSwitchRemoveCmd.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PlainLogicalSwitchRemoveCmd.java index f48095d1c..bd4a180da 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PlainLogicalSwitchRemoveCmd.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/PlainLogicalSwitchRemoveCmd.java @@ -28,7 +28,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class PlainLogicalSwitchRemoveCmd +public final class PlainLogicalSwitchRemoveCmd extends AbstractTransactCommand { private static final Logger LOG = LoggerFactory.getLogger(PlainLogicalSwitchRemoveCmd.class); diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java index 1bf0dfe24..2a232f20f 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transact/TransactCommandAggregator.java @@ -70,13 +70,8 @@ public class TransactCommandAggregator implements TransactCommand { @Override public void execute(TransactionBuilder transaction) { - for (TransactCommand command:commands) { - try { - command.execute(transaction); - } catch (NullPointerException e) { - LOG.error("Execution of command {} failed with the following exception." - + " Continuing the execution of remaining commands", command, e); - } + for (TransactCommand command : commands) { + command.execute(transaction); } } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java index 2cbfe99bb..15ded0964 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/GlobalUpdateCommand.java @@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class GlobalUpdateCommand extends AbstractTransactionCommand { +public final class GlobalUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(GlobalUpdateCommand.class); private final Map updatedHwvtepRows = diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java index 44f49e2a6..2653419bd 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalRouterUpdateCommand.java @@ -55,8 +55,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionCommand { +public final class HwvtepLogicalRouterUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepLogicalRouterUpdateCommand.class); + private final Map updatedLRRows; public HwvtepLogicalRouterUpdateCommand(HwvtepConnectionInstance key, TableUpdates updates, diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java index b2064d9c9..b3a56ac36 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepLogicalSwitchUpdateCommand.java @@ -36,10 +36,10 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepLogicalSwitchUpdateCommand extends AbstractTransactionCommand { +public final class HwvtepLogicalSwitchUpdateCommand extends AbstractTransactionCommand { + private static final Logger LOG = LoggerFactory.getLogger(HwvtepLogicalSwitchUpdateCommand.class); private final Map updatedLSRows; - private static final Logger LOG = LoggerFactory.getLogger(HwvtepLogicalSwitchUpdateCommand.class); public HwvtepLogicalSwitchUpdateCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java index 0099e42c4..bee29bb32 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepManagerUpdateCommand.java @@ -35,9 +35,9 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepManagerUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepManagerUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepManagerUpdateCommand.class); + private final Map updatedMgrRows; private final Map oldMgrRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java index 6a0a06a09..595046557 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsLocalUpdateCommand.java @@ -40,7 +40,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransactionCommand { +public final class HwvtepMcastMacsLocalUpdateCommand extends AbstractTransactionCommand { private final Map updatedMMacsLocalRows; private final Map updatedPLocSetRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java index feb15d94b..9fb852ecb 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepMcastMacsRemoteUpdateCommand.java @@ -41,8 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepMcastMacsRemoteUpdateCommand extends AbstractTransactionCommand { private final Map updatedMMacsRemoteRows; private final Map updatedPLocSetRows; private final Map updatedPLocRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java index 5575424af..03963813e 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepOperationalCommandAggregator.java @@ -9,7 +9,6 @@ package org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md; import java.util.ArrayList; import java.util.List; -import java.util.NoSuchElementException; import org.opendaylight.mdsal.binding.api.ReadWriteTransaction; import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepConnectionInstance; import org.opendaylight.ovsdb.lib.message.TableUpdates; @@ -17,9 +16,9 @@ import org.opendaylight.ovsdb.lib.schema.DatabaseSchema; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepOperationalCommandAggregator implements TransactionCommand { - +public final class HwvtepOperationalCommandAggregator implements TransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepOperationalCommandAggregator.class); + private List commands = new ArrayList<>(); private final HwvtepConnectionInstance connectionInstance; @@ -51,15 +50,9 @@ public class HwvtepOperationalCommandAggregator implements TransactionCommand { @Override public void execute(ReadWriteTransaction transaction) { for (TransactionCommand command: commands) { - try { - // This may be noisy, can be silenced if needed. - LOG.trace("Executing command {}", command); - command.execute(transaction); - } catch (NullPointerException | NoSuchElementException | ClassCastException e) { - LOG.error("Execution of command {} failed with the following exception." - + " Continuing the execution of remaining commands", command, e); - } - + // This may be noisy, can be silenced if needed. + LOG.trace("Executing command {}", command); + command.execute(transaction); } connectionInstance.getDeviceInfo().onOperDataAvailable(); } diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java index e68ba619b..7ba5ac9d3 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalLocatorUpdateCommand.java @@ -30,8 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class HwvtepPhysicalLocatorUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepPhysicalLocatorUpdateCommand extends AbstractTransactionCommand { private final Map updatedPLocRows; private final Map oldPLocRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java index f14f50bec..7a768d931 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalPortUpdateCommand.java @@ -66,7 +66,7 @@ import org.opendaylight.yangtools.yang.common.Uint16; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand { +public final class HwvtepPhysicalPortUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepPhysicalPortUpdateCommand.class); private final Map updatedPPRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java index 2b62bc5a0..f7729fc14 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepPhysicalSwitchUpdateCommand.java @@ -58,9 +58,9 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepPhysicalSwitchUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepPhysicalSwitchUpdateCommand.class); + private final Map updatedPSRows; private Map updatedTunnelRows; private final Map oldPSRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java index 477140386..6b9c3c0f3 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelRemoveCommand.java @@ -27,9 +27,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepTunnelRemoveCommand extends AbstractTransactionCommand { - +public final class HwvtepTunnelRemoveCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepTunnelRemoveCommand.class); + Collection deletedTunnelRows = null; public HwvtepTunnelRemoveCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java index c84b95876..45bd770d2 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepTunnelUpdateCommand.java @@ -38,9 +38,9 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepTunnelUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepTunnelUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepTunnelUpdateCommand.class); + private Map updatedTunnelRows; public HwvtepTunnelUpdateCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java index 8c034373b..d5823e969 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsLocalUpdateCommand.java @@ -40,9 +40,9 @@ import org.opendaylight.yangtools.yang.binding.util.BindingMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransactionCommand { - +public final class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(HwvtepUcastMacsLocalUpdateCommand.class); + private final Map updatedUMacsLocalRows; private final Map updatedPLocRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java index b66c822e6..da0922991 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/HwvtepUcastMacsRemoteUpdateCommand.java @@ -37,7 +37,7 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.util.BindingMap; -public class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionCommand { +public final class HwvtepUcastMacsRemoteUpdateCommand extends AbstractTransactionCommand { private final Map updatedUMacsRemoteRows; private final Map updatedPLocRows; diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java index eb2f09add..c06a0779c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/transactions/md/TransactionInvokerImpl.java @@ -11,6 +11,7 @@ import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import java.lang.Thread.UncaughtExceptionHandler; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -34,8 +35,8 @@ import org.slf4j.LoggerFactory; * Copied over as-is from southbound plugin. Good candidate to be common * when refactoring code. */ -public class TransactionInvokerImpl implements TransactionInvoker,TransactionChainListener, Runnable, AutoCloseable, - Thread.UncaughtExceptionHandler { +public final class TransactionInvokerImpl implements TransactionInvoker, TransactionChainListener, Runnable, + AutoCloseable, UncaughtExceptionHandler { private static final Logger LOG = LoggerFactory.getLogger(TransactionInvokerImpl.class); private static final int QUEUE_SIZE = 10000; diff --git a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml index 0a092e671..fc9c82247 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml @@ -89,7 +89,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.osgi - osgi.core + org.osgi.framework compile diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index 451434a65..5f2decf25 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 9.0.13 + 10.0.0 4.0.0 diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index 9c6f88c47..dacaa9a8a 100644 --- a/hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index 8a3e3652a..c4a694044 100644 --- a/library/artifacts/pom.xml +++ b/library/artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index 1f52e90ee..ca81ebb8c 100644 --- a/library/features/features/pom.xml +++ b/library/features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 9.0.13 + 10.0.0 diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index 5fc02bc44..0686bbe8c 100644 --- a/library/features/odl-ovsdb-library/pom.xml +++ b/library/features/odl-ovsdb-library/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -41,7 +41,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.aaa odl-aaa-cert - 0.14.10 + 0.15.1 xml features diff --git a/library/features/odl-ovsdb-library/src/main/feature/feature.xml b/library/features/odl-ovsdb-library/src/main/feature/feature.xml index 4a22f3a52..11aec227e 100644 --- a/library/features/odl-ovsdb-library/src/main/feature/feature.xml +++ b/library/features/odl-ovsdb-library/src/main/feature/feature.xml @@ -8,9 +8,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-jackson-2.12 - odl-netty-4 - odl-aaa-cert + odl-jackson-2.12 + odl-netty-4 + odl-aaa-cert mvn:org.opendaylight.ovsdb/library/${project.version}/cfg/config diff --git a/library/features/pom.xml b/library/features/pom.xml index dc1708018..934fa2eef 100644 --- a/library/features/pom.xml +++ b/library/features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 org.opendaylight.ovsdb diff --git a/library/impl/pom.xml b/library/impl/pom.xml index 0c7764034..5368b0587 100644 --- a/library/impl/pom.xml +++ b/library/impl/pom.xml @@ -50,10 +50,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html com.fasterxml.jackson.core jackson-databind - - org.osgi - osgi.core - com.google.guava guava @@ -68,8 +64,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html io.netty - netty-transport-native-epoll - linux-x86_64 + netty-transport-classes-epoll diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java index 8eac2efa8..e5d5210fc 100644 --- a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java +++ b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/impl/OvsdbConnectionService.java @@ -13,7 +13,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; @@ -435,8 +434,6 @@ public class OvsdbConnectionService implements AutoCloseable, OvsdbConnection { }, CONNECTION_NOTIFIER_SERVICE); } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private static void handleNewPassiveConnection(final Channel channel) { if (!channel.isOpen()) { LOG.warn("Channel {} is not open, skipped further processing of the connection.",channel); @@ -564,8 +561,6 @@ public class OvsdbConnectionService implements AutoCloseable, OvsdbConnection { return null; } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private static List getPassiveClientsFromSameNode(final OvsdbClient ovsdbClient) { List passiveClients = new ArrayList<>(); for (OvsdbClient client : CONNECTIONS.keySet()) { diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index fea6ede09..5683e56cf 100644 --- a/library/karaf/pom.xml +++ b/library/karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 9.0.13 + 10.0.0 4.0.0 diff --git a/library/pom.xml b/library/pom.xml index e9604f34b..d69880ce4 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/pom.xml b/pom.xml index d8460649d..23093dbd1 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/schemas/pom.xml b/schemas/pom.xml index a3fa04ff9..aa680e2e8 100644 --- a/schemas/pom.xml +++ b/schemas/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/southbound/pom.xml b/southbound/pom.xml index 0a213c7a2..7de80f88e 100644 --- a/southbound/pom.xml +++ b/southbound/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index 8cf76c29c..730e9328e 100644 --- a/southbound/southbound-artifacts/pom.xml +++ b/southbound/southbound-artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index ec036b478..089c4b8a9 100644 --- a/southbound/southbound-features/features/pom.xml +++ b/southbound/southbound-features/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 9.0.13 + 10.0.0 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml index 3b5b8348b..b85ac2040 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 8.0.11 + 9.0.1 pom import diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml index e8c5bd940..cbcdd7c4b 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/src/main/feature/feature.xml @@ -8,7 +8,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal - odl-mdsal-model-odl-l2-types + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-odl-l2-types diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml index 960d0aeca..0f2093adf 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf odl-restconf - 2.0.14 + 3.0.0 xml features diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml index bee76c69a..ca76a4c3b 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf odl-mdsal-apidocs - 2.0.14 + 3.0.0 xml features diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml index 21948a2c5..f379c0025 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -30,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.infrautils infrautils-artifacts - 2.0.13 + 3.0.0 pom import diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml index 87e4826e2..6f9babc36 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml @@ -8,9 +8,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-jackson-2.12 - odl-infrautils-diagstatus - odl-infrautils-ready + odl-jackson-2.12 + odl-infrautils-diagstatus + odl-infrautils-ready mvn:org.opendaylight.ovsdb/southbound-impl/${project.version}/cfg/config diff --git a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml index 3e2efd46d..e4dca9ece 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 diff --git a/southbound/southbound-features/pom.xml b/southbound/southbound-features/pom.xml index 668493dab..b3bf9656f 100644 --- a/southbound/southbound-features/pom.xml +++ b/southbound/southbound-features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/southbound/southbound-impl/pom.xml b/southbound/southbound-impl/pom.xml index a67f23a1b..c735b627c 100644 --- a/southbound/southbound-impl/pom.xml +++ b/southbound/southbound-impl/pom.xml @@ -24,6 +24,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html ODL :: ovsdb :: ${project.artifactId} ../southbound-it/target/jacoco-it.exec + + false @@ -121,13 +123,24 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-binding-test-utils + + + org.mockito + mockito-core + 3.12.4 + test + org.powermock powermock-api-mockito2 + 2.0.9 + test org.powermock powermock-module-junit4 + 2.0.9 + test org.opendaylight.ovsdb diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java index f3e5a7ebe..24c808bc9 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java @@ -7,6 +7,7 @@ */ package org.opendaylight.ovsdb.southbound; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -32,6 +33,7 @@ public class InstanceIdentifierCodec extends AbstractModuleStringInstanceIdentif private DataSchemaContextTree dataSchemaContextTree; private SchemaContext context; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public InstanceIdentifierCodec(final DOMSchemaService schemaService, final BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer) { schemaService.registerSchemaContextListener(this); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java index a7fd308c3..64604adc1 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionInstance.java @@ -243,34 +243,21 @@ public class OvsdbConnectionInstance { stampInstanceIdentifier(transaction, instanceIdentifier.firstIdentifierOf(Node.class), instanceIdentifierCodec); - try { - ovs.setExternalIds( - YangUtils.convertYangKeyValueListToMap(externalIds, OpenvswitchExternalIds::getExternalIdKey, - OpenvswitchExternalIds::getExternalIdValue)); - Mutate mutate = op.mutate(ovs) - .addMutation(ovs.getExternalIdsColumn().getSchema(), - Mutator.INSERT, - ovs.getExternalIdsColumn().getData()); - transaction.add(mutate); - } catch (NullPointerException e) { - LOG.warn("Incomplete OVSDB Node external IDs", e); - } - - + ovs.setExternalIds( + YangUtils.convertYangKeyValueListToMap(externalIds, OpenvswitchExternalIds::requireExternalIdKey, + OpenvswitchExternalIds::requireExternalIdValue)); + Mutate mutate = op.mutate(ovs) + .addMutation(ovs.getExternalIdsColumn().getSchema(), + Mutator.INSERT, ovs.getExternalIdsColumn().getData()); + transaction.add(mutate); Map otherConfigs = initialCreateData.getOpenvswitchOtherConfigs(); if (otherConfigs != null) { - try { - ovs.setOtherConfig(YangUtils.convertYangKeyValueListToMap(otherConfigs, - OpenvswitchOtherConfigs::getOtherConfigKey, - OpenvswitchOtherConfigs::getOtherConfigValue)); - transaction.add(op.mutate(ovs).addMutation(ovs.getOtherConfigColumn().getSchema(), - Mutator.INSERT, - ovs.getOtherConfigColumn().getData())); - } catch (NullPointerException e) { - LOG.warn("Incomplete OVSDB Node other_config", e); - } + ovs.setOtherConfig(YangUtils.convertYangKeyValueListToMap(otherConfigs, + OpenvswitchOtherConfigs::requireOtherConfigKey, OpenvswitchOtherConfigs::requireOtherConfigValue)); + transaction.add(op.mutate(ovs).addMutation(ovs.getOtherConfigColumn().getSchema(), + Mutator.INSERT, ovs.getOtherConfigColumn().getData())); } invoke(transaction); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java index 1ecfd0ae2..4df5af87d 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbConnectionManager.java @@ -14,7 +14,6 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.MoreExecutors; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.net.ConnectException; import java.net.InetAddress; import java.net.UnknownHostException; @@ -429,8 +428,6 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos reconciliationManager.cancelTerminationPointReconciliation(); } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private void handleOwnershipChanged(final EntityOwnershipChange ownershipChange) { OvsdbConnectionInstance ovsdbConnectionInstance = getConnectionInstanceFromEntity(ownershipChange.getEntity()); LOG.debug("Ovsdb handleOwnershipChanged: {} event received for device {}", @@ -676,7 +673,7 @@ public class OvsdbConnectionManager implements OvsdbConnectionListener, AutoClos reconciliationManager.enqueue(task); } - private static class OvsdbDeviceEntityOwnershipListener implements EntityOwnershipListener { + private static final class OvsdbDeviceEntityOwnershipListener implements EntityOwnershipListener { private final OvsdbConnectionManager cm; private final EntityOwnershipListenerRegistration listenerRegistration; diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java index d8a524019..bfcc2bb49 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataTreeChangeListener.java @@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory; /** * Data-tree change listener for OVSDB. */ -public class OvsdbDataTreeChangeListener implements ClusteredDataTreeChangeListener, AutoCloseable { +public final class OvsdbDataTreeChangeListener implements ClusteredDataTreeChangeListener, AutoCloseable { /** Our registration. */ private final ListenerRegistration> registration; diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java index ae71d9001..11433b15d 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbOperGlobalListener.java @@ -30,7 +30,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class OvsdbOperGlobalListener implements ClusteredDataTreeChangeListener, AutoCloseable { +public final class OvsdbOperGlobalListener implements ClusteredDataTreeChangeListener, AutoCloseable { public static final ConcurrentMap, Node> OPER_NODE_CACHE = new ConcurrentHashMap<>(); private static final Logger LOG = LoggerFactory.getLogger(OvsdbOperGlobalListener.class); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java index 358a7ec89..0f9d9233d 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java @@ -60,6 +60,10 @@ public class SouthboundProvider implements ClusteredDataTreeChangeListener reconcileBridgeInclusionList = new ArrayList<>(); + // FIXME: get rid of this static + private static List reconcileBridgeExclusionList = new ArrayList<>(); public static DataBroker getDb() { return db; @@ -79,8 +83,6 @@ public class SouthboundProvider implements ClusteredDataTreeChangeListener operTopologyRegistration; private final OvsdbDiagStatusProvider ovsdbStatusProvider; - private static List reconcileBridgeInclusionList = new ArrayList<>(); - private static List reconcileBridgeExclusionList = new ArrayList<>(); private OvsdbUpgradeStateListener ovsdbUpgradeStateListener; @Inject @@ -215,7 +217,7 @@ public class SouthboundProvider implements ClusteredDataTreeChangeListener bridgeList) { reconcileBridgeInclusionList = bridgeList; } + @SuppressFBWarnings("EI_EXPOSE_STATIC_REP2") public static void setBridgesReconciliationExclusionList(final List bridgeList) { reconcileBridgeExclusionList = bridgeList; } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommand.java index f10883d80..1c427d667 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeUpdateCommand.java @@ -9,12 +9,14 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static org.opendaylight.ovsdb.lib.operations.Operations.op; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Optional; +import java.util.Set; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.ovsdb.lib.notation.UUID; @@ -39,7 +41,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class BridgeUpdateCommand implements TransactCommand { - private static final Logger LOG = LoggerFactory.getLogger(BridgeUpdateCommand.class); @Override @@ -124,6 +125,7 @@ public class BridgeUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void setOpenDaylightExternalIds(final Bridge bridge, final InstanceIdentifier iid, final OvsdbBridgeAugmentation ovsdbManagedNode, final InstanceIdentifierCodec instanceIdentifierCodec) { @@ -140,6 +142,7 @@ public class BridgeUpdateCommand implements TransactCommand { bridge.setExternalIds(externalIdMap); } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void setOpenDaylightOtherConfig(final @NonNull Bridge bridge, final @NonNull OvsdbBridgeAugmentation ovsdbManagedNode) { try { @@ -158,9 +161,9 @@ public class BridgeUpdateCommand implements TransactCommand { String portNamedUuid = "Port_" + SouthboundMapper.getRandomUuid(); Port port = transaction.getTypedRowWrapper(Port.class); port.setName(ovsdbManagedNode.getBridgeName().getValue()); - port.setInterfaces(Collections.singleton(TransactUtils.extractNamedUuid(interfaceInsert))); + port.setInterfaces(Set.of(TransactUtils.extractNamedUuid(interfaceInsert))); transaction.add(op.insert(port).withId(portNamedUuid)); - bridge.setPorts(Collections.singleton(new UUID(portNamedUuid))); + bridge.setPorts(Set.of(new UUID(portNamedUuid))); } private static Insert setInterface(final TransactionBuilder transaction, @@ -179,7 +182,7 @@ public class BridgeUpdateCommand implements TransactCommand { final OvsdbBridgeAugmentation ovsdbManagedNode) { if (ovsdbManagedNode.getFailMode() != null && SouthboundConstants.OVSDB_FAIL_MODE_MAP.get(ovsdbManagedNode.getFailMode()) != null) { - bridge.setFailMode(Collections.singleton( + bridge.setFailMode(Set.of( SouthboundConstants.OVSDB_FAIL_MODE_MAP.get(ovsdbManagedNode.getFailMode()))); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/OvsdbNodeUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/OvsdbNodeUpdateCommand.java index 41dfaecf5..e47c3e715 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/OvsdbNodeUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/OvsdbNodeUpdateCommand.java @@ -9,6 +9,7 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static org.opendaylight.ovsdb.lib.operations.Operations.op; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -48,6 +49,7 @@ public class OvsdbNodeUpdateCommand implements TransactCommand { instanceIdentifierCodec); } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void execute(final TransactionBuilder transaction, final Map, OvsdbNodeAugmentation> updated, final InstanceIdentifierCodec instanceIdentifierCodec) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java index fccf9cf01..d2d49f701 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QosUpdateCommand.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static java.nio.charset.StandardCharsets.UTF_8; import static org.opendaylight.ovsdb.lib.operations.Operations.op; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -56,6 +57,7 @@ public class QosUpdateCommand implements TransactCommand { instanceIdentifierCodec); } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void execute(final TransactionBuilder transaction, final BridgeOperationalState state, final Map, QosEntries> createdOrUpdated, final InstanceIdentifierCodec instanceIdentifierCodec) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueUpdateCommand.java index 3bbbacede..ef16402e6 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/QueueUpdateCommand.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static java.nio.charset.StandardCharsets.UTF_8; import static org.opendaylight.ovsdb.lib.operations.Operations.op; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -53,6 +54,7 @@ public class QueueUpdateCommand implements TransactCommand { instanceIdentifierCodec); } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void execute(final TransactionBuilder transaction, final BridgeOperationalState state, final Map, Queues> createdOrUpdated, final InstanceIdentifierCodec instanceIdentifierCodec) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java index e733846af..297620b22 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointCreateCommand.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static org.opendaylight.ovsdb.lib.operations.Operations.op; import static org.opendaylight.ovsdb.southbound.SouthboundUtil.schemaMismatchLog; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -59,7 +60,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TerminationPointCreateCommand implements TransactCommand { - private static final Logger LOG = LoggerFactory.getLogger(TerminationPointCreateCommand.class); @Override @@ -186,6 +186,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createInterfaceOptions( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -201,6 +202,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createInterfaceExternalIds( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -222,6 +224,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createInterfaceOtherConfig( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -242,6 +245,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createInterfaceLldp( final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -262,6 +266,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createInterfaceBfd(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -280,6 +285,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createPortExternalIds(final OvsdbTerminationPointAugmentation terminationPoint, final Port port, final String opendaylightIid) { @@ -343,6 +349,7 @@ public class TerminationPointCreateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void createPortOtherConfig( final OvsdbTerminationPointAugmentation terminationPoint, final Port ovsPort) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java index 2e4a1689a..5667cc6f9 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TerminationPointUpdateCommand.java @@ -11,6 +11,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.opendaylight.ovsdb.lib.operations.Operations.op; import static org.opendaylight.ovsdb.southbound.SouthboundUtil.schemaMismatchLog; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -219,6 +220,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updateInterfaceOptions(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -233,6 +235,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updateInterfaceExternalIds(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -253,6 +256,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updateInterfaceLldp(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { try { @@ -271,6 +275,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updateInterfaceOtherConfig(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -290,6 +295,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updateInterfaceBfd(final OvsdbTerminationPointAugmentation terminationPoint, final Interface ovsInterface) { @@ -321,6 +327,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updatePortExternalIds(final OvsdbTerminationPointAugmentation terminationPoint, final Port port, final String opendaylightIid) { @@ -366,6 +373,7 @@ public class TerminationPointUpdateCommand implements TransactCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") private static void updatePortOtherConfig(final OvsdbTerminationPointAugmentation terminationPoint, final Port ovsPort) { Map portOtherConfigs = diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/OvsdbUpgradeStateListener.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/OvsdbUpgradeStateListener.java index cff0658d5..a3b71f8d9 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/OvsdbUpgradeStateListener.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/OvsdbUpgradeStateListener.java @@ -26,7 +26,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class OvsdbUpgradeStateListener implements ClusteredDataTreeChangeListener, AutoCloseable { +public final class OvsdbUpgradeStateListener implements ClusteredDataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(OvsdbUpgradeStateListener.class); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java index 7cd3b0c38..c71a16078 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java @@ -14,7 +14,6 @@ import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.UncheckedExecutionException; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.HashMap; import java.util.List; @@ -264,8 +263,6 @@ public class ReconciliationManager implements AutoCloseable { } } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private static Map, OvsdbTerminationPointAugmentation> filterTerminationPointsForBridge(NodeKey nodeKey, Map, OvsdbTerminationPointAugmentation> diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java index b7fa9d234..196a6b7cb 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachRemovedCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Map; import java.util.Optional; import org.opendaylight.mdsal.binding.api.ReadWriteTransaction; @@ -34,8 +35,8 @@ public class OvsdbAutoAttachRemovedCommand extends AbstractTransactionCommand { private final Map removedAutoAttachRows; - public OvsdbAutoAttachRemovedCommand(OvsdbConnectionInstance key, - TableUpdates updates, DatabaseSchema dbSchema) { + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") + public OvsdbAutoAttachRemovedCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); removedAutoAttachRows = TyperUtils.extractRowsRemoved(AutoAttach.class, getUpdates(), getDbSchema()); } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java index 5defc4582..6ec778e09 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommand.java @@ -7,6 +7,7 @@ */ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.LinkedHashMap; import java.util.Map; import java.util.Map.Entry; @@ -44,8 +45,8 @@ public class OvsdbAutoAttachUpdateCommand extends AbstractTransactionCommand { private final Map updatedAutoAttachRows; private final Map oldAutoAttachRows; - public OvsdbAutoAttachUpdateCommand(OvsdbConnectionInstance key, - TableUpdates updates, DatabaseSchema dbSchema) { + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") + public OvsdbAutoAttachUpdateCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); updatedAutoAttachRows = TyperUtils.extractRowsUpdated(AutoAttach.class, getUpdates(), getDbSchema()); oldAutoAttachRows = TyperUtils.extractRowsOld(AutoAttach.class, getUpdates(), getDbSchema()); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java index 30dbc76e1..8e31c6217 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java @@ -12,6 +12,7 @@ import static org.opendaylight.ovsdb.southbound.SouthboundUtil.schemaMismatchLog import com.google.common.annotations.VisibleForTesting; import com.google.common.net.InetAddresses; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; @@ -77,6 +78,7 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { private final List> updatedBridges = new ArrayList<>(); private final Map updatedBridgeNodes; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public OvsdbBridgeUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema, Map updatedBridgeNodes) { diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java index 498d0fd36..f8daa1e1b 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerRemovedCommand.java @@ -9,6 +9,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; import static java.util.Objects.requireNonNull; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -36,6 +37,7 @@ public class OvsdbControllerRemovedCommand extends AbstractTransactionCommand { private final Map removedControllerRows; private final Map updatedBridgeRows; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public OvsdbControllerRemovedCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java index f38ced177..a4adc7667 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbControllerUpdateCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; import com.google.common.annotations.VisibleForTesting; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -46,6 +47,7 @@ public class OvsdbControllerUpdateCommand extends AbstractTransactionCommand { private final Map updatedControllerRows; private final Map updatedBridgeRows; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public OvsdbControllerUpdateCommand(final OvsdbConnectionInstance key, final TableUpdates updates, final DatabaseSchema dbSchema) { super(key, updates, dbSchema); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java index 905b97b29..5b6e4c095 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersRemovedCommand.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; import static java.util.Objects.requireNonNull; import com.google.common.annotations.VisibleForTesting; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -36,8 +37,8 @@ public class OvsdbManagersRemovedCommand extends AbstractTransactionCommand { private final Map updatedOpenVSwitchRows; private final Map updatedManagerRows; - public OvsdbManagersRemovedCommand(OvsdbConnectionInstance key, - TableUpdates updates, DatabaseSchema dbSchema) { + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") + public OvsdbManagersRemovedCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); updatedOpenVSwitchRows = TyperUtils.extractRowsUpdated(OpenVSwitch.class, getUpdates(), getDbSchema()); oldOpenVSwitchRows = TyperUtils.extractRowsOld(OpenVSwitch.class, getUpdates(), getDbSchema()); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java index ba28c9be4..2d56395cf 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbManagersUpdateCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; import com.google.common.annotations.VisibleForTesting; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -43,8 +44,8 @@ public class OvsdbManagersUpdateCommand extends AbstractTransactionCommand { private Map updatedManagerRows; private Map updatedOpenVSwitchRows; - public OvsdbManagersUpdateCommand(OvsdbConnectionInstance key, - TableUpdates updates, DatabaseSchema dbSchema) { + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") + public OvsdbManagersUpdateCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); updatedOpenVSwitchRows = TyperUtils.extractRowsUpdated(OpenVSwitch.class, getUpdates(), getDbSchema()); updatedManagerRows = TyperUtils.extractRowsUpdated(Manager.class,getUpdates(), getDbSchema()); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregator.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregator.java index 0ed71daf0..96f4d8055 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregator.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregator.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -65,9 +66,10 @@ public class OvsdbOperationalCommandAggregator implements TransactionCommand { } } + @SuppressFBWarnings("DCN_NULLPOINTER_EXCEPTION") @Override public void execute(ReadWriteTransaction transaction) { - for (TransactionCommand command: commands) { + for (TransactionCommand command : commands) { try { command.execute(transaction); } catch (NullPointerException | NoSuchElementException | ClassCastException e) { @@ -78,7 +80,7 @@ public class OvsdbOperationalCommandAggregator implements TransactionCommand { @Override public void onSuccess() { - for (TransactionCommand command: commands) { + for (TransactionCommand command : commands) { command.onSuccess(); } } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java index ceeb93680..648cb3279 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -36,6 +37,7 @@ public class OvsdbQosRemovedCommand extends AbstractTransactionCommand { private final Map removedQosRows; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public OvsdbQosRemovedCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java index fd1bfade1..c779ff69a 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosUpdateCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Map; import java.util.Map.Entry; @@ -52,6 +53,7 @@ import org.opendaylight.yangtools.yang.common.Uint32; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public class OvsdbQosUpdateCommand extends AbstractTransactionCommand { private static final Logger LOG = LoggerFactory.getLogger(OvsdbQosUpdateCommand.class); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java index 8abd246bd..5dd2a2018 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java @@ -8,6 +8,7 @@ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -36,8 +37,8 @@ public class OvsdbQueueRemovedCommand extends AbstractTransactionCommand { private final Map removedQueueRows; - public OvsdbQueueRemovedCommand(OvsdbConnectionInstance key, - TableUpdates updates, DatabaseSchema dbSchema) { + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") + public OvsdbQueueRemovedCommand(OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); removedQueueRows = TyperUtils.extractRowsRemoved(Queue.class, getUpdates(), getDbSchema()); } diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java index 5a5b3ed51..571256a21 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueUpdateCommand.java @@ -7,6 +7,7 @@ */ package org.opendaylight.ovsdb.southbound.transactions.md; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Map; import java.util.Map.Entry; @@ -51,6 +52,7 @@ public class OvsdbQueueUpdateCommand extends AbstractTransactionCommand { private final Map updatedQueueRows; private final Map oldQueueRows; + @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") public OvsdbQueueUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) { super(key, updates, dbSchema); diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/TransactionInvokerImpl.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/TransactionInvokerImpl.java index bc41602e2..de49d84f9 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/TransactionInvokerImpl.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/TransactionInvokerImpl.java @@ -36,7 +36,8 @@ import org.opendaylight.mdsal.binding.api.TransactionChainListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TransactionInvokerImpl implements TransactionInvoker,TransactionChainListener, Runnable, AutoCloseable { +public final class TransactionInvokerImpl implements TransactionInvoker,TransactionChainListener, Runnable, + AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(TransactionInvokerImpl.class); private static final int QUEUE_SIZE = 10000; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java index 786f5de03..96c0adf49 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbMonitorCallbackTest.java @@ -5,10 +5,9 @@ * 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.ovsdb.southbound; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java index 9813b6a2c..50524040c 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundMapperTest.java @@ -59,6 +59,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ConnectionInfo; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntry; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.node.attributes.ManagerEntryBuilder; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -93,7 +94,7 @@ public class SouthboundMapperTest { map.put(SouthboundConstants.IID_EXTERNAL_ID_KEY, "IID_EXTERNAL_ID_KEY"); when(column.getData()).thenReturn(map); InstanceIdentifierCodec iidc = mock(InstanceIdentifierCodec.class); - InstanceIdentifier deserializedIid = InstanceIdentifier.create(Node.class); + InstanceIdentifier deserializedIid = InstanceIdentifier.create(NetworkTopology.class); when(iidc.bindingDeserializerOrNull("IID_EXTERNAL_ID_KEY")).thenReturn(deserializedIid); OvsdbConnectionInstance client = mock(OvsdbConnectionInstance.class, Mockito.RETURNS_DEEP_STUBS); assertEquals("Incorrect Instance Identifier received", deserializedIid, @@ -121,7 +122,7 @@ public class SouthboundMapperTest { map.put(SouthboundConstants.IID_EXTERNAL_ID_KEY, "IID_EXTERNAL_ID_KEY"); when(column.getData()).thenReturn(map); InstanceIdentifierCodec iidc = mock(InstanceIdentifierCodec.class); - InstanceIdentifier deserializedIid = InstanceIdentifier.create(Node.class); + InstanceIdentifier deserializedIid = InstanceIdentifier.create(NetworkTopology.class); when(iidc.bindingDeserializerOrNull("IID_EXTERNAL_ID_KEY")).thenReturn(deserializedIid); OvsdbConnectionInstance client = mock(OvsdbConnectionInstance.class, Mockito.RETURNS_DEEP_STUBS); assertEquals("Incorrect Instance Identifier received", deserializedIid, @@ -438,7 +439,7 @@ public class SouthboundMapperTest { // if true externalIdMap.put(SouthboundConstants.IID_EXTERNAL_ID_KEY, "test"); InstanceIdentifierCodec iidc = mock(InstanceIdentifierCodec.class); - InstanceIdentifier iid = InstanceIdentifier.create(Node.class); + InstanceIdentifier iid = InstanceIdentifier.create(NetworkTopology.class); when(iidc.bindingDeserializerOrNull("test")).thenReturn(iid); assertEquals("Incorrect Instance Identifier received", iid, SouthboundMapper.getInstanceIdentifier(iidc, ovs)); // if false diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalStateTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalStateTest.java index fad7823b1..ad0df27cd 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalStateTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/BridgeOperationalStateTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.ovsdb.southbound.ovsdb.transact; import static org.junit.Assert.assertEquals; @@ -50,8 +49,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @RunWith(MockitoJUnitRunner.class) public class BridgeOperationalStateTest { private final Node nd = new NodeBuilder().setNodeId(new NodeId("foo")).build(); - private final InstanceIdentifier iid = InstanceIdentifier.create(Topology.class); - private final InstanceIdentifier nodeIid = InstanceIdentifier.create(NetworkTopology.class) .child(Topology.class).child(Node.class); private final Node brNode = new NodeBuilder().setNodeId(new NodeId("bar")).build(); @@ -96,7 +93,8 @@ public class BridgeOperationalStateTest { doReturn(optNode).when(briOperationState).getBridgeNode(any(InstanceIdentifier.class)); OvsdbBridgeAugmentation ovsdbBriAug = mock(OvsdbBridgeAugmentation.class); doReturn(ovsdbBriAug).when(node).augmentation(OvsdbBridgeAugmentation.class); - Optional ovsdbBriAugOptional = briOperationState.getOvsdbBridgeAugmentation(iid); + Optional ovsdbBriAugOptional = briOperationState.getOvsdbBridgeAugmentation( + InstanceIdentifier.create(NetworkTopology.class)); assertNotNull(ovsdbBriAugOptional); assertTrue(ovsdbBriAugOptional.get() instanceof OvsdbBridgeAugmentation); } @@ -136,7 +134,7 @@ public class BridgeOperationalStateTest { OvsdbTerminationPointAugmentation ovsdbTermPntAug = mock(OvsdbTerminationPointAugmentation.class); doReturn(ovsdbTermPntAug).when(termPoint).augmentation(OvsdbTerminationPointAugmentation.class); Optional ovsdbTermPointOpt = briOperationState - .getOvsdbTerminationPointAugmentation(iid); + .getOvsdbTerminationPointAugmentation(InstanceIdentifier.create(NetworkTopology.class)); assertNotNull(ovsdbTermPointOpt); assertTrue(ovsdbTermPointOpt.get() instanceof OvsdbTerminationPointAugmentation); } diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactCommandAggregatorTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactCommandAggregatorTest.java index d447e7d1a..e6e1d37a2 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactCommandAggregatorTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactCommandAggregatorTest.java @@ -5,10 +5,9 @@ * 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.ovsdb.southbound.ovsdb.transact; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactInvokerImplTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactInvokerImplTest.java index 113f85be0..9a52fc572 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactInvokerImplTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactInvokerImplTest.java @@ -5,11 +5,10 @@ * 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.ovsdb.southbound.ovsdb.transact; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java index dd3845a52..c3aa71003 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbAutoAttachUpdateCommandTest.java @@ -5,11 +5,10 @@ * 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.ovsdb.southbound.transactions.md; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommandTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommandTest.java index dbe7d7341..812b81cb5 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommandTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeRemovedCommandTest.java @@ -5,11 +5,10 @@ * 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.ovsdb.southbound.transactions.md; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregatorTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregatorTest.java index 3f5961786..220aadf51 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregatorTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbOperationalCommandAggregatorTest.java @@ -5,11 +5,10 @@ * 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.ovsdb.southbound.transactions.md; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/southbound/southbound-it/pom.xml b/southbound/southbound-it/pom.xml index 28d089a56..679ab136c 100644 --- a/southbound/southbound-it/pom.xml +++ b/southbound/southbound-it/pom.xml @@ -88,7 +88,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.osgi - osgi.core + org.osgi.framework compile diff --git a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java index 6f78ce783..43600c850 100644 --- a/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java +++ b/southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java @@ -159,7 +159,6 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey; -import org.opendaylight.yangtools.concepts.Builder; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.Identifiable; import org.opendaylight.yangtools.yang.binding.Identifier; @@ -2678,45 +2677,28 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final int COUNTER_START = 0; private int counter = COUNTER_START; - protected abstract Builder builder(); - - protected abstract void setKey(Builder builder, String key); - - protected abstract void setValue(Builder builder, String value); - protected abstract boolean isValueMandatory(); public final T build(final String testName, final String key, final String value) { - final Builder builder = builder(); - this.counter++; - if (key != null) { - setKey(builder, String.format(FORMAT_STR, testName, key, this.counter)); - } - if (value != null) { - setValue(builder, String.format(FORMAT_STR, testName, value, this.counter)); - } - return builder.build(); + counter++; + return build(key == null ? null : String.format(FORMAT_STR, testName, key, counter), + value != null ? null : String.format(FORMAT_STR, testName, value, counter)); } + abstract @NonNull T build(@Nullable String key, @Nullable String value); + public final void reset() { - this.counter = COUNTER_START; + counter = COUNTER_START; } } private static final class SouthboundQueuesExternalIdsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new QueuesExternalIdsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((QueuesExternalIdsBuilder) builder).setQueuesExternalIdKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((QueuesExternalIdsBuilder) builder).setQueuesExternalIdValue(value); + QueuesExternalIds build(final String key, final String value) { + return new QueuesExternalIdsBuilder() + .setQueuesExternalIdKey(key) + .setQueuesExternalIdValue(value) + .build(); } @Override @@ -2727,18 +2709,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundQueuesOtherConfigBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new QueuesOtherConfigBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((QueuesOtherConfigBuilder) builder).setQueueOtherConfigKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((QueuesOtherConfigBuilder) builder).setQueueOtherConfigValue(value); + QueuesOtherConfig build(final String key, final String value) { + return new QueuesOtherConfigBuilder() + .setQueueOtherConfigKey(key) + .setQueueOtherConfigValue(value) + .build(); } @Override @@ -2749,18 +2724,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundQosExternalIdsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new QosExternalIdsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((QosExternalIdsBuilder) builder).setQosExternalIdKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((QosExternalIdsBuilder) builder).setQosExternalIdValue(value); + QosExternalIds build(final String key, final String value) { + return new QosExternalIdsBuilder() + .setQosExternalIdKey(key) + .setQosExternalIdValue(value) + .build(); } @Override @@ -2771,18 +2739,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundQosOtherConfigBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new QosOtherConfigBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((QosOtherConfigBuilder) builder).setOtherConfigKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((QosOtherConfigBuilder) builder).setOtherConfigValue(value); + QosOtherConfig build(final String key, final String value) { + return new QosOtherConfigBuilder() + .setOtherConfigKey(key) + .setOtherConfigValue(value) + .build(); } @Override @@ -2793,18 +2754,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundPortExternalIdsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new PortExternalIdsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((PortExternalIdsBuilder) builder).setExternalIdKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((PortExternalIdsBuilder) builder).setExternalIdValue(value); + PortExternalIds build(final String key, final String value) { + return new PortExternalIdsBuilder() + .setExternalIdKey(key) + .setExternalIdValue(value) + .build(); } @Override @@ -2815,18 +2769,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundInterfaceExternalIdsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new InterfaceExternalIdsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((InterfaceExternalIdsBuilder) builder).setExternalIdKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((InterfaceExternalIdsBuilder) builder).setExternalIdValue(value); + InterfaceExternalIds build(final String key, final String value) { + return new InterfaceExternalIdsBuilder() + .setExternalIdKey(key) + .setExternalIdValue(value) + .build(); } @Override @@ -2837,18 +2784,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundInterfaceLldpBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new InterfaceLldpBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((InterfaceLldpBuilder) builder).setLldpKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((InterfaceLldpBuilder) builder).setLldpValue(value); + InterfaceLldp build(final String key, final String value) { + return new InterfaceLldpBuilder() + .setLldpKey(key) + .setLldpValue(value) + .build(); } @Override @@ -2859,18 +2799,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundOptionsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new OptionsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((OptionsBuilder) builder).setOption(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((OptionsBuilder) builder).setValue(value); + Options build(final String key, final String value) { + return new OptionsBuilder() + .setOption(key) + .setValue(value) + .build(); } @Override @@ -2881,18 +2814,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundInterfaceOtherConfigsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new InterfaceOtherConfigsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((InterfaceOtherConfigsBuilder) builder).setOtherConfigKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((InterfaceOtherConfigsBuilder) builder).setOtherConfigValue(value); + InterfaceOtherConfigs build(final String key, final String value) { + return new InterfaceOtherConfigsBuilder() + .setOtherConfigKey(key) + .setOtherConfigValue(value) + .build(); } @Override @@ -2903,18 +2829,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundPortOtherConfigsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new PortOtherConfigsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((PortOtherConfigsBuilder) builder).setOtherConfigKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((PortOtherConfigsBuilder) builder).setOtherConfigValue(value); + PortOtherConfigs build(final String key, final String value) { + return new PortOtherConfigsBuilder() + .setOtherConfigKey(key) + .setOtherConfigValue(value) + .build(); } @Override @@ -2925,18 +2844,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundBridgeOtherConfigsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new BridgeOtherConfigsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((BridgeOtherConfigsBuilder) builder).setBridgeOtherConfigKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((BridgeOtherConfigsBuilder) builder).setBridgeOtherConfigValue(value); + BridgeOtherConfigs build(final String key, final String value) { + return new BridgeOtherConfigsBuilder() + .setBridgeOtherConfigKey(key) + .setBridgeOtherConfigValue(value) + .build(); } @Override @@ -2947,18 +2859,11 @@ public class SouthboundIT extends AbstractMdsalTestBase { private static final class SouthboundBridgeExternalIdsBuilder extends KeyValueBuilder { @Override - protected Builder builder() { - return new BridgeExternalIdsBuilder(); - } - - @Override - protected void setKey(final Builder builder, final String key) { - ((BridgeExternalIdsBuilder) builder).setBridgeExternalIdKey(key); - } - - @Override - protected void setValue(final Builder builder, final String value) { - ((BridgeExternalIdsBuilder) builder).setBridgeExternalIdValue(value); + BridgeExternalIds build(final String key, final String value) { + return new BridgeExternalIdsBuilder() + .setBridgeExternalIdKey(key) + .setBridgeExternalIdValue(value) + .build(); } @Override diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index 0018ee164..18b8eb5cb 100644 --- a/southbound/southbound-karaf/pom.xml +++ b/southbound/southbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 9.0.13 + 10.0.0 4.0.0 diff --git a/utils/config/pom.xml b/utils/config/pom.xml index 30bbad5a7..1c01a1118 100644 --- a/utils/config/pom.xml +++ b/utils/config/pom.xml @@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.osgi - osgi.core + org.osgi.framework diff --git a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java index 4b467f0e3..8edc91d23 100644 --- a/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java +++ b/utils/mdsal-utils/src/main/java/org/opendaylight/ovsdb/utils/mdsal/utils/NotifyingDataChangeListener.java @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; * Once an instance is created one must invoke the registerDataChangeListener method * with a DataBroker. */ -public class NotifyingDataChangeListener implements AutoCloseable, DataTreeChangeListener { +public final class NotifyingDataChangeListener implements AutoCloseable, DataTreeChangeListener { private static final Logger LOG = LoggerFactory.getLogger(NotifyingDataChangeListener.class); private static final int RETRY_WAIT = 100; private static final int MDSAL_TIMEOUT_OPERATIONAL = 10000; diff --git a/utils/odl-ovsdb-utils/pom.xml b/utils/odl-ovsdb-utils/pom.xml index 9a5b8a191..b2b1665b4 100644 --- a/utils/odl-ovsdb-utils/pom.xml +++ b/utils/odl-ovsdb-utils/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 9.0.13 + 10.0.0 @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller controller-artifacts - 4.0.10 + 5.0.1 pom import diff --git a/utils/odl-ovsdb-utils/src/main/feature/feature.xml b/utils/odl-ovsdb-utils/src/main/feature/feature.xml index 6a1b9e174..1964d6967 100644 --- a/utils/odl-ovsdb-utils/src/main/feature/feature.xml +++ b/utils/odl-ovsdb-utils/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html --> - odl-mdsal-broker + odl-mdsal-broker diff --git a/utils/ovsdb-it-utils/pom.xml b/utils/ovsdb-it-utils/pom.xml index 1e970cd29..d9cc1076a 100644 --- a/utils/ovsdb-it-utils/pom.xml +++ b/utils/ovsdb-it-utils/pom.xml @@ -42,7 +42,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal.binding.model.ietf - rfc6991 + rfc6991-ietf-inet-types org.opendaylight.mdsal.model @@ -92,7 +92,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.osgi - osgi.core + org.osgi.framework compile diff --git a/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/DockerOvs.java b/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/DockerOvs.java index d524e947e..37ac42db6 100644 --- a/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/DockerOvs.java +++ b/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/DockerOvs.java @@ -5,9 +5,10 @@ * 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.ovsdb.utils.ovsdb.it.utils; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; import static org.ops4j.pax.exam.CoreOptions.propagateSystemProperties; import com.esotericsoftware.yamlbeans.YamlException; @@ -36,7 +37,6 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.concurrent.atomic.AtomicInteger; -import org.junit.Assert; import org.ops4j.pax.exam.Option; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; @@ -95,7 +95,7 @@ import org.slf4j.LoggerFactory; * When DockerOvs does not run docker-compose getOvsdbAddress and getOvsdbPort return the address and port specified in * the system properties. */ -public class DockerOvs implements AutoCloseable { +public final class DockerOvs implements AutoCloseable { private static String ENV_USAGE = "Usage:\n" + "-Ddocker.run - explicitly configure whether or not DockerOvs should run docker-compose\n" + "-Dovsdbserver.ipaddress - specify IP address of ovsdb server - implies -Ddocker.run=false\n" @@ -256,9 +256,9 @@ public class DockerOvs implements AutoCloseable { //At this point we know we're not running docker and the conn type is active - make sure we have what we need //If we have a server address than we require a port too as those //are returned in getOvsdbPort() and getOvsdbAddress() - Assert.assertNotNull("Attempt to connect to previous running ovs but missing -Dovsdbserver.ipaddress\n" + assertNotNull("Attempt to connect to previous running ovs but missing -Dovsdbserver.ipaddress\n" + ENV_USAGE, envServerAddress); - Assert.assertNotNull("Attempt to connect to previous running ovs but missing -Dovsdbserver.port\n" + assertNotNull("Attempt to connect to previous running ovs but missing -Dovsdbserver.port\n" + ENV_USAGE, envServerPort); } @@ -284,7 +284,7 @@ public class DockerOvs implements AutoCloseable { } else if (0 == ProcUtils.tryProcess(null, 5000, psCmd)) { LOG.info("DockerOvs.buildDockerCommands docker-compose requires sudo"); } else { - Assert.fail("docker-compose does not seem to work with or without sudo"); + fail("docker-compose does not seem to work with or without sudo"); } if (0 == ProcUtils.tryProcess(null, 5000, dockerPsCmdNoSudo)) { @@ -294,7 +294,7 @@ public class DockerOvs implements AutoCloseable { } else if (0 == ProcUtils.tryProcess(null, 5000, dockerPsCmd)) { LOG.info("DockerOvs.buildDockerCommands docker requires sudo"); } else { - Assert.fail("docker does not seem to work with or without sudo"); + fail("docker does not seem to work with or without sudo"); } } @@ -603,9 +603,9 @@ public class DockerOvs implements AutoCloseable { */ private File createTempDockerComposeFile(String yamlFileName) { Bundle bundle = FrameworkUtil.getBundle(this.getClass()); - Assert.assertNotNull("DockerOvs: bundle is null", bundle); + assertNotNull("DockerOvs: bundle is null", bundle); URL url = bundle.getResource(envDockerComposeFile); - Assert.assertNotNull("DockerOvs: URL is null", url); + assertNotNull("DockerOvs: URL is null", url); File tmpFile = null; try { @@ -621,7 +621,7 @@ public class DockerOvs implements AutoCloseable { } } catch (IOException e) { - Assert.fail(e.toString()); + fail(e.toString()); } return tmpFile; diff --git a/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/ProcUtils.java b/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/ProcUtils.java index 6de0d0c18..b406146f7 100644 --- a/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/ProcUtils.java +++ b/utils/ovsdb-it-utils/src/main/java/org/opendaylight/ovsdb/utils/ovsdb/it/utils/ProcUtils.java @@ -5,14 +5,14 @@ * 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.ovsdb.utils.ovsdb.it.utils; +import static org.junit.Assert.assertEquals; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; -import org.junit.Assert; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,6 +23,7 @@ public final class ProcUtils { private static final Logger LOG = LoggerFactory.getLogger(ProcUtils.class); private ProcUtils() { + // Hidden on purpose } /** @@ -32,8 +33,7 @@ public final class ProcUtils { * @throws IOException if something goes wrong on the IO end * @throws InterruptedException If this thread is interrupted */ - public static void runProcess(long waitFor, String... words) throws - IOException, InterruptedException { + public static void runProcess(long waitFor, String... words) throws IOException, InterruptedException { runProcess(waitFor, null, words); } @@ -48,7 +48,7 @@ public final class ProcUtils { public static void runProcess(long waitFor, StringBuilder capturedStdout, String... words) throws IOException, InterruptedException { int exitValue = tryProcess(null, waitFor, capturedStdout, words); - Assert.assertEquals("ProcUtils.runProcess exit code is not 0", 0, exitValue); + assertEquals("ProcUtils.runProcess exit code is not 0", 0, exitValue); } public static int runProcess(int reserved, long waitFor, StringBuilder capturedStdout, String... words) @@ -83,8 +83,8 @@ public final class ProcUtils { public static int tryProcess(String logText, long waitFor, StringBuilder capturedStdout, String... words) throws IOException, InterruptedException { - LOG.info("ProcUtils.runProcess {} running \"{}\", waitFor {}", - logText != null ? logText : "", words, waitFor); + final String procName = logText != null ? logText : ""; + LOG.info("ProcUtils.runProcess {} running \"{}\", waitFor {}", procName, words, waitFor); Process proc = new ProcessBuilder(words).start(); int exitValue = -1; @@ -98,8 +98,7 @@ public final class ProcUtils { exitValue = waitForExitValue(waitFor, proc); while (stderr.ready()) { - LOG.warn("ProcUtils.runProcess {} [stderr]: {}", - logText != null ? logText : "", stderr.readLine()); + LOG.warn("ProcUtils.runProcess {} [stderr]: {}", procName, stderr.readLine()); } StringBuilder stdoutStringBuilder = capturedStdout != null ? capturedStdout : new StringBuilder(); @@ -109,8 +108,7 @@ public final class ProcUtils { stdoutStringBuilder.append(buf, 0, read); } - LOG.info("ProcUtils.runProcess {} [stdout]:\n{}", - logText != null ? logText : "", stdoutStringBuilder.toString()); + LOG.info("ProcUtils.runProcess {} [stdout]:\n{}", procName, stdoutStringBuilder.toString()); } return exitValue; diff --git a/utils/pom.xml b/utils/pom.xml index 6b5774d2a..0daef929b 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 9.0.13 + 10.0.0 diff --git a/utils/servicehelper/pom.xml b/utils/servicehelper/pom.xml index 094b37a07..fd516e605 100644 --- a/utils/servicehelper/pom.xml +++ b/utils/servicehelper/pom.xml @@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.osgi - osgi.core + org.osgi.framework org.slf4j -- 2.36.6