From 4b59df006c79ffb8119152e5a8bc6aadd276c031 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 2 Apr 2020 14:15:52 +0200 Subject: [PATCH] Bump odlparent/yangtools/mdsal Update upstream references to: - odlparent-7.0.1 - yangtools-5.0.0-SNAPSHOT - mdsal-6.0.0-SNAPSHOT Also adjust the codebase to match changes in yangtools/mdsal and scala-2.13. Change-Id: Ib082e955b5106fa002522dfe3d7a21fe990006d8 Signed-off-by: Robert Varga --- benchmark/api/pom.xml | 2 +- benchmark/artifacts/pom.xml | 2 +- benchmark/dsbenchmark/pom.xml | 2 +- .../dsbenchmark/BaListBuilder.java | 14 +++-- .../dsbenchmark/DsbenchmarkProvider.java | 5 +- .../dsbenchmark/simpletx/SimpletxBaRead.java | 2 +- .../dsbenchmark/txchain/TxchainBaRead.java | 2 +- benchmark/ntfbenchmark/pom.xml | 2 +- .../impl/AbstractNtfbenchProducer.java | 12 ++-- benchmark/pom.xml | 2 +- benchmark/rpcbenchmark/pom.xml | 2 +- .../impl/GlobalBindingRTCClient.java | 15 +++-- .../impl/RoutedBindingRTClient.java | 13 ++-- docs/pom.xml | 6 +- .../features-mdsal-benchmark/pom.xml | 2 +- features/benchmark/odl-benchmark-api/pom.xml | 4 +- features/benchmark/odl-dsbenchmark/pom.xml | 2 +- .../benchmark/odl-mdsal-benchmark/pom.xml | 2 +- features/benchmark/odl-ntfbenchmark/pom.xml | 2 +- features/benchmark/pom.xml | 2 +- .../features-config-netty/pom.xml | 2 +- .../config-netty/odl-config-netty/pom.xml | 2 +- .../src/main/feature/feature.xml | 2 +- features/config-netty/pom.xml | 2 +- features/extras/features-extras/pom.xml | 2 +- features/extras/odl-extras-all/pom.xml | 2 +- features/extras/odl-jolokia/pom.xml | 2 +- features/extras/pom.xml | 2 +- features/mdsal/features-mdsal/pom.xml | 2 +- .../mdsal/odl-clustering-test-app/pom.xml | 4 +- .../mdsal/odl-controller-blueprint/pom.xml | 6 +- .../src/main/feature/feature.xml | 8 +-- .../mdsal/odl-controller-mdsal-common/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-controller-model-topology/pom.xml | 4 +- features/mdsal/odl-mdsal-broker-local/pom.xml | 6 +- .../src/main/feature/feature.xml | 8 +-- features/mdsal/odl-mdsal-broker/pom.xml | 4 +- .../src/main/feature/feature.xml | 4 +- .../odl-mdsal-clustering-commons/pom.xml | 4 +- .../src/main/feature/feature.xml | 16 ++--- .../odl-mdsal-distributed-datastore/pom.xml | 6 +- .../src/main/feature/feature.xml | 10 +-- .../mdsal/odl-mdsal-model-inventory/pom.xml | 4 +- .../odl-mdsal-remoterpc-connector/pom.xml | 2 +- .../mdsal/odl-message-bus-collector/pom.xml | 4 +- features/mdsal/odl-toaster/pom.xml | 4 +- features/mdsal/pom.xml | 2 +- features/pom.xml | 2 +- karaf/pom.xml | 4 +- .../resources/archetype-resources/pom.xml | 2 +- opendaylight/archetypes/pom.xml | 2 +- opendaylight/blueprint/pom.xml | 17 +++-- .../controller/blueprint/ext/RpcUtil.java | 2 +- ...ataStoreAppConfigDefaultXMLReaderTest.java | 6 +- opendaylight/commons/jolokia/pom.xml | 2 +- opendaylight/config/config-artifacts/pom.xml | 2 +- opendaylight/config/pom.xml | 2 +- opendaylight/md-sal/cds-access-api/pom.xml | 4 +- opendaylight/md-sal/cds-access-client/pom.xml | 4 +- opendaylight/md-sal/cds-dom-api/pom.xml | 2 +- opendaylight/md-sal/mdsal-artifacts/pom.xml | 2 +- opendaylight/md-sal/mdsal-it-base/pom.xml | 4 +- opendaylight/md-sal/mdsal-it-parent/pom.xml | 2 +- .../messagebus/app/impl/EventSourceTopic.java | 25 +++----- .../app/impl/EventSourceTopologyTest.java | 20 +++--- opendaylight/md-sal/parent/pom.xml | 2 +- opendaylight/md-sal/pom.xml | 2 +- opendaylight/md-sal/sal-akka-raft/pom.xml | 12 ++-- .../cluster/raft/utils/InMemoryJournal.java | 37 ++++++----- .../md-sal/sal-akka-segmented-journal/pom.xml | 10 +-- .../segjournal/SegmentedJournalActor.java | 8 +-- .../md-sal/sal-cluster-admin-impl/pom.xml | 4 +- .../admin/ClusterAdminRpcService.java | 63 +++++++++++-------- .../admin/ClusterAdminRpcServiceTest.java | 6 +- .../md-sal/sal-clustering-commons/pom.xml | 16 ++--- .../md-sal/sal-clustering-config/pom.xml | 2 +- .../QueuedNotificationManagerMXBeanImpl.java | 52 --------------- .../jmx/QueuedNotificationManagerStats.java | 44 ------------- .../md-sal/sal-distributed-datastore/pom.xml | 26 +++++--- .../cluster/datastore/AbstractDataStore.java | 10 +-- .../DatastoreContextIntrospectorFactory.java | 33 ++++------ .../blueprint/clustered-datastore.xml | 11 ++-- .../DatastoreContextIntrospectorTest.java | 34 ++-------- .../cluster/datastore/IntegrationTestKit.java | 21 ++++--- .../cluster/datastore/MemberNode.java | 6 +- .../datastore/TransactionProxyTest.java | 8 +-- .../AbstractModificationTest.java | 7 +-- .../datastore/utils/MockClusterWrapper.java | 16 ++--- .../utils/NormalizedNodeAggregatorTest.java | 14 ++--- .../md/cluster/datastore/model/TestModel.java | 4 +- .../md-sal/sal-distributed-eos/pom.xml | 2 +- ...DistributedEntityOwnershipServiceTest.java | 2 +- .../cluster/entityownership/EOSTestUtils.java | 4 +- .../sal-dummy-distributed-datastore/pom.xml | 14 ++--- .../md-sal/sal-remoterpc-connector/pom.xml | 14 ++--- .../test/model/util/ListsBindingUtils.java | 19 +++--- .../it/listener/PeopleCarListener.java | 2 +- .../it/provider/PeopleProvider.java | 2 +- .../md-sal/samples/toaster-provider/pom.xml | 16 +++-- opendaylight/model/model-inventory/pom.xml | 2 +- opendaylight/model/model-topology/pom.xml | 2 +- opendaylight/model/pom.xml | 2 +- pom.xml | 2 +- 104 files changed, 373 insertions(+), 479 deletions(-) delete mode 100644 opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java delete mode 100644 opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerStats.java diff --git a/benchmark/api/pom.xml b/benchmark/api/pom.xml index ba72d2fed2..575c0fa10f 100644 --- a/benchmark/api/pom.xml +++ b/benchmark/api/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/benchmark/artifacts/pom.xml b/benchmark/artifacts/pom.xml index c8ac30a59f..d6ad5854b4 100644 --- a/benchmark/artifacts/pom.xml +++ b/benchmark/artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/benchmark/dsbenchmark/pom.xml b/benchmark/dsbenchmark/pom.xml index d6c355b160..1dae6f65e6 100644 --- a/benchmark/dsbenchmark/pom.xml +++ b/benchmark/dsbenchmark/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/BaListBuilder.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/BaListBuilder.java index 8378e8b3c8..e6c9548d5f 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/BaListBuilder.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/BaListBuilder.java @@ -7,8 +7,11 @@ */ package org.opendaylight.dsbenchmark; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import java.util.ArrayList; import java.util.List; +import java.util.Map; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.OuterList; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.OuterListBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.OuterListKey; @@ -33,17 +36,18 @@ public final class BaListBuilder { return outerList; } - private static List buildInnerList(final int index, final int elements) { - List innerList = new ArrayList<>(elements); + private static Map buildInnerList(final int index, final int elements) { + Builder innerList = ImmutableMap.builderWithExpectedSize(elements); final String itemStr = "Item-" + String.valueOf(index) + "-"; for (int i = 0; i < elements; i++) { - innerList.add(new InnerListBuilder() - .withKey(new InnerListKey(i)) + final InnerListKey key = new InnerListKey(i); + innerList.put(key, new InnerListBuilder() + .withKey(key) .setName(i) .setValue(itemStr + String.valueOf(i)) .build()); } - return innerList; + return innerList.build(); } } diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/DsbenchmarkProvider.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/DsbenchmarkProvider.java index 1315f1d794..eea490a3c7 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/DsbenchmarkProvider.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/DsbenchmarkProvider.java @@ -41,7 +41,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchm import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestStatus; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestStatus.ExecStatus; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestStatusBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.test.exec.OuterList; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; @@ -182,9 +181,7 @@ public class DsbenchmarkProvider implements DsbenchmarkService, AutoCloseable { } private void cleanupTestStore() { - TestExec data = new TestExecBuilder() - .setOuterList(Collections.emptyList()) - .build(); + TestExec data = new TestExecBuilder().setOuterList(Collections.emptyMap()).build(); WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); tx.put(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID, data); diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxBaRead.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxBaRead.java index 078fe03d68..aae96750a9 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxBaRead.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/simpletx/SimpletxBaRead.java @@ -68,7 +68,7 @@ public class SimpletxBaRead extends DatastoreAbstractWriter { String[] objectsArray = new String[outerList.getInnerList().size()]; - for (InnerList innerList : outerList.getInnerList()) { + for (InnerList innerList : outerList.getInnerList().values()) { if (objectsArray[innerList.getName()] != null) { LOG.error("innerList: DUPLICATE name: {}, value: {}", innerList.getName(), innerList.getValue()); diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaRead.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaRead.java index 101ae39b96..414ad159af 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaRead.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaRead.java @@ -67,7 +67,7 @@ public class TxchainBaRead extends DatastoreAbstractWriter implements Transactio OuterList outerList = optionalDataObject.get(); String[] objectsArray = new String[outerList.getInnerList().size()]; - for (InnerList innerList : outerList.getInnerList()) { + for (InnerList innerList : outerList.getInnerList().values()) { if (objectsArray[innerList.getName()] != null) { LOG.error("innerList: DUPLICATE name: {}, value: {}", innerList.getName(), innerList.getValue()); diff --git a/benchmark/ntfbenchmark/pom.xml b/benchmark/ntfbenchmark/pom.xml index 119aec7dac..c88d68752b 100644 --- a/benchmark/ntfbenchmark/pom.xml +++ b/benchmark/ntfbenchmark/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/AbstractNtfbenchProducer.java b/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/AbstractNtfbenchProducer.java index e9371cb665..59843e7618 100644 --- a/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/AbstractNtfbenchProducer.java +++ b/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/AbstractNtfbenchProducer.java @@ -7,13 +7,14 @@ */ package ntfbenchmark.impl; -import java.util.ArrayList; -import java.util.List; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbench.payload.rev150709.Ntfbench; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbench.payload.rev150709.NtfbenchBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbench.payload.rev150709.payload.Payload; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbench.payload.rev150709.payload.PayloadBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbench.payload.rev150709.payload.PayloadKey; public abstract class AbstractNtfbenchProducer implements Runnable { protected final NotificationPublishService publishService; @@ -46,11 +47,12 @@ public abstract class AbstractNtfbenchProducer implements Runnable { this.publishService = publishService; this.iterations = iterations; - final List listVals = new ArrayList<>(); + final Builder listVals = ImmutableMap.builderWithExpectedSize(payloadSize); for (int i = 0; i < payloadSize; i++) { - listVals.add(new PayloadBuilder().setId(i).build()); + final PayloadKey key = new PayloadKey(i); + listVals.put(key, new PayloadBuilder().withKey(key).build()); } - ntf = new NtfbenchBuilder().setPayload(listVals).build(); + ntf = new NtfbenchBuilder().setPayload(listVals.build()).build(); } } diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 57fd3ae56f..f9ec2fd058 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 org.opendaylight.controller diff --git a/benchmark/rpcbenchmark/pom.xml b/benchmark/rpcbenchmark/pom.xml index 21d2427600..d85422f521 100644 --- a/benchmark/rpcbenchmark/pom.xml +++ b/benchmark/rpcbenchmark/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/GlobalBindingRTCClient.java b/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/GlobalBindingRTCClient.java index 692bdf7d09..bbbf309d88 100644 --- a/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/GlobalBindingRTCClient.java +++ b/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/GlobalBindingRTCClient.java @@ -7,8 +7,9 @@ */ package rpcbenchmark.impl; -import java.util.ArrayList; -import java.util.List; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; +import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicLong; @@ -19,6 +20,7 @@ import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.GlobalRpcBenchOut import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.RpcbenchPayloadService; import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.Payload; import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.PayloadBuilder; +import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.PayloadKey; import org.opendaylight.yangtools.yang.common.RpcResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,11 +52,12 @@ public class GlobalBindingRTCClient implements RTCClient { } this.inSize = inSize; - List listVals = new ArrayList<>(); + Builder listVals = ImmutableMap.builderWithExpectedSize(inSize); for (int i = 0; i < inSize; i++) { - listVals.add(new PayloadBuilder().setId(i).build()); + final PayloadKey key = new PayloadKey(i); + listVals.put(key, new PayloadBuilder().withKey(key).build()); } - inVal = new GlobalRpcBenchInputBuilder().setPayload(listVals).build(); + inVal = new GlobalRpcBenchInputBuilder().setPayload(listVals.build()).build(); } @Override @@ -68,7 +71,7 @@ public class GlobalBindingRTCClient implements RTCClient { RpcResult rpcResult = output.get(); if (rpcResult.isSuccessful()) { - List retVal = rpcResult.getResult().getPayload(); + Map retVal = rpcResult.getResult().getPayload(); if (retVal.size() == inSize) { ok++; } diff --git a/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RoutedBindingRTClient.java b/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RoutedBindingRTClient.java index ab03fb2a5e..a7cb4bf30c 100644 --- a/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RoutedBindingRTClient.java +++ b/benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RoutedBindingRTClient.java @@ -7,8 +7,11 @@ */ package rpcbenchmark.impl; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.ThreadLocalRandom; @@ -20,6 +23,7 @@ import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.RoutedRpcBenchOut import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.RpcbenchPayloadService; import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.Payload; import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.PayloadBuilder; +import org.opendaylight.yang.gen.v1.rpcbench.payload.rev150702.payload.PayloadKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.RpcResult; import org.slf4j.Logger; @@ -43,13 +47,14 @@ public class RoutedBindingRTClient implements RTCClient { this.inSize = inSize; this.inVal = new ArrayList<>(); - List listVals = new ArrayList<>(); + Builder listVals = ImmutableMap.builderWithExpectedSize(inSize); for (int i = 0; i < inSize; i++) { - listVals.add(new PayloadBuilder().setId(i).build()); + final PayloadKey key = new PayloadKey(i); + listVals.put(key, new PayloadBuilder().withKey(key).build()); } for (InstanceIdentifier iid : routeIid) { - inVal.add(new RoutedRpcBenchInputBuilder().setNode(iid).setPayload(listVals).build()); + inVal.add(new RoutedRpcBenchInputBuilder().setNode(iid).setPayload(listVals.build()).build()); } } @@ -77,7 +82,7 @@ public class RoutedBindingRTClient implements RTCClient { RpcResult rpcResult = output.get(); if (rpcResult.isSuccessful()) { - List retVal = rpcResult.getResult().getPayload(); + Map retVal = rpcResult.getResult().getPayload(); if (retVal.size() == inSize) { ok++; } diff --git a/docs/pom.xml b/docs/pom.xml index ef2e18bdd5..4002224054 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent - 6.0.4 + 7.0.1 @@ -241,8 +241,8 @@ https://commons.apache.org/proper/commons-lang/javadocs/api-3.9/ https://commons.apache.org/proper/commons-codec/apidocs/ - https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/4.0.6/ - https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/5.0.9/ + https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/5.0.0-SNAPSHOT/ + https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/6.0.0-SNAPSHOT/ diff --git a/features/benchmark/features-mdsal-benchmark/pom.xml b/features/benchmark/features-mdsal-benchmark/pom.xml index dff563c361..21db10a64c 100644 --- a/features/benchmark/features-mdsal-benchmark/pom.xml +++ b/features/benchmark/features-mdsal-benchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.4 + 7.0.1 diff --git a/features/benchmark/odl-benchmark-api/pom.xml b/features/benchmark/odl-benchmark-api/pom.xml index 96fb39e6f1..2f9b0286b2 100644 --- a/features/benchmark/odl-benchmark-api/pom.xml +++ b/features/benchmark/odl-benchmark-api/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -27,7 +27,7 @@ org.opendaylight.mdsal odl-mdsal-binding-base - 5.0.9 + 6.0.0-SNAPSHOT xml features diff --git a/features/benchmark/odl-dsbenchmark/pom.xml b/features/benchmark/odl-dsbenchmark/pom.xml index a2d2c4a576..af689525eb 100644 --- a/features/benchmark/odl-dsbenchmark/pom.xml +++ b/features/benchmark/odl-dsbenchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/benchmark/odl-mdsal-benchmark/pom.xml b/features/benchmark/odl-mdsal-benchmark/pom.xml index d9f7e33401..1d971bcd8d 100644 --- a/features/benchmark/odl-mdsal-benchmark/pom.xml +++ b/features/benchmark/odl-mdsal-benchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/benchmark/odl-ntfbenchmark/pom.xml b/features/benchmark/odl-ntfbenchmark/pom.xml index 2950cdce3e..ddc539bf94 100644 --- a/features/benchmark/odl-ntfbenchmark/pom.xml +++ b/features/benchmark/odl-ntfbenchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/benchmark/pom.xml b/features/benchmark/pom.xml index 9d7e8fa0e3..b158af9ccc 100644 --- a/features/benchmark/pom.xml +++ b/features/benchmark/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 org.opendaylight.controller diff --git a/features/config-netty/features-config-netty/pom.xml b/features/config-netty/features-config-netty/pom.xml index dc8d3782ab..dbad156f97 100644 --- a/features/config-netty/features-config-netty/pom.xml +++ b/features/config-netty/features-config-netty/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.4 + 7.0.1 diff --git a/features/config-netty/odl-config-netty/pom.xml b/features/config-netty/odl-config-netty/pom.xml index 90c22aed92..11eaf17ee5 100644 --- a/features/config-netty/odl-config-netty/pom.xml +++ b/features/config-netty/odl-config-netty/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/config-netty/odl-config-netty/src/main/feature/feature.xml b/features/config-netty/odl-config-netty/src/main/feature/feature.xml index 50a2289c13..cebeab5dbe 100644 --- a/features/config-netty/odl-config-netty/src/main/feature/feature.xml +++ b/features/config-netty/odl-config-netty/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-netty-4 + odl-netty-4 diff --git a/features/config-netty/pom.xml b/features/config-netty/pom.xml index 105f845cb4..b7a246cba6 100644 --- a/features/config-netty/pom.xml +++ b/features/config-netty/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/features/extras/features-extras/pom.xml b/features/extras/features-extras/pom.xml index 5d44dd98b0..cc7a5f9dcf 100644 --- a/features/extras/features-extras/pom.xml +++ b/features/extras/features-extras/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.4 + 7.0.1 diff --git a/features/extras/odl-extras-all/pom.xml b/features/extras/odl-extras-all/pom.xml index 3cbeed5d2a..79ef99ca49 100644 --- a/features/extras/odl-extras-all/pom.xml +++ b/features/extras/odl-extras-all/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/extras/odl-jolokia/pom.xml b/features/extras/odl-jolokia/pom.xml index bc7d00cab1..0e0f06776c 100644 --- a/features/extras/odl-jolokia/pom.xml +++ b/features/extras/odl-jolokia/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/extras/pom.xml b/features/extras/pom.xml index a45b07a348..aff681aefc 100644 --- a/features/extras/pom.xml +++ b/features/extras/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/features/mdsal/features-mdsal/pom.xml b/features/mdsal/features-mdsal/pom.xml index 96a009fee2..bf1044cd22 100644 --- a/features/mdsal/features-mdsal/pom.xml +++ b/features/mdsal/features-mdsal/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.4 + 7.0.1 diff --git a/features/mdsal/odl-clustering-test-app/pom.xml b/features/mdsal/odl-clustering-test-app/pom.xml index b35bb1f140..ff1cb8985e 100644 --- a/features/mdsal/odl-clustering-test-app/pom.xml +++ b/features/mdsal/odl-clustering-test-app/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -26,7 +26,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT import pom diff --git a/features/mdsal/odl-controller-blueprint/pom.xml b/features/mdsal/odl-controller-blueprint/pom.xml index 7363c3cc4d..4ae53e5ffd 100644 --- a/features/mdsal/odl-controller-blueprint/pom.xml +++ b/features/mdsal/odl-controller-blueprint/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -33,14 +33,14 @@ org.opendaylight.yangtools yangtools-artifacts - 4.0.6 + 5.0.0-SNAPSHOT pom import org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-controller-blueprint/src/main/feature/feature.xml b/features/mdsal/odl-controller-blueprint/src/main/feature/feature.xml index 7853ff01d4..5f9f3193f5 100644 --- a/features/mdsal/odl-controller-blueprint/src/main/feature/feature.xml +++ b/features/mdsal/odl-controller-blueprint/src/main/feature/feature.xml @@ -8,10 +8,10 @@ --> - odl-yangtools-codec - odl-mdsal-binding-api - odl-mdsal-binding-runtime - odl-mdsal-dom-api + odl-yangtools-codec + odl-mdsal-binding-api + odl-mdsal-binding-runtime + odl-mdsal-dom-api mvn:org.opendaylight.controller/blueprint/${blueprint.version} diff --git a/features/mdsal/odl-controller-mdsal-common/pom.xml b/features/mdsal/odl-controller-mdsal-common/pom.xml index 24b213cffc..e5a3241f1c 100644 --- a/features/mdsal/odl-controller-mdsal-common/pom.xml +++ b/features/mdsal/odl-controller-mdsal-common/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -28,7 +28,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-controller-mdsal-common/src/main/feature/feature.xml b/features/mdsal/odl-controller-mdsal-common/src/main/feature/feature.xml index f8859f6be3..d4e521703d 100644 --- a/features/mdsal/odl-controller-mdsal-common/src/main/feature/feature.xml +++ b/features/mdsal/odl-controller-mdsal-common/src/main/feature/feature.xml @@ -8,7 +8,7 @@ --> - odl-mdsal-common - odl-mdsal-binding-runtime + odl-mdsal-common + odl-mdsal-binding-runtime diff --git a/features/mdsal/odl-controller-model-topology/pom.xml b/features/mdsal/odl-controller-model-topology/pom.xml index 782f298b59..986b0b7198 100644 --- a/features/mdsal/odl-controller-model-topology/pom.xml +++ b/features/mdsal/odl-controller-model-topology/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -27,7 +27,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-broker-local/pom.xml b/features/mdsal/odl-mdsal-broker-local/pom.xml index 52be60bd37..d34212ad42 100644 --- a/features/mdsal/odl-mdsal-broker-local/pom.xml +++ b/features/mdsal/odl-mdsal-broker-local/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -37,14 +37,14 @@ org.opendaylight.yangtools yangtools-artifacts - 4.0.6 + 5.0.0-SNAPSHOT pom import org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml index af96237bfe..e9c07e4218 100644 --- a/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml @@ -8,9 +8,9 @@ --> - odl-mdsal-dom - odl-mdsal-eos-binding - odl-mdsal-eos-dom - odl-mdsal-singleton-dom + odl-mdsal-dom + odl-mdsal-eos-binding + odl-mdsal-eos-dom + odl-mdsal-singleton-dom diff --git a/features/mdsal/odl-mdsal-broker/pom.xml b/features/mdsal/odl-mdsal-broker/pom.xml index c080cafedf..7fd0568332 100644 --- a/features/mdsal/odl-mdsal-broker/pom.xml +++ b/features/mdsal/odl-mdsal-broker/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -29,7 +29,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml index 68f4daa2f2..55212bf2f2 100644 --- a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml @@ -8,7 +8,7 @@ --> - odl-mdsal-singleton-dom - odl-mdsal-eos-binding + odl-mdsal-singleton-dom + odl-mdsal-eos-binding diff --git a/features/mdsal/odl-mdsal-clustering-commons/pom.xml b/features/mdsal/odl-mdsal-clustering-commons/pom.xml index bcdd4c16a0..e4ff58dd5e 100644 --- a/features/mdsal/odl-mdsal-clustering-commons/pom.xml +++ b/features/mdsal/odl-mdsal-clustering-commons/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -29,7 +29,7 @@ org.opendaylight.yangtools yangtools-artifacts - 4.0.6 + 5.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml index c9627c5997..eae70777bf 100644 --- a/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml @@ -8,13 +8,13 @@ --> - odl-akka-system-2.5 - odl-akka-persistence-2.5 - odl-akka-clustering-2.5 - odl-apache-commons-lang3 - odl-dropwizard-metrics - odl-servlet-api - odl-yangtools-data - odl-yangtools-codec + odl-akka-system-2.5 + odl-akka-persistence-2.5 + odl-akka-clustering-2.5 + odl-apache-commons-lang3 + odl-dropwizard-metrics + odl-servlet-api + odl-yangtools-data + odl-yangtools-codec diff --git a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml index a5d5776867..464f05bbf1 100644 --- a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml +++ b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -29,14 +29,14 @@ org.opendaylight.yangtools yangtools-artifacts - 4.0.6 + 5.0.0-SNAPSHOT pom import org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml index b313b584d9..29a32bd2cf 100644 --- a/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml @@ -8,11 +8,11 @@ --> - odl-apache-commons-text - odl-yangtools-codec - odl-mdsal-eos-dom - odl-mdsal-dom-broker - odl-mdsal-binding-dom-adapter + odl-apache-commons-text + odl-yangtools-codec + odl-mdsal-eos-dom + odl-mdsal-dom-broker + odl-mdsal-binding-dom-adapter mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf diff --git a/features/mdsal/odl-mdsal-model-inventory/pom.xml b/features/mdsal/odl-mdsal-model-inventory/pom.xml index 98ffa73657..9c618e2b20 100644 --- a/features/mdsal/odl-mdsal-model-inventory/pom.xml +++ b/features/mdsal/odl-mdsal-model-inventory/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -28,7 +28,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml index bd894a7913..95540f6654 100644 --- a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml +++ b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 diff --git a/features/mdsal/odl-message-bus-collector/pom.xml b/features/mdsal/odl-message-bus-collector/pom.xml index 6a5ed4db56..6e5bd4e11e 100644 --- a/features/mdsal/odl-message-bus-collector/pom.xml +++ b/features/mdsal/odl-message-bus-collector/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -37,7 +37,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/features/mdsal/odl-toaster/pom.xml b/features/mdsal/odl-toaster/pom.xml index f84e1b6c01..fddf20eb4e 100644 --- a/features/mdsal/odl-toaster/pom.xml +++ b/features/mdsal/odl-toaster/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.4 + 7.0.1 @@ -27,7 +27,7 @@ org.opendaylight.mdsal odl-mdsal-binding-runtime - 5.0.9 + 6.0.0-SNAPSHOT xml features diff --git a/features/mdsal/pom.xml b/features/mdsal/pom.xml index aa189ff938..0660c33429 100644 --- a/features/mdsal/pom.xml +++ b/features/mdsal/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/features/pom.xml b/features/pom.xml index 6e2ddd2891..9777cc7de3 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/karaf/pom.xml b/karaf/pom.xml index 5e2a88d5b4..2d7e8e6c5e 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent karaf4-parent - 6.0.4 + 7.0.1 @@ -55,7 +55,7 @@ org.opendaylight.mdsal features-mdsal - 5.0.9 + 6.0.0-SNAPSHOT features xml runtime diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml index 2515638e18..c431fccf0e 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/archetypes/pom.xml b/opendaylight/archetypes/pom.xml index 4fb0bb529e..92c8cef9aa 100644 --- a/opendaylight/archetypes/pom.xml +++ b/opendaylight/archetypes/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index 8b3011f97f..a4bcc1a28d 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent bundle-parent - 6.0.4 + 7.0.1 @@ -27,7 +27,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import @@ -41,7 +41,7 @@ org.opendaylight.yangtools yangtools-artifacts - 4.0.6 + 5.0.0-SNAPSHOT pom import @@ -61,7 +61,6 @@ org.apache.aries org.apache.aries.util - 1.1.3 org.opendaylight.mdsal @@ -121,6 +120,16 @@ mdsal-binding-dom-adapter test + + org.opendaylight.mdsal + mdsal-binding-generator-impl + test + + + org.opendaylight.mdsal + mdsal-binding-runtime-spi + test + diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RpcUtil.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RpcUtil.java index 97b816d567..7ecc14e636 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RpcUtil.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RpcUtil.java @@ -40,7 +40,7 @@ final class RpcUtil { "Module not found in SchemaContext: " + moduleName + "; service: " + service)); LOG.debug("Resolved service {} to module {}", service, module); - final Collection rpcs = module.getRpcs(); + final Collection rpcs = module.getRpcs(); final Collection ret = new ArrayList<>(rpcs.size()); for (RpcDefinition rpc : rpcs) { final RpcRoutingStrategy strategy = RpcRoutingStrategy.from(rpc); diff --git a/opendaylight/blueprint/src/test/java/org/opendaylight/controller/blueprint/tests/DataStoreAppConfigDefaultXMLReaderTest.java b/opendaylight/blueprint/src/test/java/org/opendaylight/controller/blueprint/tests/DataStoreAppConfigDefaultXMLReaderTest.java index a1cf3d729b..6407efa949 100644 --- a/opendaylight/blueprint/src/test/java/org/opendaylight/controller/blueprint/tests/DataStoreAppConfigDefaultXMLReaderTest.java +++ b/opendaylight/blueprint/src/test/java/org/opendaylight/controller/blueprint/tests/DataStoreAppConfigDefaultXMLReaderTest.java @@ -27,10 +27,10 @@ public class DataStoreAppConfigDefaultXMLReaderTest extends AbstractConcurrentDa Lists lists = new DataStoreAppConfigDefaultXMLReader<>( getClass(), "/opendaylight-sal-test-store-config.xml", getDataBrokerTestCustomizer().getSchemaService(), - getDataBrokerTestCustomizer().getBindingToNormalized(), + getDataBrokerTestCustomizer().getAdapterContext().currentSerializer(), Lists.class).createDefaultInstance(); - UnorderedList element = lists.getUnorderedContainer().getUnorderedList().get(0); + UnorderedList element = lists.getUnorderedContainer().getUnorderedList().values().iterator().next(); assertThat(element.getName()).isEqualTo("someName"); assertThat(element.getValue()).isEqualTo("someValue"); } @@ -40,7 +40,7 @@ public class DataStoreAppConfigDefaultXMLReaderTest extends AbstractConcurrentDa new DataStoreAppConfigDefaultXMLReader<>( getClass(), "/badname.xml", getDataBrokerTestCustomizer().getSchemaService(), - getDataBrokerTestCustomizer().getBindingToNormalized(), + getDataBrokerTestCustomizer().getAdapterContext().currentSerializer(), Lists.class).createDefaultInstance(); } } diff --git a/opendaylight/commons/jolokia/pom.xml b/opendaylight/commons/jolokia/pom.xml index 87781c821a..9398791619 100644 --- a/opendaylight/commons/jolokia/pom.xml +++ b/opendaylight/commons/jolokia/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent - 6.0.4 + 7.0.1 diff --git a/opendaylight/config/config-artifacts/pom.xml b/opendaylight/config/config-artifacts/pom.xml index 3ba45572c2..d48906b495 100644 --- a/opendaylight/config/config-artifacts/pom.xml +++ b/opendaylight/config/config-artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/config/pom.xml b/opendaylight/config/pom.xml index baf094ba38..3cac66fb35 100644 --- a/opendaylight/config/pom.xml +++ b/opendaylight/config/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/opendaylight/md-sal/cds-access-api/pom.xml b/opendaylight/md-sal/cds-access-api/pom.xml index 775cf8bc6c..5623584dbd 100644 --- a/opendaylight/md-sal/cds-access-api/pom.xml +++ b/opendaylight/md-sal/cds-access-api/pom.xml @@ -17,7 +17,7 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 @@ -42,7 +42,7 @@ com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test diff --git a/opendaylight/md-sal/cds-access-client/pom.xml b/opendaylight/md-sal/cds-access-client/pom.xml index 9e1fa7a4d0..b4985d19c1 100644 --- a/opendaylight/md-sal/cds-access-client/pom.xml +++ b/opendaylight/md-sal/cds-access-client/pom.xml @@ -21,7 +21,7 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 @@ -39,7 +39,7 @@ com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test diff --git a/opendaylight/md-sal/cds-dom-api/pom.xml b/opendaylight/md-sal/cds-dom-api/pom.xml index 842546a5ef..33f2829567 100644 --- a/opendaylight/md-sal/cds-dom-api/pom.xml +++ b/opendaylight/md-sal/cds-dom-api/pom.xml @@ -17,7 +17,7 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 diff --git a/opendaylight/md-sal/mdsal-artifacts/pom.xml b/opendaylight/md-sal/mdsal-artifacts/pom.xml index e89e1d1ad9..6361ef7434 100644 --- a/opendaylight/md-sal/mdsal-artifacts/pom.xml +++ b/opendaylight/md-sal/mdsal-artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/md-sal/mdsal-it-base/pom.xml b/opendaylight/md-sal/mdsal-it-base/pom.xml index 9754c93f9b..946065ce08 100644 --- a/opendaylight/md-sal/mdsal-it-base/pom.xml +++ b/opendaylight/md-sal/mdsal-it-base/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 6.0.4 + 7.0.1 4.0.0 @@ -26,7 +26,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 5.0.9 + 6.0.0-SNAPSHOT pom import diff --git a/opendaylight/md-sal/mdsal-it-parent/pom.xml b/opendaylight/md-sal/mdsal-it-parent/pom.xml index 1529d23870..72eb79c886 100644 --- a/opendaylight/md-sal/mdsal-it-parent/pom.xml +++ b/opendaylight/md-sal/mdsal-it-parent/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 6.0.4 + 7.0.1 diff --git a/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopic.java b/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopic.java index 6c9e17b5bf..2deb3570f6 100644 --- a/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopic.java +++ b/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopic.java @@ -9,12 +9,10 @@ package org.opendaylight.controller.messagebus.app.impl; import static java.util.Objects.requireNonNull; +import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import java.util.Collection; -import java.util.List; import java.util.Optional; import java.util.UUID; import java.util.concurrent.CopyOnWriteArraySet; @@ -116,31 +114,26 @@ public final class EventSourceTopic implements DataTreeChangeListener, Aut LOG.debug("Notify existing nodes"); final Pattern nodeRegex = this.nodeIdPattern; - final ReadTransaction tx = eventSourceTopology.getDataBroker().newReadOnlyTransaction(); - final ListenableFuture> future = - tx.read(LogicalDatastoreType.OPERATIONAL, EventSourceTopology.EVENT_SOURCE_TOPOLOGY_PATH); + final FluentFuture> future; + try (ReadTransaction tx = eventSourceTopology.getDataBroker().newReadOnlyTransaction()) { + future = tx.read(LogicalDatastoreType.OPERATIONAL, EventSourceTopology.EVENT_SOURCE_TOPOLOGY_PATH); + } - Futures.addCallback(future, new FutureCallback>() { + future.addCallback(new FutureCallback>() { @Override public void onSuccess(final Optional data) { if (data.isPresent()) { - final List nodes = data.get().getNode(); - if (nodes != null) { - for (final Node node : nodes) { - if (nodeRegex.matcher(node.getNodeId().getValue()).matches()) { - notifyNode(EventSourceTopology.EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class, - node.key())); - } + for (final Node node : data.get().nonnullNode().values()) { + if (nodeRegex.matcher(node.getNodeId().getValue()).matches()) { + notifyNode(EventSourceTopology.EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class, node.key())); } } } - tx.close(); } @Override public void onFailure(final Throwable ex) { LOG.error("Can not notify existing nodes", ex); - tx.close(); } }, MoreExecutors.directExecutor()); } diff --git a/opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java b/opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java index ce3e52de2b..868dd9d740 100644 --- a/opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java +++ b/opendaylight/md-sal/messagebus-impl/src/test/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopologyTest.java @@ -17,8 +17,6 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import com.google.common.util.concurrent.FluentFuture; -import java.util.ArrayList; -import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -43,6 +41,7 @@ import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.even import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.concepts.ObjectRegistration; @@ -58,7 +57,6 @@ public class EventSourceTopologyTest { RpcConsumerRegistry rpcServiceMock; CreateTopicInput createTopicInputMock; ListenerRegistration listenerRegistrationMock; - NodeKey nodeKey; ObjectRegistration aggregatorRpcReg; @Before @@ -131,13 +129,9 @@ public class EventSourceTopologyTest { Topology topologyMock = mock(Topology.class); doReturn(Optional.of(topologyMock)).when(checkedFutureMock).get(); - Node nodeMock = mock(Node.class); - List nodeList = new ArrayList<>(); - nodeList.add(nodeMock); - doReturn(nodeList).when(topologyMock).getNode(); - - NodeId nodeId = new NodeId("nodeIdValue1"); - doReturn(nodeId).when(nodeMock).getNodeId(); + final NodeKey nodeKey = new NodeKey(new NodeId("nodeIdValue1")); + final Node node = new NodeBuilder().withKey(nodeKey).build(); + doReturn(Map.of(nodeKey, node)).when(topologyMock).getNode(); } @Test @@ -160,7 +154,7 @@ public class EventSourceTopologyTest { Node nodeMock = mock(Node.class); EventSource eventSourceMock = mock(EventSource.class); NodeId nodeId = new NodeId("nodeIdValue1"); - nodeKey = new NodeKey(nodeId); + NodeKey nodeKey = new NodeKey(nodeId); doReturn(nodeKey).when(nodeMock).key(); doReturn(nodeKey).when(eventSourceMock).getSourceNodeKey(); ObjectRegistration routedRpcRegistrationMock = mock(ObjectRegistration.class); @@ -176,7 +170,7 @@ public class EventSourceTopologyTest { topicTestHelper(); EventSource eventSourceMock = mock(EventSource.class); NodeId nodeId = new NodeId("nodeIdValue1"); - nodeKey = new NodeKey(nodeId); + NodeKey nodeKey = new NodeKey(nodeId); Map localMap = eventSourceTopology.getRoutedRpcRegistrations(); NodeKey nodeKeyMock = mock(NodeKey.class); doReturn(nodeKeyMock).when(eventSourceMock).getSourceNodeKey(); @@ -192,7 +186,7 @@ public class EventSourceTopologyTest { Node nodeMock = mock(Node.class); EventSource eventSourceMock = mock(EventSource.class); NodeId nodeId = new NodeId("nodeIdValue1"); - nodeKey = new NodeKey(nodeId); + NodeKey nodeKey = new NodeKey(nodeId); doReturn(nodeKey).when(nodeMock).key(); doReturn(nodeKey).when(eventSourceMock).getSourceNodeKey(); ObjectRegistration routedRpcRegistrationMock = mock(ObjectRegistration.class); diff --git a/opendaylight/md-sal/parent/pom.xml b/opendaylight/md-sal/parent/pom.xml index 4957cab90a..6ff0f54b9d 100644 --- a/opendaylight/md-sal/parent/pom.xml +++ b/opendaylight/md-sal/parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index cd65701bcb..9811212658 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/md-sal/sal-akka-raft/pom.xml b/opendaylight/md-sal/sal-akka-raft/pom.xml index 9fa0939816..2d4bde9922 100644 --- a/opendaylight/md-sal/sal-akka-raft/pom.xml +++ b/opendaylight/md-sal/sal-akka-raft/pom.xml @@ -21,27 +21,27 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-cluster_2.12 + akka-cluster_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 com.typesafe.akka - akka-remote_2.12 + akka-remote_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test @@ -62,7 +62,7 @@ com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/InMemoryJournal.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/InMemoryJournal.java index 90aff5b726..f3d4bc6b2a 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/InMemoryJournal.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/InMemoryJournal.java @@ -28,6 +28,7 @@ import org.apache.commons.lang.SerializationUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Future; +import scala.jdk.javaapi.CollectionConverters; /** * An akka AsyncWriteJournal implementation that stores data in memory. This is intended for testing. @@ -40,7 +41,7 @@ public class InMemoryJournal extends AsyncWriteJournal { final CountDownLatch latch; final Class ofType; - WriteMessagesComplete(int count, Class ofType) { + WriteMessagesComplete(final int count, final Class ofType) { this.latch = new CountDownLatch(count); this.ofType = ofType; } @@ -56,11 +57,11 @@ public class InMemoryJournal extends AsyncWriteJournal { private static final Map BLOCK_READ_MESSAGES_LATCHES = new ConcurrentHashMap<>(); - private static Object deserialize(Object data) { + private static Object deserialize(final Object data) { return data instanceof byte[] ? SerializationUtils.deserialize((byte[])data) : data; } - public static void addEntry(String persistenceId, long sequenceNr, Object data) { + public static void addEntry(final String persistenceId, final long sequenceNr, final Object data) { Map journal = JOURNALS.computeIfAbsent(persistenceId, k -> new LinkedHashMap<>()); synchronized (journal) { @@ -77,7 +78,7 @@ public class InMemoryJournal extends AsyncWriteJournal { } @SuppressWarnings("unchecked") - public static List get(String persistenceId, Class type) { + public static List get(final String persistenceId, final Class type) { Map journalMap = JOURNALS.get(persistenceId); if (journalMap == null) { return Collections.emptyList(); @@ -96,12 +97,12 @@ public class InMemoryJournal extends AsyncWriteJournal { } } - public static Map get(String persistenceId) { + public static Map get(final String persistenceId) { Map journalMap = JOURNALS.get(persistenceId); return journalMap != null ? journalMap : Collections.emptyMap(); } - public static void dumpJournal(String persistenceId) { + public static void dumpJournal(final String persistenceId) { StringBuilder builder = new StringBuilder(String.format("Journal log for %s:", persistenceId)); Map journalMap = JOURNALS.get(persistenceId); if (journalMap != null) { @@ -115,33 +116,34 @@ public class InMemoryJournal extends AsyncWriteJournal { LOG.info(builder.toString()); } - public static void waitForDeleteMessagesComplete(String persistenceId) { + public static void waitForDeleteMessagesComplete(final String persistenceId) { if (!Uninterruptibles.awaitUninterruptibly(DELETE_MESSAGES_COMPLETE_LATCHES.get(persistenceId), 5, TimeUnit.SECONDS)) { throw new AssertionError("Delete messages did not complete"); } } - public static void waitForWriteMessagesComplete(String persistenceId) { + public static void waitForWriteMessagesComplete(final String persistenceId) { if (!Uninterruptibles.awaitUninterruptibly(WRITE_MESSAGES_COMPLETE.get(persistenceId).latch, 5, TimeUnit.SECONDS)) { throw new AssertionError("Journal write messages did not complete"); } } - public static void addDeleteMessagesCompleteLatch(String persistenceId) { + public static void addDeleteMessagesCompleteLatch(final String persistenceId) { DELETE_MESSAGES_COMPLETE_LATCHES.put(persistenceId, new CountDownLatch(1)); } - public static void addWriteMessagesCompleteLatch(String persistenceId, int count) { + public static void addWriteMessagesCompleteLatch(final String persistenceId, final int count) { WRITE_MESSAGES_COMPLETE.put(persistenceId, new WriteMessagesComplete(count, null)); } - public static void addWriteMessagesCompleteLatch(String persistenceId, int count, Class ofType) { + public static void addWriteMessagesCompleteLatch(final String persistenceId, final int count, + final Class ofType) { WRITE_MESSAGES_COMPLETE.put(persistenceId, new WriteMessagesComplete(count, ofType)); } - public static void addBlockReadMessagesLatch(String persistenceId, CountDownLatch latch) { + public static void addBlockReadMessagesLatch(final String persistenceId, final CountDownLatch latch) { BLOCK_READ_MESSAGES_LATCHES.put(persistenceId, latch); } @@ -167,7 +169,7 @@ public class InMemoryJournal extends AsyncWriteJournal { if (++count <= max && entry.getKey() >= fromSequenceNr && entry.getKey() <= toSequenceNr) { PersistentRepr persistentMessage = new PersistentImpl(deserialize(entry.getValue()), entry.getKey(), persistenceId, - null, false, null, null); + null, false, null, null, 0); replayCallback.accept(persistentMessage); } } @@ -178,7 +180,7 @@ public class InMemoryJournal extends AsyncWriteJournal { } @Override - public Future doAsyncReadHighestSequenceNr(String persistenceId, long fromSequenceNr) { + public Future doAsyncReadHighestSequenceNr(final String persistenceId, final long fromSequenceNr) { LOG.trace("doAsyncReadHighestSequenceNr for {}: fromSequenceNr: {}", persistenceId, fromSequenceNr); // Akka calls this during recovery. @@ -203,10 +205,7 @@ public class InMemoryJournal extends AsyncWriteJournal { public Future>> doAsyncWriteMessages(final Iterable messages) { return Futures.future(() -> { for (AtomicWrite write : messages) { - // Copy to array - workaround for eclipse "ambiguous method" errors for toIterator, toIterable etc - PersistentRepr[] array = new PersistentRepr[write.payload().size()]; - write.payload().copyToArray(array); - for (PersistentRepr repr: array) { + for (PersistentRepr repr : CollectionConverters.asJava(write.payload())) { LOG.trace("doAsyncWriteMessages: id: {}: seqNr: {}, payload: {}", repr.persistenceId(), repr.sequenceNr(), repr.payload()); @@ -226,7 +225,7 @@ public class InMemoryJournal extends AsyncWriteJournal { } @Override - public Future doAsyncDeleteMessagesTo(String persistenceId, long toSequenceNr) { + public Future doAsyncDeleteMessagesTo(final String persistenceId, final long toSequenceNr) { LOG.trace("doAsyncDeleteMessagesTo: {}", toSequenceNr); Map journal = JOURNALS.get(persistenceId); if (journal != null) { diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml b/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml index 11713cc508..ebaad77257 100644 --- a/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml +++ b/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml @@ -25,24 +25,24 @@ and is available at http://www.eclipse.org/legal/epl-v10.html com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 test com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 com.typesafe.akka - akka-persistence-tck_2.12 + akka-persistence-tck_2.13 diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java index 3b85a230a1..4e0a54c4b2 100644 --- a/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java +++ b/opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java @@ -39,10 +39,9 @@ import org.opendaylight.controller.cluster.common.actor.MeteringBehavior; import org.opendaylight.controller.cluster.reporting.MetricsReporter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import scala.collection.Iterator; -import scala.collection.SeqLike; import scala.concurrent.Future; import scala.concurrent.Promise; +import scala.jdk.javaapi.CollectionConverters; /** * This actor handles a single PersistentActor's journal. The journal is split into two {@link SegmentedJournal}s: @@ -332,10 +331,7 @@ final class SegmentedJournalActor extends AbstractActor { } private void writeRequest(final SegmentedJournalWriter writer, final AtomicWrite request) { - // Cast is needed for Eclipse because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=468276 - final Iterator it = ((SeqLike) request.payload()).iterator(); - while (it.hasNext()) { - final PersistentRepr repr = it.next(); + for (PersistentRepr repr : CollectionConverters.asJava(request.payload())) { final Object payload = repr.payload(); if (!(payload instanceof Serializable)) { throw new UnsupportedOperationException("Non-serializable payload encountered " + payload.getClass()); diff --git a/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml b/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml index 9a860bbd42..b9a1f22e9f 100644 --- a/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml +++ b/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml @@ -61,11 +61,11 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test diff --git a/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java b/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java index 3e14a37645..6102db5348 100644 --- a/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java +++ b/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java @@ -16,6 +16,7 @@ import akka.util.Timeout; import com.google.common.base.Strings; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Maps; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -106,12 +107,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controll import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.RemoveShardReplicaOutputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.ShardResult1; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.ShardResult1Builder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.shard.result.KnownClients; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.get.known.clients._for.all.shards.output.shard.result.KnownClientsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.locate.shard.output.member.node.LeaderActorRefBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.locate.shard.output.member.node.LocalBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.member.voting.states.input.MemberVotingState; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResult; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResultBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResultKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.Empty; import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; @@ -649,7 +652,7 @@ public class ClusterAdminRpcService implements ClusterAdminService { private static RpcResult processReplies( final ImmutableMap> allShardReplies) { - final List result = new ArrayList<>(allShardReplies.size()); + final Map result = Maps.newHashMapWithExpectedSize(allShardReplies.size()); for (Entry> entry : allShardReplies.entrySet()) { final ListenableFuture future = entry.getValue(); final ShardResultBuilder builder = new ShardResultBuilder() @@ -661,22 +664,28 @@ public class ClusterAdminRpcService implements ClusterAdminService { reply = Futures.getDone(future); } catch (ExecutionException e) { LOG.debug("Shard {} failed to answer", entry.getKey(), e); - result.add(builder.setSucceeded(Boolean.FALSE).setErrorMessage(e.getCause().getMessage()).build()); + final ShardResult sr = builder + .setSucceeded(Boolean.FALSE) + .setErrorMessage(e.getCause().getMessage()) + .build(); + result.put(sr.key(), sr); continue; } - result.add(builder - .setSucceeded(Boolean.TRUE) - .addAugmentation(ShardResult1.class, new ShardResult1Builder() - .setKnownClients(reply.getClients().stream() - .map(client -> new KnownClientsBuilder() - .setMember(client.getFrontendId().getMemberName().toYang()) - .setType(client.getFrontendId().getClientType().toYang()) - .setGeneration(client.getYangGeneration()) - .build()) - .collect(Collectors.toList())) - .build()) - .build()); + final ShardResult sr = builder + .setSucceeded(Boolean.TRUE) + .addAugmentation(ShardResult1.class, new ShardResult1Builder() + .setKnownClients(reply.getClients().stream() + .map(client -> new KnownClientsBuilder() + .setMember(client.getFrontendId().getMemberName().toYang()) + .setType(client.getFrontendId().getClientType().toYang()) + .setGeneration(client.getYangGeneration()) + .build()) + .collect(Collectors.toMap(KnownClients::key, Function.identity()))) + .build()) + .build(); + + result.put(sr.key(), sr); } return RpcResultBuilder.success(new GetKnownClientsForAllShardsOutputBuilder().setShardResult(result).build()) @@ -694,19 +703,20 @@ public class ClusterAdminRpcService implements ClusterAdminService { private static SettableFuture> waitForShardResults( final List, ShardResultBuilder>> shardResultData, - final Function, T> resultDataSupplier, + final Function, T> resultDataSupplier, final String failureLogMsgPrefix) { final SettableFuture> returnFuture = SettableFuture.create(); - final List shardResults = new ArrayList<>(); + final Map shardResults = new HashMap<>(); for (final Entry, ShardResultBuilder> entry : shardResultData) { Futures.addCallback(entry.getKey(), new FutureCallback() { @Override public void onSuccess(final Success result) { synchronized (shardResults) { - ShardResultBuilder shardResult = entry.getValue(); - LOG.debug("onSuccess for shard {}, type {}", shardResult.getShardName(), - shardResult.getDataStoreType()); - shardResults.add(shardResult.setSucceeded(true).build()); + final ShardResultBuilder builder = entry.getValue(); + LOG.debug("onSuccess for shard {}, type {}", builder.getShardName(), + builder.getDataStoreType()); + final ShardResult sr = builder.setSucceeded(Boolean.TRUE).build(); + shardResults.put(sr.key(), sr); checkIfComplete(); } } @@ -714,11 +724,14 @@ public class ClusterAdminRpcService implements ClusterAdminService { @Override public void onFailure(final Throwable failure) { synchronized (shardResults) { - ShardResultBuilder shardResult = entry.getValue(); - LOG.warn("{} for shard {}, type {}", failureLogMsgPrefix, shardResult.getShardName(), - shardResult.getDataStoreType(), failure); - shardResults.add(shardResult.setSucceeded(false).setErrorMessage( - Throwables.getRootCause(failure).getMessage()).build()); + ShardResultBuilder builder = entry.getValue(); + LOG.warn("{} for shard {}, type {}", failureLogMsgPrefix, builder.getShardName(), + builder.getDataStoreType(), failure); + final ShardResult sr = builder + .setSucceeded(Boolean.FALSE) + .setErrorMessage(Throwables.getRootCause(failure).getMessage()) + .build(); + shardResults.put(sr.key(), sr); checkIfComplete(); } } diff --git a/opendaylight/md-sal/sal-cluster-admin-impl/src/test/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcServiceTest.java b/opendaylight/md-sal/sal-cluster-admin-impl/src/test/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcServiceTest.java index bb47af6400..0ba06e3bcd 100644 --- a/opendaylight/md-sal/sal-cluster-admin-impl/src/test/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcServiceTest.java +++ b/opendaylight/md-sal/sal-cluster-admin-impl/src/test/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcServiceTest.java @@ -114,6 +114,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controll import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.member.voting.states.input.MemberVotingStateBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResult; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResultBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.shard.result.output.ShardResultKey; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.common.RpcError; import org.opendaylight.yangtools.yang.common.RpcResult; @@ -1190,13 +1191,14 @@ public class ClusterAdminRpcServiceTest { }); } - private static void verifyShardResults(final List shardResults, final ShardResult... expShardResults) { + private static void verifyShardResults(final Map shardResults, + final ShardResult... expShardResults) { Map expResultsMap = new HashMap<>(); for (ShardResult r: expShardResults) { expResultsMap.put(r.getShardName() + "-" + r.getDataStoreType(), r); } - for (ShardResult result: shardResults) { + for (ShardResult result: shardResults.values()) { ShardResult exp = expResultsMap.remove(result.getShardName() + "-" + result.getDataStoreType()); assertNotNull(String.format("Unexpected result for shard %s, type %s", result.getShardName(), result.getDataStoreType()), exp); diff --git a/opendaylight/md-sal/sal-clustering-commons/pom.xml b/opendaylight/md-sal/sal-clustering-commons/pom.xml index bc4e7a2086..825a929d04 100644 --- a/opendaylight/md-sal/sal-clustering-commons/pom.xml +++ b/opendaylight/md-sal/sal-clustering-commons/pom.xml @@ -54,23 +54,23 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-cluster_2.12 + akka-cluster_2.13 com.typesafe.akka - akka-osgi_2.12 + akka-osgi_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 com.typesafe.akka - akka-remote_2.12 + akka-remote_2.13 @@ -80,15 +80,15 @@ com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 com.typesafe.akka - akka-persistence-tck_2.12 + akka-persistence-tck_2.13 diff --git a/opendaylight/md-sal/sal-clustering-config/pom.xml b/opendaylight/md-sal/sal-clustering-config/pom.xml index 50e23333f0..2dae2ffc33 100644 --- a/opendaylight/md-sal/sal-clustering-config/pom.xml +++ b/opendaylight/md-sal/sal-clustering-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java deleted file mode 100644 index 2ede081031..0000000000 --- a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerMXBeanImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.md.sal.common.util.jmx; - -import static java.util.Objects.requireNonNull; - -import java.util.List; -import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats; -import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManager; -import org.opendaylight.yangtools.util.concurrent.QueuedNotificationManagerMXBean; - -/** - * Implementation of the QueuedNotificationManagerMXBean interface. - * - *

- * This class is not intended for use outside of MD-SAL and its part of private - * implementation (still exported as public to be reused across MD-SAL implementation - * components) and may be removed in subsequent - * releases. - * - * @author Thomas Pantelis - */ -public class QueuedNotificationManagerMXBeanImpl extends AbstractMXBean - implements QueuedNotificationManagerMXBean { - - private final QueuedNotificationManager manager; - - public QueuedNotificationManagerMXBeanImpl(final QueuedNotificationManager manager, - final String beanName, final String beanType, final String beanCategory) { - super(beanName, beanType, beanCategory); - this.manager = requireNonNull(manager); - } - - @Override - public List getCurrentListenerQueueStats() { - return manager.getListenerNotificationQueueStats(); - } - - @Override - public int getMaxListenerQueueSize() { - return manager.getMaxQueueCapacity(); - } - - public QueuedNotificationManagerStats toQueuedNotificationManagerStats() { - return new QueuedNotificationManagerStats(getMaxListenerQueueSize(), getCurrentListenerQueueStats()); - } -} diff --git a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerStats.java b/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerStats.java deleted file mode 100644 index 7f49fc21a0..0000000000 --- a/opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/QueuedNotificationManagerStats.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.md.sal.common.util.jmx; - -import java.beans.ConstructorProperties; -import java.util.List; -import org.opendaylight.yangtools.util.concurrent.ListenerNotificationQueueStats; - -/** - * A bean class that holds various QueuedNotificationManager statistic metrics. This class is - * suitable for mapping to the MXBean CompositeDataSupport type. - * - *

- * This class is not intended for use outside of MD-SAL and its part of private - * implementation (still exported as public to be reused across MD-SAL implementation - * components) and may be removed in subsequent - * releases. - * @author Thomas Pantelis - * @see QueuedNotificationManagerMXBeanImpl - */ -public class QueuedNotificationManagerStats { - private final int maxListenerQueueSize; - private final List currentListenerQueueStats; - - @ConstructorProperties({"maxListenerQueueSize","currentListenerQueueStats"}) - public QueuedNotificationManagerStats(int maxListenerQueueSize, - List currentListenerQueueStats) { - this.maxListenerQueueSize = maxListenerQueueSize; - this.currentListenerQueueStats = currentListenerQueueStats; - } - - public List getCurrentListenerQueueStats() { - return currentListenerQueueStats; - } - - public int getMaxListenerQueueSize() { - return maxListenerQueueSize; - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-distributed-datastore/pom.xml index 4e3baf905f..0c1f2a3b53 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/pom.xml @@ -28,35 +28,35 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-cluster_2.12 + akka-cluster_2.13 com.typesafe.akka - akka-osgi_2.12 + akka-osgi_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 com.typesafe.akka - akka-remote_2.12 + akka-remote_2.13 com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 org.scala-lang.modules - scala-java8-compat_2.12 + scala-java8-compat_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test @@ -206,6 +206,16 @@ org.opendaylight.yangtools yang-test-util + + org.opendaylight.mdsal + mdsal-binding-generator-impl + test + + + org.opendaylight.mdsal + mdsal-binding-runtime-spi + test + diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java index bc4a8e7395..7d84ebfd10 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java @@ -43,8 +43,8 @@ import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier; import org.opendaylight.mdsal.dom.spi.store.DOMStoreTreeChangePublisher; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.duration.Duration; @@ -52,7 +52,7 @@ import scala.concurrent.duration.Duration; /** * Base implementation of a distributed DOMStore. */ -public abstract class AbstractDataStore implements DistributedDataStoreInterface, SchemaContextListener, +public abstract class AbstractDataStore implements DistributedDataStoreInterface, EffectiveModelContextListener, DatastoreContextPropertiesUpdater.Listener, DOMStoreTreeChangePublisher, DOMDataTreeCommitCohortRegistry, AutoCloseable { @@ -187,8 +187,8 @@ public abstract class AbstractDataStore implements DistributedDataStoreInterface } @Override - public void onGlobalContextUpdated(final SchemaContext schemaContext) { - actorUtils.setSchemaContext(schemaContext); + public void onModelContextUpdated(final EffectiveModelContext newModelContext) { + actorUtils.setSchemaContext(newModelContext); } @Override diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorFactory.java index 8d6f4816a3..0a2c85525b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorFactory.java @@ -7,13 +7,11 @@ */ package org.opendaylight.controller.cluster.datastore; +import static java.util.Objects.requireNonNull; + import com.google.common.annotations.VisibleForTesting; import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; -import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry; -import org.opendaylight.mdsal.binding.generator.api.ClassLoadingStrategy; -import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.mdsal.dom.api.DOMSchemaService; /** * Factory for creating DatastoreContextIntrospector instances. @@ -21,28 +19,21 @@ import org.opendaylight.mdsal.dom.api.DOMSchemaService; * @author Thomas Pantelis */ public class DatastoreContextIntrospectorFactory { - private final DOMSchemaService schemaService; - private final ClassLoadingStrategy classLoadingStrategy; + private final BindingNormalizedNodeSerializer serializer; - public DatastoreContextIntrospectorFactory(DOMSchemaService schemaService, - ClassLoadingStrategy classLoadingStrategy) { - this.schemaService = schemaService; - this.classLoadingStrategy = classLoadingStrategy; + public DatastoreContextIntrospectorFactory(final BindingNormalizedNodeSerializer serializer) { + this.serializer = requireNonNull(serializer); } - public DatastoreContextIntrospector newInstance(LogicalDatastoreType datastoreType) { - return new DatastoreContextIntrospector(DatastoreContext.newBuilder() - .logicalStoreType(datastoreType).tempFileDirectory("./data").build(), newBindingSerializer()); + public DatastoreContextIntrospector newInstance(final LogicalDatastoreType datastoreType) { + return newInstance(DatastoreContext.newBuilder() + .logicalStoreType(datastoreType) + .tempFileDirectory("./data") + .build()); } @VisibleForTesting - DatastoreContextIntrospector newInstance(DatastoreContext context) { - return new DatastoreContextIntrospector(context, newBindingSerializer()); - } - - private BindingNormalizedNodeSerializer newBindingSerializer() { - BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry( - BindingRuntimeContext.create(classLoadingStrategy, schemaService.getGlobalContext())); - return codecRegistry; + DatastoreContextIntrospector newInstance(final DatastoreContext context) { + return new DatastoreContextIntrospector(context, serializer); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/OSGI-INF/blueprint/clustered-datastore.xml b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/OSGI-INF/blueprint/clustered-datastore.xml index 7962d9b9b9..977674c59b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/OSGI-INF/blueprint/clustered-datastore.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/OSGI-INF/blueprint/clustered-datastore.xml @@ -12,7 +12,11 @@ - + + + + + @@ -50,11 +54,6 @@ - - - - - diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java index cca8eb6198..19f4c8e7c3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java @@ -10,8 +10,6 @@ package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_OPERATION_TIMEOUT_IN_MS; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_INITIALIZATION_TIMEOUT; @@ -21,44 +19,24 @@ import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEF import static org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION; import static org.opendaylight.mdsal.common.api.LogicalDatastoreType.OPERATIONAL; -import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.Test; -import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy; -import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext; -import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections; -import org.opendaylight.mdsal.dom.api.DOMSchemaService; +import org.opendaylight.binding.runtime.spi.BindingRuntimeHelpers; +import org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext; +import org.opendaylight.mdsal.binding.generator.impl.DefaultBindingRuntimeGenerator; import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStoreConfigProperties; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainer; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; /** * Unit tests for DatastoreContextIntrospector. * * @author Thomas Pantelis */ -@SuppressWarnings("checkstyle:IllegalCatch") public class DatastoreContextIntrospectorTest { - - static SchemaContext SCHEMA_CONTEXT; - static DatastoreContextIntrospectorFactory INTROSPECTOR_FACTORY; - - static { - final ModuleInfoBackedContext moduleContext = ModuleInfoBackedContext.create(); - try { - moduleContext.addModuleInfos(Arrays.asList( - BindingReflections.getModuleInfo(DataStorePropertiesContainer.class))); - } catch (Exception e) { - throw new RuntimeException(e); - } - SCHEMA_CONTEXT = moduleContext.tryToCreateSchemaContext().get(); - - DOMSchemaService mockSchemaService = mock(DOMSchemaService.class); - doReturn(SCHEMA_CONTEXT).when(mockSchemaService).getGlobalContext(); - INTROSPECTOR_FACTORY = new DatastoreContextIntrospectorFactory(mockSchemaService, - GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy()); - } + static final DatastoreContextIntrospectorFactory INTROSPECTOR_FACTORY = new DatastoreContextIntrospectorFactory( + new BindingCodecContext(BindingRuntimeHelpers.createRuntimeContext(new DefaultBindingRuntimeGenerator(), + DataStorePropertiesContainer.class))); @Test public void testYangDefaults() { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java index 2cb63ce79c..e827cdcaf9 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java @@ -47,7 +47,7 @@ import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain; import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Await; @@ -79,14 +79,14 @@ public class IntegrationTestKit extends ShardTestKit { public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig, final boolean waitUntilLeader, - final SchemaContext schemaContext) throws Exception { + final EffectiveModelContext schemaContext) throws Exception { return setupDistributedDataStore(typeName, moduleShardsConfig, "modules.conf", waitUntilLeader, schemaContext); } public DistributedDataStore setupDistributedDataStore(final String typeName, final String moduleShardsConfig, final String modulesConfig, final boolean waitUntilLeader, - final SchemaContext schemaContext, + final EffectiveModelContext schemaContext, final String... shardNames) throws Exception { return (DistributedDataStore) setupAbstractDataStore(DistributedDataStore.class, typeName, moduleShardsConfig, modulesConfig, waitUntilLeader, schemaContext, shardNames); @@ -117,7 +117,7 @@ public class IntegrationTestKit extends ShardTestKit { public AbstractDataStore setupAbstractDataStore(final Class implementation, final String typeName, final String moduleShardsConfig, final boolean waitUntilLeader, - final SchemaContext schemaContext, + final EffectiveModelContext schemaContext, final String... shardNames) throws Exception { return setupAbstractDataStore(implementation, typeName, moduleShardsConfig, "modules.conf", waitUntilLeader, schemaContext, shardNames); @@ -126,7 +126,8 @@ public class IntegrationTestKit extends ShardTestKit { private AbstractDataStore setupAbstractDataStore(final Class implementation, final String typeName, final String moduleShardsConfig, final String modulesConfig, final boolean waitUntilLeader, - final SchemaContext schemaContext, final String... shardNames) + final EffectiveModelContext schemaContext, + final String... shardNames) throws Exception { final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem()); final Configuration config = new ConfigurationImpl(moduleShardsConfig, modulesConfig); @@ -148,7 +149,7 @@ public class IntegrationTestKit extends ShardTestKit { final AbstractDataStore dataStore = constructor.newInstance(getSystem(), cluster, config, mockContextFactory, restoreFromSnapshot); - dataStore.onGlobalContextUpdated(schemaContext); + dataStore.onModelContextUpdated(schemaContext); if (waitUntilLeader) { waitUntilLeader(dataStore.getActorUtils(), shardNames); @@ -169,7 +170,7 @@ public class IntegrationTestKit extends ShardTestKit { } public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName, - final SchemaContext schemaContext) { + final EffectiveModelContext schemaContext) { final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem()); final ConfigurationImpl configuration = new ConfigurationImpl(new EmptyModuleShardConfigProvider()); @@ -184,14 +185,14 @@ public class IntegrationTestKit extends ShardTestKit { final DistributedDataStore dataStore = new DistributedDataStore(getSystem(), cluster, configuration, mockContextFactory, restoreFromSnapshot); - dataStore.onGlobalContextUpdated(schemaContext); + dataStore.onModelContextUpdated(schemaContext); datastoreContextBuilder = DatastoreContext.newBuilderFrom(datastoreContext); return dataStore; } public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName, - final SchemaContext schemaContext, + final EffectiveModelContext schemaContext, final LogicalDatastoreType storeType) { final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem()); final ConfigurationImpl configuration = new ConfigurationImpl(new EmptyModuleShardConfigProvider()); @@ -208,7 +209,7 @@ public class IntegrationTestKit extends ShardTestKit { final DistributedDataStore dataStore = new DistributedDataStore(getSystem(), cluster, configuration, mockContextFactory, restoreFromSnapshot); - dataStore.onGlobalContextUpdated(schemaContext); + dataStore.onModelContextUpdated(schemaContext); datastoreContextBuilder = DatastoreContext.newBuilderFrom(datastoreContext); return dataStore; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/MemberNode.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/MemberNode.java index ab7de92484..b3fff4c6d7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/MemberNode.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/MemberNode.java @@ -33,7 +33,7 @@ import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; import org.opendaylight.controller.cluster.raft.client.messages.GetOnDemandRaftState; import org.opendaylight.controller.cluster.raft.client.messages.OnDemandRaftState; import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.slf4j.LoggerFactory; import scala.concurrent.Await; import scala.concurrent.Future; @@ -188,7 +188,7 @@ public class MemberNode { private boolean useAkkaArtery = true; private String[] waitForshardLeader = new String[0]; private String testName; - private SchemaContext schemaContext; + private EffectiveModelContext schemaContext; private boolean createOperDatastore = true; private DatastoreContext.Builder datastoreContextBuilder = DatastoreContext.newBuilder() .shardHeartbeatIntervalInMillis(300).shardElectionTimeoutFactor(30); @@ -262,7 +262,7 @@ public class MemberNode { * * @return this Builder */ - public Builder schemaContext(final SchemaContext newSchemaContext) { + public Builder schemaContext(final EffectiveModelContext newSchemaContext) { this.schemaContext = newSchemaContext; return this; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java index ca72e6bbb8..b375488af8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; @@ -80,7 +79,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import scala.concurrent.Promise; @SuppressWarnings({"resource", "checkstyle:IllegalThrows", "checkstyle:AvoidHidingCauseException"}) @@ -1457,9 +1456,8 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } @Test - public void testReadRoot() throws InterruptedException, ExecutionException, - java.util.concurrent.TimeoutException { - SchemaContext schemaContext = SchemaContextHelper.full(); + public void testReadRoot() throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException { + EffectiveModelContext schemaContext = SchemaContextHelper.full(); Configuration configuration = mock(Configuration.class); doReturn(configuration).when(mockActorContext).getConfiguration(); doReturn(schemaContext).when(mockActorContext).getSchemaContext(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java index e3bca7e16b..5d7d842298 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore.modification; import com.google.common.util.concurrent.ListenableFuture; @@ -21,10 +20,10 @@ import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction; import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStore; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; public abstract class AbstractModificationTest { - private static SchemaContext TEST_SCHEMA_CONTEXT; + private static EffectiveModelContext TEST_SCHEMA_CONTEXT; protected InMemoryDOMDataStore store; @@ -41,7 +40,7 @@ public abstract class AbstractModificationTest { @Before public void setUp() { store = new InMemoryDOMDataStore("test", MoreExecutors.newDirectExecutorService()); - store.onGlobalContextUpdated(TEST_SCHEMA_CONTEXT); + store.onModelContextUpdated(TEST_SCHEMA_CONTEXT); } protected void commitTransaction(final DOMStoreWriteTransaction transaction) { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockClusterWrapper.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockClusterWrapper.java index 36ac74b0c4..78028b95bb 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockClusterWrapper.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockClusterWrapper.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore.utils; import akka.actor.ActorRef; @@ -20,7 +19,7 @@ import akka.cluster.MemberStatus; import akka.cluster.UniqueAddress; import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.datastore.ClusterWrapper; -import scala.collection.immutable.Set; +import scala.collection.immutable.Set.Set1; public class MockClusterWrapper implements ClusterWrapper { @@ -63,34 +62,29 @@ public class MockClusterWrapper implements ClusterWrapper { public static MemberRemoved createMemberRemoved(final String memberName, final String address) { UniqueAddress uniqueAddress = new UniqueAddress(AddressFromURIString.parse(address), 55L); - Member member = new Member(uniqueAddress, 1, MemberStatus.removed(), setOf(memberName)); + Member member = new Member(uniqueAddress, 1, MemberStatus.removed(), new Set1<>(memberName)); return new MemberRemoved(member, MemberStatus.up()); } public static MemberUp createMemberUp(final String memberName, final String address) { UniqueAddress uniqueAddress = new UniqueAddress(AddressFromURIString.parse(address), 55L); - Member member = new Member(uniqueAddress, 1, MemberStatus.up(), setOf(memberName)); + Member member = new Member(uniqueAddress, 1, MemberStatus.up(), new Set1<>(memberName)); return new MemberUp(member); } public static UnreachableMember createUnreachableMember(final String memberName, final String address) { UniqueAddress uniqueAddress = new UniqueAddress(AddressFromURIString.parse(address), 55L); - Member member = new Member(uniqueAddress, 1, MemberStatus.up(), setOf(memberName)); + Member member = new Member(uniqueAddress, 1, MemberStatus.up(), new Set1<>(memberName)); return new UnreachableMember(member); } public static ReachableMember createReachableMember(final String memberName, final String address) { UniqueAddress uniqueAddress = new UniqueAddress(AddressFromURIString.parse(address), 55L); - Member member = new Member(uniqueAddress, 1, MemberStatus.up(), setOf(memberName)); + Member member = new Member(uniqueAddress, 1, MemberStatus.up(), new Set1<>(memberName)); return new ReachableMember(member); } - - @SuppressWarnings("unchecked") - private static Set setOf(final String str) { - return scala.collection.immutable.Set$.MODULE$.newBuilder().$plus$eq(str).result(); - } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java index fd94ef9a4c..cc9e9b288b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/NormalizedNodeAggregatorTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore.utils; import static org.junit.Assert.assertEquals; @@ -32,14 +31,14 @@ import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; public class NormalizedNodeAggregatorTest { @Test public void testAggregate() throws InterruptedException, ExecutionException, DataValidationFailedException { - SchemaContext schemaContext = SchemaContextHelper.full(); + EffectiveModelContext schemaContext = SchemaContextHelper.full(); NormalizedNode expectedNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); NormalizedNode expectedNode2 = ImmutableNodes.containerNode(CarsModel.CARS_QNAME); @@ -73,10 +72,10 @@ public class NormalizedNodeAggregatorTest { } - public static NormalizedNode getRootNode(NormalizedNode moduleNode, SchemaContext schemaContext) - throws ExecutionException, InterruptedException { + public static NormalizedNode getRootNode(final NormalizedNode moduleNode, + final EffectiveModelContext schemaContext) throws ExecutionException, InterruptedException { try (InMemoryDOMDataStore store = new InMemoryDOMDataStore("test", Executors.newSingleThreadExecutor())) { - store.onGlobalContextUpdated(schemaContext); + store.onModelContextUpdated(schemaContext); DOMStoreWriteTransaction writeTransaction = store.newWriteOnlyTransaction(); @@ -98,7 +97,8 @@ public class NormalizedNodeAggregatorTest { } } - public static NormalizedNode findChildWithQName(Collection> collection, QName qname) { + public static NormalizedNode findChildWithQName(final Collection> collection, + final QName qname) { for (NormalizedNode node : collection) { if (node.getNodeType().equals(qname)) { return node; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java index cfbaee6f61..b7f5d0fc24 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/TestModel.java @@ -17,7 +17,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; public final class TestModel { @@ -56,7 +56,7 @@ public final class TestModel { } - public static SchemaContext createTestContext() { + public static EffectiveModelContext createTestContext() { return YangParserTestUtils.parseYangResource(DATASTORE_TEST_YANG); } diff --git a/opendaylight/md-sal/sal-distributed-eos/pom.xml b/opendaylight/md-sal/sal-distributed-eos/pom.xml index 992020be81..fbbcafe1cb 100644 --- a/opendaylight/md-sal/sal-distributed-eos/pom.xml +++ b/opendaylight/md-sal/sal-distributed-eos/pom.xml @@ -35,7 +35,7 @@ com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test diff --git a/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipServiceTest.java b/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipServiceTest.java index 25f1c0484d..758ce9d3e1 100644 --- a/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipServiceTest.java +++ b/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipServiceTest.java @@ -101,7 +101,7 @@ public class DistributedEntityOwnershipServiceTest extends AbstractClusterRefEnt dataStore = new DistributedDataStore(getSystem(), new MockClusterWrapper(), configuration, mockContextFactory, null); - dataStore.onGlobalContextUpdated(EOSTestUtils.SCHEMA_CONTEXT); + dataStore.onModelContextUpdated(EOSTestUtils.SCHEMA_CONTEXT); } @After diff --git a/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/EOSTestUtils.java b/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/EOSTestUtils.java index 118190a7f4..dda340468a 100644 --- a/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/EOSTestUtils.java +++ b/opendaylight/md-sal/sal-distributed-eos/src/test/java/org/opendaylight/controller/cluster/entityownership/EOSTestUtils.java @@ -8,11 +8,11 @@ package org.opendaylight.controller.cluster.entityownership; import java.io.File; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; final class EOSTestUtils { - static final SchemaContext SCHEMA_CONTEXT = YangParserTestUtils.parseYangFiles( + static final EffectiveModelContext SCHEMA_CONTEXT = YangParserTestUtils.parseYangFiles( new File("src/main/yang/entity-owners.yang")); private EOSTestUtils() { diff --git a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml index 27b4603323..4b63705a8c 100644 --- a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml @@ -16,38 +16,38 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-cluster_2.12 + akka-cluster_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 com.typesafe.akka - akka-remote_2.12 + akka-remote_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 com.typesafe.akka - akka-osgi_2.12 + akka-osgi_2.13 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml index 65129df37d..da0e62f5aa 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml +++ b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml @@ -16,32 +16,32 @@ com.typesafe.akka - akka-actor_2.12 + akka-actor_2.13 com.typesafe.akka - akka-cluster_2.12 + akka-cluster_2.13 com.typesafe.akka - akka-remote_2.12 + akka-remote_2.13 com.typesafe.akka - akka-testkit_2.12 + akka-testkit_2.13 test com.typesafe.akka - akka-osgi_2.12 + akka-osgi_2.13 com.typesafe.akka - akka-slf4j_2.12 + akka-slf4j_2.13 com.typesafe.akka - akka-persistence_2.12 + akka-persistence_2.13 diff --git a/opendaylight/md-sal/sal-test-model/src/main/java/org/opendaylight/controller/md/sal/test/model/util/ListsBindingUtils.java b/opendaylight/md-sal/sal-test-model/src/main/java/org/opendaylight/controller/md/sal/test/model/util/ListsBindingUtils.java index a1ab580067..1f379fd262 100644 --- a/opendaylight/md-sal/sal-test-model/src/main/java/org/opendaylight/controller/md/sal/test/model/util/ListsBindingUtils.java +++ b/opendaylight/md-sal/sal-test-model/src/main/java/org/opendaylight/controller/md/sal/test/model/util/ListsBindingUtils.java @@ -7,7 +7,9 @@ */ package org.opendaylight.controller.md.sal.test.model.util; -import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableMap.Builder; +import com.google.common.collect.Maps; import java.util.Arrays; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder; @@ -28,18 +30,16 @@ import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public final class ListsBindingUtils { - private static final InstanceIdentifier TOP_PATH = InstanceIdentifier.create(Top.class); - private ListsBindingUtils() { - throw new UnsupportedOperationException(); - } - public static final TopLevelListKey TOP_FOO_KEY = new TopLevelListKey("foo"); public static final TopLevelListKey TOP_BAR_KEY = new TopLevelListKey("bar"); public static final ListViaUsesKey USES_ONE_KEY = new ListViaUsesKey("one"); public static final ListViaUsesKey USES_TWO_KEY = new ListViaUsesKey("two"); + private ListsBindingUtils() { + + } public static InstanceIdentifier path(final TopLevelListKey key) { return TOP_PATH.child(TopLevelList.class, key); @@ -59,7 +59,7 @@ public final class ListsBindingUtils { } public static Top top(final TopLevelList... listItems) { - return new TopBuilder().setTopLevelList(Arrays.asList(listItems)).build(); + return new TopBuilder().setTopLevelList(Maps.uniqueIndex(Arrays.asList(listItems), TopLevelList::key)).build(); } public static TopLevelList topLevelList(final TopLevelListKey key) { @@ -73,9 +73,9 @@ public final class ListsBindingUtils { } public static TreeComplexUsesAugment complexUsesAugment(final ListViaUsesKey... keys) { - ImmutableList.Builder listViaUses = ImmutableList.builder(); + Builder listViaUses = ImmutableMap.builderWithExpectedSize(keys.length); for (ListViaUsesKey key : keys) { - listViaUses.add(new ListViaUsesBuilder().withKey(key).build()); + listViaUses.put(key, new ListViaUsesBuilder().withKey(key).build()); } return new TreeComplexUsesAugmentBuilder().setListViaUses(listViaUses.build()).build(); } @@ -84,5 +84,4 @@ public final class ListsBindingUtils { return new TreeLeafOnlyUsesAugmentBuilder().setLeafFromGrouping(leafFromGroupingValue).build(); } - } diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/listener/PeopleCarListener.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/listener/PeopleCarListener.java index cc8540f77e..59dbd6990c 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/listener/PeopleCarListener.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/listener/PeopleCarListener.java @@ -49,7 +49,7 @@ public class PeopleCarListener implements CarPurchaseListener { WriteTransaction tx = dataProvider.newWriteOnlyTransaction(); - tx.put(LogicalDatastoreType.CONFIGURATION, carPersonIId, carPerson, true); + tx.put(LogicalDatastoreType.CONFIGURATION, carPersonIId, carPerson); tx.commit().addCallback(new FutureCallback() { @Override diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/PeopleProvider.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/PeopleProvider.java index 3ab9736811..fd1acaf024 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/PeopleProvider.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/PeopleProvider.java @@ -65,7 +65,7 @@ public class PeopleProvider implements PeopleService, AutoCloseable { .child(Person.class, person.key()).build(); // Place entry in data store tree WriteTransaction tx = dataProvider.newWriteOnlyTransaction(); - tx.put(LogicalDatastoreType.CONFIGURATION, personId, person, true); + tx.put(LogicalDatastoreType.CONFIGURATION, personId, person); tx.commit().addCallback(new FutureCallback() { @Override diff --git a/opendaylight/md-sal/samples/toaster-provider/pom.xml b/opendaylight/md-sal/samples/toaster-provider/pom.xml index 2c4c02abee..bd799515fe 100644 --- a/opendaylight/md-sal/samples/toaster-provider/pom.xml +++ b/opendaylight/md-sal/samples/toaster-provider/pom.xml @@ -40,14 +40,18 @@ org.opendaylight.mdsal - mdsal-binding-dom-adapter - test-jar + mdsal-binding-generator-impl + test + + + org.opendaylight.mdsal + mdsal-binding-runtime-spi test - - - org.mockito - mockito-core + + org.opendaylight.mdsal + mdsal-binding-dom-adapter + test-jar test diff --git a/opendaylight/model/model-inventory/pom.xml b/opendaylight/model/model-inventory/pom.xml index 00244ce704..f19a30ac6b 100644 --- a/opendaylight/model/model-inventory/pom.xml +++ b/opendaylight/model/model-inventory/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/opendaylight/model/model-topology/pom.xml b/opendaylight/model/model-topology/pom.xml index dee54028fe..7b4a868d4e 100644 --- a/opendaylight/model/model-topology/pom.xml +++ b/opendaylight/model/model-topology/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.mdsal binding-parent - 5.0.9 + 6.0.0-SNAPSHOT diff --git a/opendaylight/model/pom.xml b/opendaylight/model/pom.xml index f5f15dd460..df8f0c78f5 100644 --- a/opendaylight/model/pom.xml +++ b/opendaylight/model/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 diff --git a/pom.xml b/pom.xml index a0a00871c8..d037ca1b06 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.4 + 7.0.1 org.opendaylight.controller -- 2.36.6