From 3ddd10c94bcca2debc5e4a92676c925973d16531 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 12 Feb 2024 00:46:37 +0100 Subject: [PATCH 1/2] WIP: Bump upstreams Adopt: - yangtools-13.0.1 - mdsal-13.0.0 - controller-9.0.0 - aaa-0.19.1 - netconf-7.0.0-SNAPSHOT Change-Id: Ib107ffb24768c9192caf8024c48ecf9f671c947d Signed-off-by: Robert Varga --- commons/parent/pom.xml | 4 +- .../odl-lispflowmapping-inmemorydb/pom.xml | 2 +- .../src/main/feature/feature.xml | 2 +- .../pom.xml | 2 +- .../src/main/feature/feature.xml | 2 +- features/odl-lispflowmapping-models/pom.xml | 2 +- .../src/main/feature/feature.xml | 2 +- .../odl-lispflowmapping-southbound/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- integrationtest/pom.xml | 2 +- mappingservice/api/pom.xml | 2 +- .../dsbackend/DataStoreBackEnd.java | 85 ++++++++++++------- .../dsbackend/DataStoreBackEndTest.java | 8 +- mappingservice/implementation/pom.xml | 4 +- .../implementation/LispMappingService.java | 60 ++++++------- .../implementation/lisp/MapServer.java | 52 ++++++------ .../mdsal/AbstractDataListener.java | 26 +++--- .../mdsal/AuthenticationKeyDataListener.java | 30 +++---- .../mdsal/MappingDataListener.java | 37 ++++---- .../LispMappingServiceTest.java | 6 +- .../AuthenticationKeyDataListenerTest.java | 24 +++--- .../mdsal/MappingDataListenerTest.java | 30 +++---- mappingservice/lisp-proto/pom.xml | 2 +- mappingservice/pom.xml | 2 +- mappingservice/southbound/pom.xml | 4 +- .../southbound/LispSouthboundPlugin.java | 16 ++-- .../southbound/LispSouthboundRPC.java | 48 +++++++---- .../lisp/AuthenticationKeyDataListener.java | 46 +++++----- .../southbound/LispSouthboundPluginTest.java | 2 +- .../AuthenticationKeyDataListenerTest.java | 27 +++--- 30 files changed, 281 insertions(+), 256 deletions(-) diff --git a/commons/parent/pom.xml b/commons/parent/pom.xml index b3e267f0..700172b9 100644 --- a/commons/parent/pom.xml +++ b/commons/parent/pom.xml @@ -45,14 +45,14 @@ org.opendaylight.mdsal mdsal-artifacts - 12.0.4 + 13.0.0 pom import org.opendaylight.controller controller-artifacts - 8.0.4 + 9.0.0 pom import diff --git a/features/odl-lispflowmapping-inmemorydb/pom.xml b/features/odl-lispflowmapping-inmemorydb/pom.xml index 031411a5..ee89eb51 100644 --- a/features/odl-lispflowmapping-inmemorydb/pom.xml +++ b/features/odl-lispflowmapping-inmemorydb/pom.xml @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller controller-artifacts - 8.0.4 + 9.0.0 pom import diff --git a/features/odl-lispflowmapping-inmemorydb/src/main/feature/feature.xml b/features/odl-lispflowmapping-inmemorydb/src/main/feature/feature.xml index d7919371..6de7bc5f 100644 --- a/features/odl-lispflowmapping-inmemorydb/src/main/feature/feature.xml +++ b/features/odl-lispflowmapping-inmemorydb/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL --> - odl-mdsal-broker + odl-mdsal-broker diff --git a/features/odl-lispflowmapping-mappingservice/pom.xml b/features/odl-lispflowmapping-mappingservice/pom.xml index b3ada593..a4ff0c27 100644 --- a/features/odl-lispflowmapping-mappingservice/pom.xml +++ b/features/odl-lispflowmapping-mappingservice/pom.xml @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 6.0.6 + 7.0.0-SNAPSHOT import pom diff --git a/features/odl-lispflowmapping-mappingservice/src/main/feature/feature.xml b/features/odl-lispflowmapping-mappingservice/src/main/feature/feature.xml index a323182c..2ae6a076 100644 --- a/features/odl-lispflowmapping-mappingservice/src/main/feature/feature.xml +++ b/features/odl-lispflowmapping-mappingservice/src/main/feature/feature.xml @@ -8,6 +8,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL --> - odl-restconf + odl-restconf diff --git a/features/odl-lispflowmapping-models/pom.xml b/features/odl-lispflowmapping-models/pom.xml index 5fd5d803..d73bc7c9 100644 --- a/features/odl-lispflowmapping-models/pom.xml +++ b/features/odl-lispflowmapping-models/pom.xml @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 12.0.4 + 13.0.0 pom import diff --git a/features/odl-lispflowmapping-models/src/main/feature/feature.xml b/features/odl-lispflowmapping-models/src/main/feature/feature.xml index 844fd908..1e00b109 100644 --- a/features/odl-lispflowmapping-models/src/main/feature/feature.xml +++ b/features/odl-lispflowmapping-models/src/main/feature/feature.xml @@ -9,6 +9,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL odl-apache-commons-lang3 - odl-mdsal-model-rfc6991 + odl-mdsal-model-rfc6991 diff --git a/features/odl-lispflowmapping-southbound/pom.xml b/features/odl-lispflowmapping-southbound/pom.xml index 1a488c9d..a4bdfc5f 100644 --- a/features/odl-lispflowmapping-southbound/pom.xml +++ b/features/odl-lispflowmapping-southbound/pom.xml @@ -29,14 +29,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller controller-artifacts - 8.0.4 + 9.0.0 import pom org.opendaylight.netconf netconf-artifacts - 6.0.6 + 7.0.0-SNAPSHOT import pom diff --git a/features/odl-lispflowmapping-southbound/src/main/feature/feature.xml b/features/odl-lispflowmapping-southbound/src/main/feature/feature.xml index c436cecc..75a9f145 100644 --- a/features/odl-lispflowmapping-southbound/src/main/feature/feature.xml +++ b/features/odl-lispflowmapping-southbound/src/main/feature/feature.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL odl-netty-4 - odl-mdsal-broker - odl-restconf + odl-mdsal-broker + odl-restconf diff --git a/integrationtest/pom.xml b/integrationtest/pom.xml index 384f185e..110b90c9 100644 --- a/integrationtest/pom.xml +++ b/integrationtest/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller mdsal-it-parent - 8.0.4 + 9.0.0 diff --git a/mappingservice/api/pom.xml b/mappingservice/api/pom.xml index b4256370..3a696d57 100644 --- a/mappingservice/api/pom.xml +++ b/mappingservice/api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.mdsal binding-parent - 12.0.4 + 13.0.0 diff --git a/mappingservice/dsbackend/src/main/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEnd.java b/mappingservice/dsbackend/src/main/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEnd.java index 93375c4c..1540a1b2 100644 --- a/mappingservice/dsbackend/src/main/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEnd.java +++ b/mappingservice/dsbackend/src/main/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEnd.java @@ -9,6 +9,7 @@ package org.opendaylight.lispflowmapping.dsbackend; import static java.util.Objects.requireNonNull; +import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; @@ -21,9 +22,7 @@ import java.util.concurrent.ExecutionException; import org.opendaylight.lispflowmapping.lisp.util.LispAddressStringifier; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.ReadTransaction; -import org.opendaylight.mdsal.binding.api.Transaction; import org.opendaylight.mdsal.binding.api.TransactionChain; -import org.opendaylight.mdsal.binding.api.TransactionChainListener; import org.opendaylight.mdsal.binding.api.WriteTransaction; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; @@ -37,6 +36,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev15090 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.LastUpdatedBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.VirtualNetworkIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.common.Empty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; * * @author Lorand Jakab */ -public class DataStoreBackEnd implements TransactionChainListener { +public class DataStoreBackEnd { private static final Logger LOG = LoggerFactory.getLogger(DataStoreBackEnd.class); private static final InstanceIdentifier DATABASE_ROOT = InstanceIdentifier.create(MappingDatabase.class); @@ -56,13 +56,35 @@ public class DataStoreBackEnd implements TransactionChainListener { private final TransactionChain operTxChain; @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Non-final for mocking") - public DataStoreBackEnd(DataBroker broker) { + public DataStoreBackEnd(final DataBroker broker) { LOG.debug("Creating DataStoreBackEnd transaction chain..."); - configTxChain = broker.createMergingTransactionChain(this); - operTxChain = broker.createMergingTransactionChain(this); + configTxChain = broker.createMergingTransactionChain(); + operTxChain = broker.createMergingTransactionChain(); + configTxChain.addCallback(new FutureCallback() { + @Override + public void onSuccess(final Empty result) { + onTransactionChainSuccessful(configTxChain); + } + + @Override + public void onFailure(final Throwable cause) { + onTransactionChainFailed(configTxChain, cause); + } + }); + operTxChain.addCallback(new FutureCallback() { + @Override + public void onSuccess(final Empty result) { + onTransactionChainSuccessful(operTxChain); + } + + @Override + public void onFailure(final Throwable cause) { + onTransactionChainFailed(operTxChain, cause); + } + }); } - public void addAuthenticationKey(AuthenticationKey authenticationKey) { + public void addAuthenticationKey(final AuthenticationKey authenticationKey) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Adding authentication key '{}' for {}", authenticationKey.getMappingAuthkey().getKeyString(), @@ -75,7 +97,7 @@ public class DataStoreBackEnd implements TransactionChainListener { "Adding authentication key to MD-SAL datastore failed"); } - public void addMapping(Mapping mapping) { + public void addMapping(final Mapping mapping) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Adding mapping for {}", LispAddressStringifier.getString(mapping.getMappingRecord().getEid())); @@ -88,7 +110,7 @@ public class DataStoreBackEnd implements TransactionChainListener { } // This method assumes that it is only called for southbound originated Map-Registers - public void addXtrIdMapping(XtrIdMapping mapping) { + public void addXtrIdMapping(final XtrIdMapping mapping) { XtrId xtrId = mapping.getMappingRecord().getXtrId(); requireNonNull(xtrId, "Make sure you only call addXtrIdMapping when the MappingRecord contains an xTR-ID"); if (LOG.isDebugEnabled()) { @@ -102,7 +124,7 @@ public class DataStoreBackEnd implements TransactionChainListener { "Adding xTR-ID mapping to MD-SAL datastore failed"); } - public void removeAuthenticationKey(AuthenticationKey authenticationKey) { + public void removeAuthenticationKey(final AuthenticationKey authenticationKey) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Removing authentication key for {}", LispAddressStringifier.getString(authenticationKey.getEid())); @@ -114,7 +136,7 @@ public class DataStoreBackEnd implements TransactionChainListener { "Deleting authentication key from MD-SAL datastore failed"); } - public void removeMapping(Mapping mapping) { + public void removeMapping(final Mapping mapping) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Removing mapping for {}", LispAddressStringifier.getString(mapping.getMappingRecord().getEid())); @@ -125,7 +147,7 @@ public class DataStoreBackEnd implements TransactionChainListener { deleteTransaction(path, getDestinationDatastore(mapping), "Deleting mapping from MD-SAL datastore failed"); } - public void removeXtrIdMapping(XtrIdMapping mapping) { + public void removeXtrIdMapping(final XtrIdMapping mapping) { XtrId xtrId = mapping.getMappingRecord().getXtrId(); requireNonNull(xtrId, "Make sure you only call addXtrIdMapping when the MappingRecord contains an xTR-ID"); if (LOG.isDebugEnabled()) { @@ -155,7 +177,7 @@ public class DataStoreBackEnd implements TransactionChainListener { "Removal of all database content in operational datastore failed"); } - public void updateAuthenticationKey(AuthenticationKey authenticationKey) { + public void updateAuthenticationKey(final AuthenticationKey authenticationKey) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Updating authentication key for {} with '{}'", LispAddressStringifier.getString(authenticationKey.getEid()), @@ -168,7 +190,7 @@ public class DataStoreBackEnd implements TransactionChainListener { "Updating authentication key in MD-SAL datastore failed"); } - public void updateMapping(Mapping mapping) { + public void updateMapping(final Mapping mapping) { if (LOG.isDebugEnabled()) { LOG.debug("MD-SAL: Updating mapping for {}", LispAddressStringifier.getString(mapping.getMappingRecord().getEid())); @@ -186,7 +208,7 @@ public class DataStoreBackEnd implements TransactionChainListener { return mappings; } - public List getAllMappings(LogicalDatastoreType logicalDataStore) { + public List getAllMappings(final LogicalDatastoreType logicalDataStore) { LOG.debug("MD-SAL: Get all mappings from {} datastore", logicalDataStore == LogicalDatastoreType.CONFIGURATION ? "config" : "operational"); List mappings = new ArrayList<>(); @@ -223,7 +245,7 @@ public class DataStoreBackEnd implements TransactionChainListener { public void saveLastUpdateTimestamp() { Long timestamp = System.currentTimeMillis(); - LOG.debug("MD-SAL: Saving last update timestamp to operational datastore: {}", new Date(timestamp).toString()); + LOG.debug("MD-SAL: Saving last update timestamp to operational datastore: {}", new Date(timestamp)); writePutTransaction(LAST_UPDATED, new LastUpdatedBuilder().setLastUpdated(timestamp).build(), LogicalDatastoreType.OPERATIONAL, "Couldn't save last update timestamp to operational datastore"); } @@ -247,12 +269,12 @@ public class DataStoreBackEnd implements TransactionChainListener { } } - private static LogicalDatastoreType getDestinationDatastore(Mapping mapping) { + private static LogicalDatastoreType getDestinationDatastore(final Mapping mapping) { return mapping.getOrigin().equals(MappingOrigin.Southbound) ? LogicalDatastoreType.OPERATIONAL : LogicalDatastoreType.CONFIGURATION; } - private TransactionChain getChain(LogicalDatastoreType logicalDatastoreType) { + private TransactionChain getChain(final LogicalDatastoreType logicalDatastoreType) { return switch (logicalDatastoreType) { case CONFIGURATION -> configTxChain; case OPERATIONAL -> operTxChain; @@ -260,25 +282,26 @@ public class DataStoreBackEnd implements TransactionChainListener { } private void writePutTransaction( - InstanceIdentifier addIID, U data, LogicalDatastoreType logicalDatastoreType, String errMsg) { + final InstanceIdentifier addIID, final U data, final LogicalDatastoreType logicalDatastoreType, + final String errMsg) { WriteTransaction writeTx = getChain(logicalDatastoreType).newWriteOnlyTransaction(); // TODO: is is a utility method, hence we do not have enough lifecycle knowledge to use plain put() writeTx.mergeParentStructurePut(logicalDatastoreType, addIID, data); writeTx.commit().addCallback(new FutureCallback() { @Override - public void onSuccess(CommitInfo result) { + public void onSuccess(final CommitInfo result) { } @Override - public void onFailure(Throwable throwable) { + public void onFailure(final Throwable throwable) { LOG.error("Transaction failed:", throwable); } }, MoreExecutors.directExecutor()); } private U readTransaction( - InstanceIdentifier readIID, LogicalDatastoreType logicalDatastoreType) { + final InstanceIdentifier readIID, final LogicalDatastoreType logicalDatastoreType) { final ListenableFuture> readFuture; try (ReadTransaction readTx = getChain(logicalDatastoreType).newReadOnlyTransaction()) { readFuture = readTx.read(logicalDatastoreType, readIID); @@ -297,29 +320,29 @@ public class DataStoreBackEnd implements TransactionChainListener { } private void deleteTransaction( - InstanceIdentifier deleteIID, LogicalDatastoreType logicalDatastoreType, String errMsg) { + final InstanceIdentifier deleteIID, final LogicalDatastoreType logicalDatastoreType, + final String errMsg) { WriteTransaction writeTx = getChain(logicalDatastoreType).newWriteOnlyTransaction(); writeTx.delete(logicalDatastoreType, deleteIID); writeTx.commit().addCallback(new FutureCallback() { @Override - public void onSuccess(CommitInfo result) { + public void onSuccess(final CommitInfo result) { } @Override - public void onFailure(Throwable throwable) { + public void onFailure(final Throwable throwable) { LOG.error("Transaction failed:", throwable); } }, MoreExecutors.directExecutor()); } - @Override - public void onTransactionChainFailed(TransactionChain chain, Transaction transaction, Throwable cause) { - LOG.error("Broken chain {} in DataStoreBackEnd, transaction {}, cause {}", chain, transaction.getIdentifier(), - cause.getMessage()); + @VisibleForTesting + void onTransactionChainFailed(final TransactionChain chain, final Throwable cause) { + LOG.error("Broken chain {} in DataStoreBackEnd, cause {}", chain, cause.getMessage()); } - @Override - public void onTransactionChainSuccessful(TransactionChain chain) { + @VisibleForTesting + void onTransactionChainSuccessful(final TransactionChain chain) { LOG.info("DataStoreBackEnd closed successfully, chain {}", chain); } diff --git a/mappingservice/dsbackend/src/test/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEndTest.java b/mappingservice/dsbackend/src/test/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEndTest.java index 4a1e71fe..69b9a430 100644 --- a/mappingservice/dsbackend/src/test/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEndTest.java +++ b/mappingservice/dsbackend/src/test/java/org/opendaylight/lispflowmapping/dsbackend/DataStoreBackEndTest.java @@ -27,7 +27,6 @@ import org.opendaylight.lispflowmapping.lisp.util.LispAddressStringifier; import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.ReadTransaction; -import org.opendaylight.mdsal.binding.api.Transaction; import org.opendaylight.mdsal.binding.api.TransactionChain; import org.opendaylight.mdsal.binding.api.WriteTransaction; import org.opendaylight.mdsal.common.api.CommitInfo; @@ -100,7 +99,7 @@ public class DataStoreBackEndTest { PowerMockito.when(LoggerFactory.getLogger(DataStoreBackEnd.class)) .thenReturn(logMock); Mockito.when(logMock.isDebugEnabled()).thenReturn(true); - Mockito.when(brokerMock.createMergingTransactionChain(Mockito.any(DataStoreBackEnd.class))) + Mockito.when(brokerMock.createMergingTransactionChain()) .thenReturn(txChainMock); dataStoreBackEnd = PowerMockito.spy(new DataStoreBackEnd(brokerMock)); @@ -306,10 +305,7 @@ public class DataStoreBackEndTest { */ @Test public void onTransactionChainFailedTest() { - Transaction asyncTransactionMock = Mockito.mock(Transaction.class); - Mockito.when(asyncTransactionMock.getIdentifier()).thenReturn(new Object()); - dataStoreBackEnd.onTransactionChainFailed(Mockito.mock(TransactionChain.class), asyncTransactionMock, - Mockito.mock(Throwable.class)); + dataStoreBackEnd.onTransactionChainFailed(Mockito.mock(TransactionChain.class), Mockito.mock(Throwable.class)); } /** diff --git a/mappingservice/implementation/pom.xml b/mappingservice/implementation/pom.xml index 55bc216f..2692504c 100644 --- a/mappingservice/implementation/pom.xml +++ b/mappingservice/implementation/pom.xml @@ -84,11 +84,11 @@ org.opendaylight.mdsal - mdsal-singleton-common-api + mdsal-singleton-api org.opendaylight.mdsal - mdsal-singleton-dom-impl + mdsal-singleton-impl diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java index bec9825f..5937f4f6 100644 --- a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java +++ b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java @@ -31,9 +31,9 @@ import org.opendaylight.lispflowmapping.lisp.type.LispMessage; import org.opendaylight.lispflowmapping.lisp.util.LispAddressStringifier; import org.opendaylight.mdsal.binding.api.NotificationService; import org.opendaylight.mdsal.binding.api.RpcProviderService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider; -import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonService; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider; +import org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.AddMapping; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.GotMapNotify; @@ -75,17 +75,17 @@ import org.slf4j.LoggerFactory; public class LispMappingService implements IFlowMapping, IMapRequestResultHandler, IMapNotifyHandler, OdlLispProtoListener, AutoCloseable, ClusterSingletonService { private static final String LISPFLOWMAPPING_ENTITY_NAME = "lispflowmapping"; - private static final ServiceGroupIdentifier SERVICE_GROUP_IDENTIFIER = ServiceGroupIdentifier.create( - LISPFLOWMAPPING_ENTITY_NAME); + private static final ServiceGroupIdentifier SERVICE_GROUP_IDENTIFIER = + new ServiceGroupIdentifier(LISPFLOWMAPPING_ENTITY_NAME); private static final Logger LOG = LoggerFactory.getLogger(LispMappingService.class); private volatile boolean smr = ConfigIni.getInstance().smrIsSet(); private volatile String elpPolicy = ConfigIni.getInstance().getElpPolicy(); - private ThreadLocal tlsMapReply = new ThreadLocal<>(); - private ThreadLocal>> tlsMapNotify = new ThreadLocal<>(); - private ThreadLocal> tlsMapRequest = new ThreadLocal<>(); + private final ThreadLocal tlsMapReply = new ThreadLocal<>(); + private final ThreadLocal>> tlsMapNotify = new ThreadLocal<>(); + private final ThreadLocal> tlsMapRequest = new ThreadLocal<>(); private IMapResolverAsync mapResolver; private IMapServerAsync mapServer; @@ -105,8 +105,8 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle @Reference final ClusterSingletonServiceProvider clusterSingletonService, @Reference final RpcProviderService rpcProviderService, @Reference final NotificationService notificationService) { - this.mapService = mappingService; - this.lispSB = odlLispService; + mapService = mappingService; + lispSB = odlLispService; this.clusterSingletonService = clusterSingletonService; this.rpcProviderService = rpcProviderService; this.notificationService = notificationService; @@ -123,12 +123,12 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } public boolean shouldUseSmr() { - return this.smr; + return smr; } @Override - public void setShouldUseSmr(boolean shouldUseSmr) { - this.smr = shouldUseSmr; + public void setShouldUseSmr(final boolean shouldUseSmr) { + smr = shouldUseSmr; if (mapServer != null) { mapServer.setSubscriptionService(shouldUseSmr); } @@ -139,11 +139,11 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } public NotificationService getNotificationService() { - return this.notificationService; + return notificationService; } @Override - public MapReply handleMapRequest(MapRequest request) { + public MapReply handleMapRequest(final MapRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("LISP: Retrieving mapping for {}", LispAddressStringifier.getString(request.getEidItem().get(0).getEid())); @@ -165,7 +165,7 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public Pair> handleMapRegister(MapRegister mapRegister) { + public Pair> handleMapRegister(final MapRegister mapRegister) { if (LOG.isDebugEnabled()) { LOG.debug("LISP: Adding mapping for {}", LispAddressStringifier.getString(mapRegister.getMappingRecordItem().get(0) @@ -178,11 +178,11 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle return tlsMapNotify.get(); } - public void setShouldAuthenticate(boolean shouldAuthenticate) { - this.mapResolver.setShouldAuthenticate(shouldAuthenticate); + public void setShouldAuthenticate(final boolean shouldAuthenticate) { + mapResolver.setShouldAuthenticate(shouldAuthenticate); } - private void sendMapNotify(MapNotify mapNotify, TransportAddress address) { + private void sendMapNotify(final MapNotify mapNotify, final TransportAddress address) { SendMapNotifyInputBuilder smnib = new SendMapNotifyInputBuilder(); smnib.setMapNotify(new MapNotifyBuilder(mapNotify).build()); smnib.setTransportAddress(address); @@ -190,7 +190,7 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public void onAddMapping(AddMapping mapRegisterNotification) { + public void onAddMapping(final AddMapping mapRegisterNotification) { Pair> result = handleMapRegister(mapRegisterNotification.getMapRegister()); if (result != null && result.getLeft() != null) { MapNotify mapNotify = result.getLeft(); @@ -211,7 +211,7 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public void onRequestMapping(RequestMapping mapRequestNotification) { + public void onRequestMapping(final RequestMapping mapRequestNotification) { MapReply mapReply = handleMapRequest(mapRequestNotification.getMapRequest()); if (mapReply != null) { SendMapReplyInputBuilder smrib = new SendMapReplyInputBuilder(); @@ -224,27 +224,27 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public void onGotMapReply(GotMapReply notification) { + public void onGotMapReply(final GotMapReply notification) { LOG.debug("Received GotMapReply notification, ignoring"); } @Override - public void onGotMapNotify(GotMapNotify notification) { + public void onGotMapNotify(final GotMapNotify notification) { LOG.debug("Received GotMapNotify notification, ignoring"); } @Override - public void onXtrRequestMapping(XtrRequestMapping notification) { + public void onXtrRequestMapping(final XtrRequestMapping notification) { LOG.debug("Received XtrRequestMapping notification, ignoring"); } @Override - public void onXtrReplyMapping(XtrReplyMapping notification) { + public void onXtrReplyMapping(final XtrReplyMapping notification) { LOG.debug("Received XtrReplyMapping notification, ignoring"); } @Override - public void onMappingKeepAlive(MappingKeepAlive notification) { + public void onMappingKeepAlive(final MappingKeepAlive notification) { final MapRegisterCacheMetadata cacheMetadata = notification.getMapRegisterCacheMetadata(); for (EidLispAddress eidLispAddress : cacheMetadata.nonnullEidLispAddress().values()) { final Eid eid = eidLispAddress.getEid(); @@ -261,17 +261,17 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public void handleMapReply(MapReply reply) { + public void handleMapReply(final MapReply reply) { tlsMapReply.set(reply); } @Override - public void handleMapNotify(MapNotify notify, List rlocs) { + public void handleMapNotify(final MapNotify notify, final List rlocs) { tlsMapNotify.set(new MutablePair<>(notify, rlocs)); } @Override - public void handleSMR(MapRequest smrMapRequest, Rloc subscriber) { + public void handleSMR(final MapRequest smrMapRequest, final Rloc subscriber) { if (LOG.isDebugEnabled()) { LOG.debug("Sending SMR Map-Request to {} with Source-EID {} and EID Record {} (reversed)", LispAddressStringifier.getString(subscriber), @@ -286,7 +286,7 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle } @Override - public void handleNonProxyMapRequest(MapRequest mapRequest, TransportAddress transportAddress) { + public void handleNonProxyMapRequest(final MapRequest mapRequest, final TransportAddress transportAddress) { tlsMapRequest.set(new MutablePair<>(mapRequest, transportAddress)); } diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java index 1735e73c..4ea03e72 100644 --- a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java +++ b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java @@ -76,7 +76,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.tr import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingChanged; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.MappingOrigin; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.OdlMappingserviceListener; -import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -88,11 +88,11 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS private boolean subscriptionService; private final IMapNotifyHandler notifyHandler; private final NotificationService notificationService; - private ListenerRegistration mapServerListenerRegistration; + private Registration mapServerListenerRegistration; private final SmrScheduler scheduler; - public MapServer(IMappingService mapService, boolean subscriptionService, - IMapNotifyHandler notifyHandler, NotificationService notificationService) { + public MapServer(final IMappingService mapService, final boolean subscriptionService, + final IMapNotifyHandler notifyHandler, final NotificationService notificationService) { this.mapService = requireNonNull(mapService); this.subscriptionService = subscriptionService; this.notifyHandler = notifyHandler; @@ -104,13 +104,13 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS } @Override - public void setSubscriptionService(boolean subscriptionService) { + public void setSubscriptionService(final boolean subscriptionService) { this.subscriptionService = subscriptionService; } @Override @SuppressWarnings("unchecked") - public void handleMapRegister(MapRegister mapRegister) { + public void handleMapRegister(final MapRegister mapRegister) { boolean mappingUpdated = false; boolean merge = ConfigIni.getInstance().mappingMergeIsSet() && mapRegister.getMergeEnabled(); MappingRecord oldMapping; @@ -183,7 +183,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS } } - private static List getTransportAddresses(Set addresses) { + private static List getTransportAddresses(final Set addresses) { List rlocs = new ArrayList<>(); for (IpAddressBinary address : addresses) { TransportAddressBuilder tab = new TransportAddressBuilder(); @@ -194,16 +194,16 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS return rlocs; } - private static SiteId getSiteId(MapRegister mapRegister) { + private static SiteId getSiteId(final MapRegister mapRegister) { return mapRegister.getSiteId() != null ? new SiteId(mapRegister.getSiteId()) : null; } - private static MappingRecord getMappingRecord(MappingData mappingData) { + private static MappingRecord getMappingRecord(final MappingData mappingData) { return mappingData != null ? mappingData.getRecord() : null; } @Override - public void onMappingChanged(MappingChanged notification) { + public void onMappingChanged(final MappingChanged notification) { if (subscriptionService) { Eid eid = notification.getEid(); if (eid == null) { @@ -225,7 +225,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS } } - private void handleSmr(Eid eid, Set subscribers) { + private void handleSmr(final Eid eid, final Set subscribers) { sendSmrs(eid, subscribers); // For SrcDst LCAF also send SMRs to Dst prefix @@ -236,7 +236,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS } } - private void sendSmrs(Eid eid, Set subscribers) { + private void sendSmrs(final Eid eid, final Set subscribers) { if (subscribers == null) { return; } @@ -273,7 +273,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS } @Override - public void onSmrInvokedReceived(SmrEvent event) { + public void onSmrInvokedReceived(final SmrEvent event) { scheduler.smrReceived(event); } @@ -289,7 +289,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(cpuCores * 2, threadFactory); private final Map>> eidFutureMap = new ConcurrentHashMap<>(); - void scheduleSmrs(MapRequestBuilder mrb, Iterator subscribers) { + void scheduleSmrs(final MapRequestBuilder mrb, final Iterator subscribers) { final Eid srcEid = fixSrcEidMask(mrb.getSourceEid().getEid()); cancelExistingFuturesForEid(srcEid); @@ -315,7 +315,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS eidFutureMap.put(srcEid, subscriberFutureMap); } - void smrReceived(SmrEvent event) { + void smrReceived(final SmrEvent event) { final List subscriberList = event.getSubscriberList(); for (Subscriber subscriber : subscriberList) { if (LOG.isTraceEnabled()) { @@ -346,22 +346,18 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS if (subscriberFutureMap.isEmpty()) { eidFutureMap.remove(event.getEid()); } - } else { - if (LOG.isTraceEnabled()) { - LOG.trace("No outstanding SMR tasks for EID {}", - LispAddressStringifier.getString(event.getEid())); - } + } else if (LOG.isTraceEnabled()) { + LOG.trace("No outstanding SMR tasks for EID {}", + LispAddressStringifier.getString(event.getEid())); } } } - private void cancelExistingFuturesForEid(Eid eid) { + private void cancelExistingFuturesForEid(final Eid eid) { synchronized (eidFutureMap) { if (eidFutureMap.containsKey(eid)) { final Map> subscriberFutureMap = eidFutureMap.get(eid); - Iterator oldSubscribers = subscriberFutureMap.keySet().iterator(); - while (oldSubscribers.hasNext()) { - Subscriber subscriber = oldSubscribers.next(); + for (Subscriber subscriber : subscriberFutureMap.keySet()) { ScheduledFuture subscriberFuture = subscriberFutureMap.get(subscriber); subscriberFuture.cancel(true); } @@ -378,7 +374,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS * * Since we store all prefixes as binary internally, we only care about and fix those address types. */ - private Eid fixSrcEidMask(Eid eid) { + private Eid fixSrcEidMask(final Eid eid) { Address address = eid.getAddress(); if (address instanceof Ipv4PrefixBinary) { return new EidBuilder(eid).setAddress(new Ipv4PrefixBinaryBuilder((Ipv4PrefixBinary) address) @@ -395,7 +391,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS private final Subscriber subscriber; private int executionCount = 1; - CancellableRunnable(MapRequestBuilder mrb, Subscriber subscriber) { + CancellableRunnable(final MapRequestBuilder mrb, final Subscriber subscriber) { this.mrb = mrb; this.subscriber = subscriber; } @@ -411,7 +407,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS // a given mapping. if (executionCount <= ConfigIni.getInstance().getSmrRetryCount()) { synchronized (mrb) { - mrb.setEidItem(new ArrayList()); + mrb.setEidItem(new ArrayList<>()); mrb.getEidItem().add(new EidItemBuilder() .setEidItemId(LispAddressStringifier.getString(subscriber.getSrcEid())) .setEid(subscriber.getSrcEid()).build()); @@ -437,7 +433,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener, IS executionCount++; } - private void cancelAndRemove(Subscriber sub, Eid eid) { + private void cancelAndRemove(final Subscriber sub, final Eid eid) { final Map> subscriberFutureMap = eidFutureMap.get(eid); if (subscriberFutureMap == null) { LOG.warn("Couldn't find subscriber {} in SMR scheduler internal list", sub); diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java index 40ba2704..a4e2e75e 100644 --- a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java +++ b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java @@ -7,11 +7,11 @@ */ package org.opendaylight.lispflowmapping.implementation.mdsal; -import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataBroker; +import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -19,20 +19,17 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; * The superclass for the different MD-SAL data change event listeners. * */ -public abstract class AbstractDataListener implements ClusteredDataTreeChangeListener { +public abstract class AbstractDataListener implements DataTreeChangeListener { private DataBroker broker; private InstanceIdentifier path; - private ListenerRegistration> configRegistration; - private ListenerRegistration> operRegistration; + private Registration configRegistration; + private Registration operRegistration; void registerDataChangeListener() { - final DataTreeIdentifier configDataTreeIdentifier = DataTreeIdentifier.create( - LogicalDatastoreType.CONFIGURATION, path); - final DataTreeIdentifier operDataTreeIdentifier = DataTreeIdentifier.create( - LogicalDatastoreType.OPERATIONAL, path); - - configRegistration = broker.registerDataTreeChangeListener(configDataTreeIdentifier, this); - operRegistration = broker.registerDataTreeChangeListener(operDataTreeIdentifier, this); + configRegistration = broker.registerTreeChangeListener( + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, path), this); + operRegistration = broker.registerTreeChangeListener( + DataTreeIdentifier.of(LogicalDatastoreType.OPERATIONAL, path), this); } public void closeDataChangeListener() { @@ -40,12 +37,11 @@ public abstract class AbstractDataListener implements Clus operRegistration.close(); } - void setBroker(DataBroker broker) { + void setBroker(final DataBroker broker) { this.broker = broker; } - void setPath(InstanceIdentifier path) { + void setPath(final InstanceIdentifier path) { this.path = path; } - } diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java index 17a8c21e..e5f8e98c 100644 --- a/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java +++ b/mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListener.java @@ -7,7 +7,7 @@ */ package org.opendaylight.lispflowmapping.implementation.mdsal; -import java.util.Collection; +import java.util.List; import org.opendaylight.lispflowmapping.interfaces.mapcache.IMappingSystem; import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil; import org.opendaylight.mdsal.binding.api.DataBroker; @@ -33,7 +33,7 @@ public class AuthenticationKeyDataListener extends AbstractDataListener> changes) { + public void onDataTreeChanged(final List> changes) { for (DataTreeModification change : changes) { final DataObjectModification mod = change.getRootNode(); - if (ModificationType.DELETE == mod.getModificationType()) { - final AuthenticationKey authKey = mod.getDataBefore(); + if (ModificationType.DELETE == mod.modificationType()) { + final AuthenticationKey authKey = mod.dataBefore(); LOG.trace("Received deleted data"); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", authKey); final AuthenticationKey convertedAuthKey = convertToBinaryIfNecessary(authKey); mapSystem.removeAuthenticationKey(convertedAuthKey.getEid()); - } else if (ModificationType.WRITE == mod.getModificationType() || ModificationType.SUBTREE_MODIFIED == mod - .getModificationType()) { - if (ModificationType.WRITE == mod.getModificationType()) { + } else if (ModificationType.WRITE == mod.modificationType() + || ModificationType.SUBTREE_MODIFIED == mod.modificationType()) { + if (ModificationType.WRITE == mod.modificationType()) { LOG.trace("Received created data"); } else { LOG.trace("Received updated data"); } // Process newly created or updated authentication keys - final AuthenticationKey authKey = mod.getDataAfter(); + final AuthenticationKey authKey = mod.dataAfter(); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", authKey); final AuthenticationKey convertedAuthKey = convertToBinaryIfNecessary(authKey); mapSystem.addAuthenticationKey(convertedAuthKey.getEid(), convertedAuthKey.getMappingAuthkey()); } else { - LOG.warn("Ignoring unhandled modification type {}", mod.getModificationType()); + LOG.warn("Ignoring unhandled modification type {}", mod.modificationType()); } } } - private static AuthenticationKey convertToBinaryIfNecessary(AuthenticationKey authKey) { + private static AuthenticationKey convertToBinaryIfNecessary(final AuthenticationKey authKey) { Eid originalEid = authKey.getEid(); if (LispAddressUtil.addressNeedsConversionToBinary(originalEid.getAddress())) { AuthenticationKeyBuilder akb = new AuthenticationKeyBuilder(authKey); @@ -89,7 +89,7 @@ public class AuthenticationKeyDataListener extends AbstractDataListener { private NotificationPublishService notificationPublishService; private final boolean isMaster = false; - public MappingDataListener(DataBroker broker, IMappingSystem msmr, NotificationPublishService nps) { + public MappingDataListener(final DataBroker broker, final IMappingSystem msmr, final NotificationPublishService nps) { setBroker(broker); setMappingSystem(msmr); setNotificationProviderService(nps); @@ -55,23 +54,23 @@ public class MappingDataListener extends AbstractDataListener { registerDataChangeListener(); } - public void setNotificationProviderService(NotificationPublishService nps) { - this.notificationPublishService = nps; + public void setNotificationProviderService(final NotificationPublishService nps) { + notificationPublishService = nps; } - void setMappingSystem(IMappingSystem msmr) { - this.mapSystem = msmr; + void setMappingSystem(final IMappingSystem msmr) { + mapSystem = msmr; } @Override - public void onDataTreeChanged(Collection> changes) { + public void onDataTreeChanged(final List> changes) { for (DataTreeModification change : changes) { final DataObjectModification mod = change.getRootNode(); - if (ModificationType.DELETE == mod.getModificationType()) { + if (ModificationType.DELETE == mod.modificationType()) { // Process deleted mappings - final Mapping mapping = mod.getDataBefore(); + final Mapping mapping = mod.dataBefore(); // Only treat mapping changes caused by Northbound, since Southbound changes are already handled // before being persisted, except for cluster slaves @@ -80,16 +79,16 @@ public class MappingDataListener extends AbstractDataListener { } LOG.trace("Received deleted data"); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", mapping); final Mapping convertedMapping = convertToBinaryIfNecessary(mapping); mapSystem.removeMapping(convertedMapping.getOrigin(), convertedMapping.getMappingRecord().getEid()); - } else if (ModificationType.SUBTREE_MODIFIED == mod.getModificationType() || ModificationType.WRITE == mod - .getModificationType()) { - final Mapping mapping = mod.getDataAfter(); + } else if (ModificationType.SUBTREE_MODIFIED == mod.modificationType() || ModificationType.WRITE == mod + .modificationType()) { + final Mapping mapping = mod.dataAfter(); // Only treat mapping changes caused by Northbound, since Southbound changes are already handled // before being persisted, except for cluster slaves XXX separate NB and SB to avoid ignoring @@ -101,26 +100,26 @@ public class MappingDataListener extends AbstractDataListener { final Mapping convertedMapping = convertToBinaryIfNecessary(mapping); Eid convertedEid = convertedMapping.getMappingRecord().getEid(); - if (ModificationType.SUBTREE_MODIFIED == mod.getModificationType()) { + if (ModificationType.SUBTREE_MODIFIED == mod.modificationType()) { LOG.trace("Received update data"); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", mapping); mapSystem.updateMapping(convertedMapping.getOrigin(), convertedEid, new MappingData(convertedMapping.getMappingRecord())); } else { LOG.trace("Received write data"); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", mapping); mapSystem.addMapping(convertedMapping.getOrigin(), convertedEid, new MappingData(convertedMapping.getMappingRecord())); } } else { - LOG.warn("Ignoring unhandled modification type {}", mod.getModificationType()); + LOG.warn("Ignoring unhandled modification type {}", mod.modificationType()); } } } - private static Mapping convertToBinaryIfNecessary(Mapping mapping) { + private static Mapping convertToBinaryIfNecessary(final Mapping mapping) { MappingRecord originalRecord = mapping.getMappingRecord(); List originalLocators = originalRecord.getLocatorRecord(); @@ -142,7 +141,7 @@ public class MappingDataListener extends AbstractDataListener { return mapping; } - private static List convertToBinaryIfNecessary(List originalLocators) { + private static List convertToBinaryIfNecessary(final List originalLocators) { List convertedLocators = null; for (LocatorRecord record : originalLocators) { if (LispAddressUtil.addressNeedsConversionToBinary(record.getRloc().getAddress())) { diff --git a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/LispMappingServiceTest.java b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/LispMappingServiceTest.java index 021da330..b137d30b 100644 --- a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/LispMappingServiceTest.java +++ b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/LispMappingServiceTest.java @@ -31,7 +31,7 @@ import org.opendaylight.lispflowmapping.lisp.type.LispMessage; import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil; import org.opendaylight.mdsal.binding.api.NotificationService; import org.opendaylight.mdsal.binding.api.RpcProviderService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.Ipv4AddressBinary; @@ -379,7 +379,7 @@ public class LispMappingServiceTest { } @SuppressWarnings("unchecked") - private T getField(String fieldName) throws NoSuchFieldException, IllegalAccessException { + private T getField(final String fieldName) throws NoSuchFieldException, IllegalAccessException { final Field field = LispMappingService.class.getDeclaredField(fieldName); field.setAccessible(true); @@ -413,7 +413,7 @@ public class LispMappingServiceTest { class TransportAddressMatch implements ArgumentMatcher { @Override - public boolean matches(SendMapNotifyInput sendMapNotify) { + public boolean matches(final SendMapNotifyInput sendMapNotify) { final TransportAddress notifyTransportAddress = sendMapNotify.getTransportAddress(); return TRANSPORT_ADDRESS_1.equals(notifyTransportAddress) || TRANSPORT_ADDRESS_2.equals(notifyTransportAddress); diff --git a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListenerTest.java b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListenerTest.java index de55207a..7203c50e 100644 --- a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListenerTest.java +++ b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/AuthenticationKeyDataListenerTest.java @@ -60,7 +60,7 @@ public class AuthenticationKeyDataListenerTest { final InstanceIdentifier instanceIdentifierMock = Mockito.mock(InstanceIdentifier.class); final DataTreeIdentifier dataTreeIdentifier = - DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); change_del = Mockito.mock(DataTreeModification.class); change_subtreeModified = Mockito.mock(DataTreeModification.class); @@ -75,9 +75,9 @@ public class AuthenticationKeyDataListenerTest { Mockito.when(change_subtreeModified.getRootNode()).thenReturn(mod_subtreeModified); Mockito.when(change_write.getRootPath()).thenReturn(dataTreeIdentifier); Mockito.when(change_write.getRootNode()).thenReturn(mod_write); - Mockito.when(mod_del.getModificationType()).thenReturn(ModificationType.DELETE); - Mockito.when(mod_subtreeModified.getModificationType()).thenReturn(ModificationType.SUBTREE_MODIFIED); - Mockito.when(mod_write.getModificationType()).thenReturn(ModificationType.WRITE); + Mockito.when(mod_del.modificationType()).thenReturn(ModificationType.DELETE); + Mockito.when(mod_subtreeModified.modificationType()).thenReturn(ModificationType.SUBTREE_MODIFIED); + Mockito.when(mod_write.modificationType()).thenReturn(ModificationType.WRITE); } /** @@ -86,7 +86,7 @@ public class AuthenticationKeyDataListenerTest { @Test public void onDataTreeChangedTest_delete() { final List> changes = Lists.newArrayList(change_del); - Mockito.when(mod_del.getDataBefore()).thenReturn(AUTHENTICATION_KEY_1); + Mockito.when(mod_del.dataBefore()).thenReturn(AUTHENTICATION_KEY_1); authenticationKeyDataListener.onDataTreeChanged(changes); Mockito.verify(iMappingSystemMock).removeAuthenticationKey(IPV4_EID_1); @@ -98,7 +98,7 @@ public class AuthenticationKeyDataListenerTest { @Test public void onDataTreeChangedTest_write() { final List> changes = Lists.newArrayList(change_write); - Mockito.when(mod_write.getDataAfter()).thenReturn(AUTHENTICATION_KEY_2); + Mockito.when(mod_write.dataAfter()).thenReturn(AUTHENTICATION_KEY_2); authenticationKeyDataListener.onDataTreeChanged(changes); Mockito.verify(iMappingSystemMock).addAuthenticationKey(IPV4_EID_2, AUTHENTICATION_KEY_2.getMappingAuthkey()); @@ -110,7 +110,7 @@ public class AuthenticationKeyDataListenerTest { @Test public void onDataTreeChangedTest_subtreeModified() { final List> changes = Lists.newArrayList(change_subtreeModified); - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(AUTHENTICATION_KEY_3); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(AUTHENTICATION_KEY_3); authenticationKeyDataListener.onDataTreeChanged(changes); Mockito.verify(iMappingSystemMock).addAuthenticationKey(IPV4_EID_3, AUTHENTICATION_KEY_3.getMappingAuthkey()); @@ -124,9 +124,9 @@ public class AuthenticationKeyDataListenerTest { final List> changes = Lists.newArrayList(change_del, change_write, change_subtreeModified); - Mockito.when(mod_del.getDataBefore()).thenReturn(AUTHENTICATION_KEY_1); - Mockito.when(mod_write.getDataAfter()).thenReturn(AUTHENTICATION_KEY_2); - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(AUTHENTICATION_KEY_3); + Mockito.when(mod_del.dataBefore()).thenReturn(AUTHENTICATION_KEY_1); + Mockito.when(mod_write.dataAfter()).thenReturn(AUTHENTICATION_KEY_2); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(AUTHENTICATION_KEY_3); authenticationKeyDataListener.onDataTreeChanged(changes); Mockito.verify(iMappingSystemMock).removeAuthenticationKey(IPV4_EID_1); @@ -145,13 +145,13 @@ public class AuthenticationKeyDataListenerTest { final List> changes = Lists.newArrayList(changeNoModType); Mockito.when(changeNoModType.getRootNode()).thenReturn(modNoType); - Mockito.when(modNoType.getModificationType()).thenReturn(null); + Mockito.when(modNoType.modificationType()).thenReturn(null); authenticationKeyDataListener.onDataTreeChanged(changes); Mockito.verifyZeroInteractions(iMappingSystemMock); } - private static AuthenticationKey getAuthenticationKey(Eid eid, String password) { + private static AuthenticationKey getAuthenticationKey(final Eid eid, final String password) { return new AuthenticationKeyBuilder() .withKey(new AuthenticationKeyKey(new EidUri("uri-1"))) .setEid(eid) diff --git a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListenerTest.java b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListenerTest.java index dbe7807b..b35cb38f 100644 --- a/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListenerTest.java +++ b/mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListenerTest.java @@ -79,7 +79,7 @@ public class MappingDataListenerTest { final InstanceIdentifier instanceIdentifierMock = Mockito.mock(InstanceIdentifier.class); final DataTreeIdentifier dataTreeIdentifier = - DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); change_del = Mockito.mock(DataTreeModification.class); change_subtreeModified = Mockito.mock(DataTreeModification.class); @@ -94,9 +94,9 @@ public class MappingDataListenerTest { Mockito.when(change_subtreeModified.getRootNode()).thenReturn(mod_subtreeModified); Mockito.when(change_write.getRootPath()).thenReturn(dataTreeIdentifier); Mockito.when(change_write.getRootNode()).thenReturn(mod_write); - Mockito.when(mod_del.getModificationType()).thenReturn(ModificationType.DELETE); - Mockito.when(mod_subtreeModified.getModificationType()).thenReturn(ModificationType.SUBTREE_MODIFIED); - Mockito.when(mod_write.getModificationType()).thenReturn(ModificationType.WRITE); + Mockito.when(mod_del.modificationType()).thenReturn(ModificationType.DELETE); + Mockito.when(mod_subtreeModified.modificationType()).thenReturn(ModificationType.SUBTREE_MODIFIED); + Mockito.when(mod_write.modificationType()).thenReturn(ModificationType.WRITE); Mockito.when(iMappingSystemMock.isMaster()).thenReturn(true); } @@ -106,7 +106,7 @@ public class MappingDataListenerTest { @Test public void onDataTreeChangedTest_delete_NB() throws InterruptedException { final List> changes = Lists.newArrayList(change_del); - Mockito.when(mod_del.getDataBefore()).thenReturn(MAPPING_EID_1_NB); + Mockito.when(mod_del.dataBefore()).thenReturn(MAPPING_EID_1_NB); mappingDataListener.onDataTreeChanged(changes); Mockito.verify(iMappingSystemMock).removeMapping(MappingOrigin.Northbound, IPV4_EID_1); @@ -118,7 +118,7 @@ public class MappingDataListenerTest { @Test public void onDataTreeChangedTest_delete_SB() { final List> changes = Lists.newArrayList(change_del); - Mockito.when(mod_del.getDataBefore()).thenReturn(MAPPING_EID_1_SB); + Mockito.when(mod_del.dataBefore()).thenReturn(MAPPING_EID_1_SB); mappingDataListener.onDataTreeChanged(changes); //Mockito.verifyZeroInteractions(iMappingSystemMock); @@ -135,7 +135,7 @@ public class MappingDataListenerTest { final List> changes = Lists.newArrayList(change_subtreeModified); final MappingChanged mapChanged = MSNotificationInputUtil.toMappingChanged( MAPPING_EID_2_NB.getMappingRecord(), null, null, null, MappingChange.Updated); - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(MAPPING_EID_2_NB); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(MAPPING_EID_2_NB); mappingDataListener.onDataTreeChanged(changes); final ArgumentCaptor captor = ArgumentCaptor.forClass(MappingData.class); @@ -152,7 +152,7 @@ public class MappingDataListenerTest { @Test public void onDataTreeChangedTest_subtreeModified_SB() { final List> changes = Lists.newArrayList(change_subtreeModified); - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(MAPPING_EID_2_SB); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(MAPPING_EID_2_SB); mappingDataListener.onDataTreeChanged(changes); //Mockito.verifyZeroInteractions(iMappingSystemMock); @@ -168,7 +168,7 @@ public class MappingDataListenerTest { final List> changes = Lists.newArrayList(change_write); final MappingChanged mapChanged = MSNotificationInputUtil.toMappingChanged( MAPPING_EID_3_NB.getMappingRecord(), null, null, null, MappingChange.Created); - Mockito.when(mod_write.getDataAfter()).thenReturn(MAPPING_EID_3_NB); + Mockito.when(mod_write.dataAfter()).thenReturn(MAPPING_EID_3_NB); mappingDataListener.onDataTreeChanged(changes); final ArgumentCaptor captor = ArgumentCaptor.forClass(MappingData.class); @@ -184,7 +184,7 @@ public class MappingDataListenerTest { @Test public void onDataTreeChangedTest_write_SB() { final List> changes = Lists.newArrayList(change_write); - Mockito.when(mod_write.getDataAfter()).thenReturn(MAPPING_EID_3_SB); + Mockito.when(mod_write.dataAfter()).thenReturn(MAPPING_EID_3_SB); mappingDataListener.onDataTreeChanged(changes); //Mockito.verifyZeroInteractions(iMappingSystemMock); @@ -202,9 +202,9 @@ public class MappingDataListenerTest { final MappingChanged mapChangedSubtreeMod = MSNotificationInputUtil.toMappingChanged( MAPPING_EID_2_NB.getMappingRecord(), null, null, null, MappingChange.Updated); - Mockito.when(mod_del.getDataBefore()).thenReturn(MAPPING_EID_1_NB); - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(MAPPING_EID_2_NB); - Mockito.when(mod_write.getDataAfter()).thenReturn(MAPPING_EID_3_SB); + Mockito.when(mod_del.dataBefore()).thenReturn(MAPPING_EID_1_NB); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(MAPPING_EID_2_NB); + Mockito.when(mod_write.dataAfter()).thenReturn(MAPPING_EID_3_SB); mappingDataListener.onDataTreeChanged(changes); final ArgumentCaptor captor = ArgumentCaptor.forClass(MappingData.class); @@ -228,7 +228,7 @@ public class MappingDataListenerTest { final List> changes = Lists.newArrayList(changeNoModType); Mockito.when(changeNoModType.getRootNode()).thenReturn(modNoType); - Mockito.when(modNoType.getModificationType()).thenReturn(null); + Mockito.when(modNoType.modificationType()).thenReturn(null); mappingDataListener.onDataTreeChanged(changes); @@ -237,7 +237,7 @@ public class MappingDataListenerTest { } - private static Mapping getDefaultMapping(Eid eid, MappingOrigin origin) { + private static Mapping getDefaultMapping(final Eid eid, final MappingOrigin origin) { final MappingRecord record = new MappingRecordBuilder().setEid(eid).build(); return new MappingBuilder() .withKey(new MappingKey(new EidUri(LispAddressStringifier.getURIString(eid)), origin)) diff --git a/mappingservice/lisp-proto/pom.xml b/mappingservice/lisp-proto/pom.xml index d5d2708c..e1bdc8ea 100644 --- a/mappingservice/lisp-proto/pom.xml +++ b/mappingservice/lisp-proto/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 12.0.4 + 13.0.0 diff --git a/mappingservice/pom.xml b/mappingservice/pom.xml index 93f15287..3395f56c 100644 --- a/mappingservice/pom.xml +++ b/mappingservice/pom.xml @@ -38,7 +38,7 @@ org.opendaylight.mdsal mdsal-artifacts - 12.0.4 + 13.0.0 pom import diff --git a/mappingservice/southbound/pom.xml b/mappingservice/southbound/pom.xml index 2db47b71..91ef7ee8 100644 --- a/mappingservice/southbound/pom.xml +++ b/mappingservice/southbound/pom.xml @@ -74,11 +74,11 @@ org.opendaylight.mdsal - mdsal-singleton-common-api + mdsal-singleton-api org.opendaylight.mdsal - mdsal-singleton-dom-impl + mdsal-singleton-impl diff --git a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java index 077aca6b..66203045 100644 --- a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java +++ b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java @@ -50,15 +50,16 @@ import org.opendaylight.lispflowmapping.southbound.lisp.cache.MapRegisterCache; import org.opendaylight.lispflowmapping.type.sbplugin.IConfigLispSouthboundPlugin; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.NotificationPublishService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider; -import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonService; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider; +import org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MessageType; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.authkey.container.MappingAuthkey; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.transport.address.TransportAddress; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKey; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.Notification; import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; @@ -90,7 +91,7 @@ public class LispSouthboundPlugin implements IConfigLispSouthboundPlugin, AutoCl protected static final Logger LOG = LoggerFactory.getLogger(LispSouthboundPlugin.class); public static final String LISPFLOWMAPPING_ENTITY_NAME = "lispflowmapping"; public static final ServiceGroupIdentifier SERVICE_GROUP_IDENTIFIER = - ServiceGroupIdentifier.create(LISPFLOWMAPPING_ENTITY_NAME); + new ServiceGroupIdentifier(LISPFLOWMAPPING_ENTITY_NAME); private static final String DEFAULT_BINDING_ADDRESS = "0.0.0.0"; private static final long DEFAULT_MAP_REGISTER_CACHE_TIMEOUT = 90000; @@ -121,6 +122,7 @@ public class LispSouthboundPlugin implements IConfigLispSouthboundPlugin, AutoCl private EventLoopGroup eventLoopGroup; private AuthenticationKeyDataListener authenticationKeyDataListener; private DataStoreBackEnd dsbe; + private Registration cssReg; @Inject public LispSouthboundPlugin(final DataBroker dataBroker, @@ -194,7 +196,7 @@ public class LispSouthboundPlugin implements IConfigLispSouthboundPlugin, AutoCl start(); startXtr(); - clusterSingletonService.registerClusterSingletonService(this); + cssReg = clusterSingletonService.registerClusterSingletonService(this); } LOG.info("LISP (RFC6830) Southbound Plugin is up!"); @@ -379,7 +381,9 @@ public class LispSouthboundPlugin implements IConfigLispSouthboundPlugin, AutoCl eventLoopGroup.shutdownGracefully(); lispSouthboundHandler.close(); unloadActions(); - clusterSingletonService.close(); + if (cssReg != null) { + cssReg.close(); + } dsbe.closeTransactionChain(); } diff --git a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRPC.java b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRPC.java index 2640dae0..943d190d 100644 --- a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRPC.java +++ b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundRPC.java @@ -7,6 +7,8 @@ */ package org.opendaylight.lispflowmapping.southbound; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.ImmutableClassToInstanceMap; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import java.nio.ByteBuffer; @@ -21,22 +23,27 @@ import org.opendaylight.lispflowmapping.lisp.serializer.MapReplySerializer; import org.opendaylight.lispflowmapping.lisp.serializer.MapRequestSerializer; import org.opendaylight.mdsal.binding.api.RpcProviderService; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.MessageType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.GetStats; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.GetStatsInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.GetStatsOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.GetStatsOutputBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.OdlLispSbService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.ResetStats; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.ResetStatsInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.ResetStatsOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.ResetStatsOutputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotify; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapNotifyOutputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRegister; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRegisterInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRegisterOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRegisterOutputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapReply; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapReplyInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapReplyOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapReplyOutputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRequest; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRequestInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRequestOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.SendMapRequestOutputBuilder; @@ -45,6 +52,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.ctrl. import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.get.stats.output.ControlMessageStatsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.sb.rev150904.get.stats.output.MapRegisterCacheStatsBuilder; import org.opendaylight.yangtools.concepts.Registration; +import org.opendaylight.yangtools.yang.binding.Rpc; import org.opendaylight.yangtools.yang.common.ErrorTag; import org.opendaylight.yangtools.yang.common.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResult; @@ -63,9 +71,9 @@ import org.slf4j.LoggerFactory; * @author Florin Coras (fcoras@cisco.com) * @author Lorand Jakab (lojakab@cisco.com) */ -@Component(immediate = true, property = "type=default", service = OdlLispSbService.class) @Singleton -public class LispSouthboundRPC implements OdlLispSbService { +@Component(service = { }, property = "type=default") +public class LispSouthboundRPC { protected static final Logger LOG = LoggerFactory.getLogger(LispSouthboundRPC.class); private final LispSouthboundPlugin lispSbPlugin; @@ -76,7 +84,14 @@ public class LispSouthboundRPC implements OdlLispSbService { public LispSouthboundRPC(final @Reference LispSouthboundPlugin lispSbPlugin, final @Reference RpcProviderService rpcProviderService) { this.lispSbPlugin = lispSbPlugin; - rpcRegistration = rpcProviderService.registerRpcImplementation(OdlLispSbService.class, this); + rpcRegistration = rpcProviderService.registerRpcImplementations(ImmutableClassToInstanceMap.>builder() + .put(SendMapNotify.class, this::sendMapNotify) + .put(SendMapReply.class, this::sendMapReply) + .put(SendMapRequest.class, this::sendMapRequest) + .put(SendMapRegister.class, this::sendMapRegister) + .put(GetStats.class, this::getStats) + .put(ResetStats.class, this::resetStats) + .build()); } @Deactivate @@ -85,8 +100,8 @@ public class LispSouthboundRPC implements OdlLispSbService { rpcRegistration.close(); } - @Override - public ListenableFuture> sendMapNotify(final SendMapNotifyInput mapNotifyInput) { + @VisibleForTesting + ListenableFuture> sendMapNotify(final SendMapNotifyInput mapNotifyInput) { LOG.trace("sendMapNotify called!!"); if (mapNotifyInput != null) { ByteBuffer outBuffer = MapNotifySerializer.getInstance().serialize(mapNotifyInput.getMapNotify()); @@ -100,8 +115,8 @@ public class LispSouthboundRPC implements OdlLispSbService { new SendMapNotifyOutputBuilder().build()).build()); } - @Override - public ListenableFuture> sendMapReply(final SendMapReplyInput mapReplyInput) { + @VisibleForTesting + ListenableFuture> sendMapReply(final SendMapReplyInput mapReplyInput) { LOG.trace("sendMapReply called!!"); if (mapReplyInput != null) { ByteBuffer outBuffer = MapReplySerializer.getInstance().serialize(mapReplyInput.getMapReply()); @@ -115,8 +130,8 @@ public class LispSouthboundRPC implements OdlLispSbService { new SendMapReplyOutputBuilder().build()).build()); } - @Override - public ListenableFuture> sendMapRequest(final SendMapRequestInput mapRequestInput) { + @VisibleForTesting + ListenableFuture> sendMapRequest(final SendMapRequestInput mapRequestInput) { LOG.trace("sendMapRequest called!!"); if (mapRequestInput != null) { ByteBuffer outBuffer = MapRequestSerializer.getInstance().serialize(mapRequestInput.getMapRequest()); @@ -130,9 +145,8 @@ public class LispSouthboundRPC implements OdlLispSbService { new SendMapRequestOutputBuilder().build()).build()); } - @Override - public ListenableFuture> sendMapRegister( - final SendMapRegisterInput mapRegisterInput) { + @VisibleForTesting + ListenableFuture> sendMapRegister(final SendMapRegisterInput mapRegisterInput) { LOG.trace("sendMapRegister called!!"); if (mapRegisterInput != null) { ByteBuffer outBuffer = MapRegisterSerializer.getInstance().serialize(mapRegisterInput.getMapRegister()); @@ -146,8 +160,8 @@ public class LispSouthboundRPC implements OdlLispSbService { new SendMapRegisterOutputBuilder().build()).build()); } - @Override - public ListenableFuture> getStats(final GetStatsInput input) { + @VisibleForTesting + ListenableFuture> getStats(final GetStatsInput input) { LOG.trace("getStats called!!"); RpcResultBuilder rpcResultBuilder; @@ -163,8 +177,8 @@ public class LispSouthboundRPC implements OdlLispSbService { return Futures.immediateFuture(rpcResultBuilder.build()); } - @Override - public ListenableFuture> resetStats(final ResetStatsInput input) { + @VisibleForTesting + ListenableFuture> resetStats(final ResetStatsInput input) { LOG.trace("resetStats called!!"); ConcurrentLispSouthboundStats stats = lispSbPlugin.getStats(); diff --git a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListener.java b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListener.java index 8da1c3e5..e5bf1bd3 100644 --- a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListener.java +++ b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListener.java @@ -7,15 +7,15 @@ */ package org.opendaylight.lispflowmapping.southbound.lisp; -import java.util.Collection; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil; import org.opendaylight.lispflowmapping.mapcache.AuthKeyDb; -import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.DataObjectModification; import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType; +import org.opendaylight.mdsal.binding.api.DataTreeChangeListener; import org.opendaylight.mdsal.binding.api.DataTreeIdentifier; import org.opendaylight.mdsal.binding.api.DataTreeModification; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; @@ -26,7 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev15090 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKeyBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.mapping.database.VirtualNetworkIdentifier; -import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,25 +35,22 @@ import org.slf4j.LoggerFactory; * DataListener for all AuthenticationKey modification events. * */ -public class AuthenticationKeyDataListener implements ClusteredDataTreeChangeListener { +public class AuthenticationKeyDataListener implements DataTreeChangeListener { private static final Logger LOG = LoggerFactory.getLogger(AuthenticationKeyDataListener.class); private final AuthKeyDb akdb; - private final DataBroker broker; private final InstanceIdentifier path; - private final ListenerRegistration> registration; + private final Registration registration; private final ConcurrentHashMap updatedEntries; public AuthenticationKeyDataListener(final DataBroker broker, final AuthKeyDb akdb) { - this.broker = broker; this.akdb = akdb; - this.path = InstanceIdentifier.create(MappingDatabase.class).child(VirtualNetworkIdentifier.class) + path = InstanceIdentifier.create(MappingDatabase.class).child(VirtualNetworkIdentifier.class) .child(AuthenticationKey.class); LOG.trace("Registering AuthenticationKey listener."); - final DataTreeIdentifier dataTreeIdentifier = DataTreeIdentifier.create( - LogicalDatastoreType.CONFIGURATION, path); - registration = broker.registerDataTreeChangeListener(dataTreeIdentifier, this); - this.updatedEntries = new ConcurrentHashMap<>(); + registration = broker.registerTreeChangeListener( + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, path), this); + updatedEntries = new ConcurrentHashMap<>(); } public void closeDataChangeListener() { @@ -61,32 +58,32 @@ public class AuthenticationKeyDataListener implements ClusteredDataTreeChangeLis } @Override - public synchronized void onDataTreeChanged(Collection> changes) { + public synchronized void onDataTreeChanged(final List> changes) { for (DataTreeModification change : changes) { final DataObjectModification mod = change.getRootNode(); - if (ModificationType.DELETE == mod.getModificationType()) { - final AuthenticationKey authKey = mod.getDataBefore(); + if (ModificationType.DELETE == mod.modificationType()) { + final AuthenticationKey authKey = mod.dataBefore(); LOG.trace("Received deleted data"); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", authKey); final AuthenticationKey convertedAuthKey = convertToBinaryIfNecessary(authKey); akdb.removeAuthenticationKey(convertedAuthKey.getEid()); updatedEntries.put(convertedAuthKey.getEid(), System.currentTimeMillis()); - } else if (ModificationType.WRITE == mod.getModificationType() || ModificationType.SUBTREE_MODIFIED == mod - .getModificationType()) { - if (ModificationType.WRITE == mod.getModificationType()) { + } else if (ModificationType.WRITE == mod.modificationType() + || ModificationType.SUBTREE_MODIFIED == mod.modificationType()) { + if (ModificationType.WRITE == mod.modificationType()) { LOG.trace("Received created data"); } else { LOG.trace("Received updated data"); } // Process newly created or updated authentication keys - final AuthenticationKey authKey = mod.getDataAfter(); + final AuthenticationKey authKey = mod.dataAfter(); - LOG.trace("Key: {}", change.getRootPath().getRootIdentifier()); + LOG.trace("Key: {}", change.getRootPath().path()); LOG.trace("Value: {}", authKey); final AuthenticationKey convertedAuthKey = convertToBinaryIfNecessary(authKey); @@ -94,7 +91,7 @@ public class AuthenticationKeyDataListener implements ClusteredDataTreeChangeLis akdb.addAuthenticationKey(convertedAuthKey.getEid(), convertedAuthKey.getMappingAuthkey()); updatedEntries.put(convertedAuthKey.getEid(), System.currentTimeMillis()); } else { - LOG.warn("Ignoring unhandled modification type {}", mod.getModificationType()); + LOG.warn("Ignoring unhandled modification type {}", mod.modificationType()); } } } @@ -112,7 +109,8 @@ public class AuthenticationKeyDataListener implements ClusteredDataTreeChangeLis * @param timeout MapRegister cache timeout value * @return false if any of the EIDs in the eids list was updated in the last timout period, true otherwise */ - public synchronized boolean authKeysForEidsUnchanged(Map eids, long timeout) { + public synchronized boolean authKeysForEidsUnchanged(final Map eids, + final long timeout) { boolean result = true; Long currentTime = System.currentTimeMillis(); for (EidLispAddress eidLispAddress : eids.values()) { @@ -127,7 +125,7 @@ public class AuthenticationKeyDataListener implements ClusteredDataTreeChangeLis return result; } - private static AuthenticationKey convertToBinaryIfNecessary(AuthenticationKey authKey) { + private static AuthenticationKey convertToBinaryIfNecessary(final AuthenticationKey authKey) { Eid originalEid = authKey.getEid(); if (LispAddressUtil.addressNeedsConversionToBinary(originalEid.getAddress())) { AuthenticationKeyBuilder akb = new AuthenticationKeyBuilder(authKey); diff --git a/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPluginTest.java b/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPluginTest.java index 1f55e415..3b0a7ab3 100644 --- a/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPluginTest.java +++ b/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPluginTest.java @@ -31,7 +31,7 @@ import org.opendaylight.lispflowmapping.lisp.type.LispMessage; import org.opendaylight.lispflowmapping.southbound.lisp.LispSouthboundHandler; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.mdsal.binding.api.NotificationPublishService; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider; +import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.Ipv4AddressBinary; diff --git a/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java b/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java index 18bd462e..c51a657a 100644 --- a/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java +++ b/mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/AuthenticationKeyDataListenerTest.java @@ -29,7 +29,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev15090 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKeyBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.mappingservice.rev150906.db.instance.AuthenticationKeyKey; -import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Uint16; @@ -38,8 +38,7 @@ public class AuthenticationKeyDataListenerTest { @Mock(name = "akdb") private static AuthKeyDb akdbMock; @Mock(name = "broker") private static DataBroker brokerMock; - @Mock(name = "registration") private static ListenerRegistration - registrationMock; + @Mock(name = "registration") private static Registration registrationMock; @InjectMocks private static AuthenticationKeyDataListener authenticationKeyDataListener; private static DataTreeModification change_del; @@ -73,7 +72,7 @@ public class AuthenticationKeyDataListenerTest { public void init() { final InstanceIdentifier instanceIdentifierMock = Mockito.mock(InstanceIdentifier.class); final DataTreeIdentifier dataTreeIdentifier = - DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); + DataTreeIdentifier.of(LogicalDatastoreType.CONFIGURATION, instanceIdentifierMock); change_del = Mockito.mock(DataTreeModification.class); change_subtreeModified = Mockito.mock(DataTreeModification.class); @@ -88,12 +87,12 @@ public class AuthenticationKeyDataListenerTest { Mockito.when(change_subtreeModified.getRootNode()).thenReturn(mod_subtreeModified); Mockito.when(change_write.getRootPath()).thenReturn(dataTreeIdentifier); Mockito.when(change_write.getRootNode()).thenReturn(mod_write); - Mockito.when(mod_del.getModificationType()).thenReturn(DataObjectModification.ModificationType.DELETE); - Mockito.when(mod_subtreeModified.getModificationType()) + Mockito.when(mod_del.modificationType()).thenReturn(DataObjectModification.ModificationType.DELETE); + Mockito.when(mod_subtreeModified.modificationType()) .thenReturn(DataObjectModification.ModificationType.SUBTREE_MODIFIED); - Mockito.when(mod_write.getModificationType()).thenReturn(DataObjectModification.ModificationType.WRITE); + Mockito.when(mod_write.modificationType()).thenReturn(DataObjectModification.ModificationType.WRITE); - Mockito.when(brokerMock.registerDataTreeChangeListener(Mockito.any(DataTreeIdentifier.class), + Mockito.when(brokerMock.registerTreeChangeListener(Mockito.any(DataTreeIdentifier.class), Mockito.any(AuthenticationKeyDataListener.class))).thenReturn(registrationMock); authenticationKeyDataListener = new AuthenticationKeyDataListener(brokerMock, akdbMock); } @@ -103,7 +102,7 @@ public class AuthenticationKeyDataListenerTest { */ @Test public void onDataTreeChangedTest_delete_BinaryEid() { - Mockito.when(mod_del.getDataBefore()).thenReturn(AUTHENTICATION_KEY_1); + Mockito.when(mod_del.dataBefore()).thenReturn(AUTHENTICATION_KEY_1); authenticationKeyDataListener.onDataTreeChanged(Lists.newArrayList(change_del)); Mockito.verify(akdbMock).removeAuthenticationKey(IPV4_BINARY_EID_1); @@ -114,7 +113,7 @@ public class AuthenticationKeyDataListenerTest { */ @Test public void onDataTreeChangedTest_delete_Ipv4PrefixEid() { - Mockito.when(mod_del.getDataBefore()).thenReturn(AUTHENTICATION_KEY_PREFIX); + Mockito.when(mod_del.dataBefore()).thenReturn(AUTHENTICATION_KEY_PREFIX); authenticationKeyDataListener.onDataTreeChanged(Lists.newArrayList(change_del)); Mockito.verify(akdbMock).removeAuthenticationKey(IPV4_PREFIX_BINARY_EID); @@ -125,7 +124,7 @@ public class AuthenticationKeyDataListenerTest { */ @Test public void onDataTreeChangedTest_subtreeModified() { - Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(AUTHENTICATION_KEY_2); + Mockito.when(mod_subtreeModified.dataAfter()).thenReturn(AUTHENTICATION_KEY_2); authenticationKeyDataListener.onDataTreeChanged(Lists.newArrayList(change_subtreeModified)); Mockito.verify(akdbMock).addAuthenticationKey(IPV4_BINARY_EID_2, MAPPING_AUTHKEY); @@ -136,7 +135,7 @@ public class AuthenticationKeyDataListenerTest { */ @Test public void onDataTreeChangedTest_write() { - Mockito.when(mod_write.getDataAfter()).thenReturn(AUTHENTICATION_KEY_3); + Mockito.when(mod_write.dataAfter()).thenReturn(AUTHENTICATION_KEY_3); authenticationKeyDataListener.onDataTreeChanged(Lists.newArrayList(change_write)); Mockito.verify(akdbMock).addAuthenticationKey(IPV4_BINARY_EID_3, MAPPING_AUTHKEY); @@ -151,7 +150,7 @@ public class AuthenticationKeyDataListenerTest { final DataTreeModification change_nullModType = Mockito.mock(DataTreeModification.class); final DataObjectModification mod_nullModType = Mockito.mock(DataObjectModification.class); Mockito.when(change_nullModType.getRootNode()).thenReturn(mod_nullModType); - Mockito.when(mod_nullModType.getModificationType()).thenReturn(null); + Mockito.when(mod_nullModType.modificationType()).thenReturn(null); authenticationKeyDataListener.onDataTreeChanged(Lists.newArrayList(change_nullModType)); Mockito.verifyNoInteractions(akdbMock); @@ -166,7 +165,7 @@ public class AuthenticationKeyDataListenerTest { Mockito.verify(registrationMock).close(); } - private static AuthenticationKey getAuthenticationKey(Eid eid) { + private static AuthenticationKey getAuthenticationKey(final Eid eid) { return new AuthenticationKeyBuilder() .withKey(new AuthenticationKeyKey(new EidUri("uri-1"))) .setEid(eid) -- 2.43.0 From 2a5815eb10ddb7f3d5d17b90c6f34ea63a3cbdaf Mon Sep 17 00:00:00 2001 From: jenkins-releng Date: Mon, 12 Feb 2024 00:19:34 +0000 Subject: [PATCH 2/2] Release Validate --- artifacts/pom.xml | 2 +- commons/build_tools/pom.xml | 2 +- commons/parent/pom.xml | 8 ++++---- features/features-lispflowmapping/pom.xml | 2 +- features/odl-lispflowmapping-inmemorydb/pom.xml | 2 +- features/odl-lispflowmapping-mappingservice-shell/pom.xml | 2 +- features/odl-lispflowmapping-mappingservice/pom.xml | 4 ++-- features/odl-lispflowmapping-models/pom.xml | 2 +- features/odl-lispflowmapping-msmr/pom.xml | 2 +- features/odl-lispflowmapping-southbound/pom.xml | 4 ++-- features/pom.xml | 2 +- integrationtest/pom.xml | 4 ++-- lispflowmapping-karaf/pom.xml | 2 +- mappingservice/api/pom.xml | 2 +- mappingservice/config/pom.xml | 4 ++-- mappingservice/dsbackend/pom.xml | 2 +- mappingservice/implementation/pom.xml | 2 +- mappingservice/inmemorydb/pom.xml | 2 +- mappingservice/lisp-proto/pom.xml | 2 +- mappingservice/mapcache/pom.xml | 2 +- mappingservice/pom.xml | 2 +- mappingservice/shell/pom.xml | 2 +- mappingservice/southbound/pom.xml | 2 +- pom.xml | 2 +- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 5bb1bdcd..e2a0e7d7 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping lispflowmapping-artifacts - 1.19.0-SNAPSHOT + 1.19.0 pom diff --git a/commons/build_tools/pom.xml b/commons/build_tools/pom.xml index 1e27ab36..1fe78fe4 100644 --- a/commons/build_tools/pom.xml +++ b/commons/build_tools/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping lispflowmapping-commons - 1.19.0-SNAPSHOT + 1.19.0 ../parent diff --git a/commons/parent/pom.xml b/commons/parent/pom.xml index 700172b9..03c1abaa 100644 --- a/commons/parent/pom.xml +++ b/commons/parent/pom.xml @@ -21,7 +21,7 @@ org.opendaylight.lispflowmapping lispflowmapping-commons - 1.19.0-SNAPSHOT + 1.19.0 pom @@ -30,9 +30,9 @@ 1.0.0 0.5.0 - 1.19.0-SNAPSHOT - 0.22.0-SNAPSHOT - 0.26.0-SNAPSHOT + 1.19.0 + 0.22.0 + 0.26.0 src/main/yang-gen-sal 0.5.0 src/main/yang diff --git a/features/features-lispflowmapping/pom.xml b/features/features-lispflowmapping/pom.xml index 40942568..c7ef0399 100644 --- a/features/features-lispflowmapping/pom.xml +++ b/features/features-lispflowmapping/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping features-lispflowmapping - 1.19.0-SNAPSHOT + 1.19.0 feature diff --git a/features/odl-lispflowmapping-inmemorydb/pom.xml b/features/odl-lispflowmapping-inmemorydb/pom.xml index ee89eb51..033ec762 100644 --- a/features/odl-lispflowmapping-inmemorydb/pom.xml +++ b/features/odl-lispflowmapping-inmemorydb/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-inmemorydb - 1.19.0-SNAPSHOT + 1.19.0 feature diff --git a/features/odl-lispflowmapping-mappingservice-shell/pom.xml b/features/odl-lispflowmapping-mappingservice-shell/pom.xml index 25b9be50..564aa261 100644 --- a/features/odl-lispflowmapping-mappingservice-shell/pom.xml +++ b/features/odl-lispflowmapping-mappingservice-shell/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-mappingservice-shell - 1.19.0-SNAPSHOT + 1.19.0 feature diff --git a/features/odl-lispflowmapping-mappingservice/pom.xml b/features/odl-lispflowmapping-mappingservice/pom.xml index a4ff0c27..2cdd72a7 100644 --- a/features/odl-lispflowmapping-mappingservice/pom.xml +++ b/features/odl-lispflowmapping-mappingservice/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-mappingservice - 1.19.0-SNAPSHOT + 1.19.0 feature @@ -29,7 +29,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.0-SNAPSHOT + 7.0.0 import pom diff --git a/features/odl-lispflowmapping-models/pom.xml b/features/odl-lispflowmapping-models/pom.xml index d73bc7c9..5cb0ca09 100644 --- a/features/odl-lispflowmapping-models/pom.xml +++ b/features/odl-lispflowmapping-models/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-models - 1.19.0-SNAPSHOT + 1.19.0 feature diff --git a/features/odl-lispflowmapping-msmr/pom.xml b/features/odl-lispflowmapping-msmr/pom.xml index 1cc384fa..fdaf8658 100644 --- a/features/odl-lispflowmapping-msmr/pom.xml +++ b/features/odl-lispflowmapping-msmr/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-msmr - 1.19.0-SNAPSHOT + 1.19.0 feature diff --git a/features/odl-lispflowmapping-southbound/pom.xml b/features/odl-lispflowmapping-southbound/pom.xml index a4bdfc5f..5703cf88 100644 --- a/features/odl-lispflowmapping-southbound/pom.xml +++ b/features/odl-lispflowmapping-southbound/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping odl-lispflowmapping-southbound - 1.19.0-SNAPSHOT + 1.19.0 feature @@ -36,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.netconf netconf-artifacts - 7.0.0-SNAPSHOT + 7.0.0 import pom diff --git a/features/pom.xml b/features/pom.xml index 572b5022..6ed01f33 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping features-aggregator - 1.19.0-SNAPSHOT + 1.19.0 pom diff --git a/integrationtest/pom.xml b/integrationtest/pom.xml index 110b90c9..5ea87bf6 100644 --- a/integrationtest/pom.xml +++ b/integrationtest/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html 4.0.0 org.opendaylight.lispflowmapping mappingservice.integrationtest - 1.19.0-SNAPSHOT + 1.19.0 bundle @@ -28,7 +28,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html false org.opendaylight.lispflowmapping lispflowmapping-karaf - 1.19.0-SNAPSHOT + 1.19.0 zip diff --git a/lispflowmapping-karaf/pom.xml b/lispflowmapping-karaf/pom.xml index d248fa57..2dc16d4b 100644 --- a/lispflowmapping-karaf/pom.xml +++ b/lispflowmapping-karaf/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping lispflowmapping-karaf - 1.19.0-SNAPSHOT + 1.19.0 ODL :: lispflowmapping :: ${project.artifactId} diff --git a/mappingservice/api/pom.xml b/mappingservice/api/pom.xml index 3a696d57..7db5c3a8 100644 --- a/mappingservice/api/pom.xml +++ b/mappingservice/api/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.lispflowmapping mappingservice.api - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/mappingservice/config/pom.xml b/mappingservice/config/pom.xml index 201458de..74d1e793 100644 --- a/mappingservice/config/pom.xml +++ b/mappingservice/config/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.config @@ -22,7 +22,7 @@ org.opendaylight.lispflowmapping mappingservice.api - 1.19.0-SNAPSHOT + 1.19.0 diff --git a/mappingservice/dsbackend/pom.xml b/mappingservice/dsbackend/pom.xml index 31b5abb4..ca0a3b6d 100644 --- a/mappingservice/dsbackend/pom.xml +++ b/mappingservice/dsbackend/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.dsbackend diff --git a/mappingservice/implementation/pom.xml b/mappingservice/implementation/pom.xml index 2692504c..c9d0f7b9 100644 --- a/mappingservice/implementation/pom.xml +++ b/mappingservice/implementation/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.implementation diff --git a/mappingservice/inmemorydb/pom.xml b/mappingservice/inmemorydb/pom.xml index 88605768..7759c90c 100644 --- a/mappingservice/inmemorydb/pom.xml +++ b/mappingservice/inmemorydb/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.inmemorydb diff --git a/mappingservice/lisp-proto/pom.xml b/mappingservice/lisp-proto/pom.xml index e1bdc8ea..b847109a 100644 --- a/mappingservice/lisp-proto/pom.xml +++ b/mappingservice/lisp-proto/pom.xml @@ -18,7 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.lispflowmapping mappingservice.lisp-proto - 1.19.0-SNAPSHOT + 1.19.0 bundle diff --git a/mappingservice/mapcache/pom.xml b/mappingservice/mapcache/pom.xml index fc0c9825..fb72e707 100644 --- a/mappingservice/mapcache/pom.xml +++ b/mappingservice/mapcache/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.mapcache diff --git a/mappingservice/pom.xml b/mappingservice/pom.xml index 3395f56c..b79b55ad 100644 --- a/mappingservice/pom.xml +++ b/mappingservice/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 pom diff --git a/mappingservice/shell/pom.xml b/mappingservice/shell/pom.xml index 521df467..245485aa 100644 --- a/mappingservice/shell/pom.xml +++ b/mappingservice/shell/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.shell diff --git a/mappingservice/southbound/pom.xml b/mappingservice/southbound/pom.xml index 91ef7ee8..e48c4c13 100644 --- a/mappingservice/southbound/pom.xml +++ b/mappingservice/southbound/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping mappingservice-parent - 1.19.0-SNAPSHOT + 1.19.0 mappingservice.southbound diff --git a/pom.xml b/pom.xml index 95509236..a2dad7de 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.lispflowmapping lispflowmapping-commons - 1.19.0-SNAPSHOT + 1.19.0 commons/parent -- 2.43.0