From: Robert Varga Date: Fri, 2 Oct 2020 16:16:24 +0000 (+0200) Subject: Bump upstreams for Silicon X-Git-Tag: v3.0.0~3 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=1d0370feb32b84119bf4c570b9e6e9abbe8d9511 Bump upstreams for Silicon Adopt the following upstream versions: - odlparent-8.0.0 - yangtools-6.0.0-SNAPSHOT - mdsal-7.0.0-SNAPSHOT Also add bundle-parent to host the scala/akka definitions we need. Change-Id: I98452920bf7cebf176d3b20723be40929a9a7268 Signed-off-by: Robert Varga --- diff --git a/akka/pom.xml b/akka/pom.xml index d0461fa946..0c3e3f65f8 100644 --- a/akka/pom.xml +++ b/akka/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/akka/repackaged-akka-jar/pom.xml b/akka/repackaged-akka-jar/pom.xml index e0edc6a51a..132afa8542 100644 --- a/akka/repackaged-akka-jar/pom.xml +++ b/akka/repackaged-akka-jar/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent - 7.0.6 + 8.0.0 @@ -33,34 +33,42 @@ com.typesafe.akka akka-actor_2.13 + 2.5.31 com.typesafe.akka akka-cluster_2.13 + 2.5.31 com.typesafe.akka akka-osgi_2.13 + 2.5.31 com.typesafe.akka akka-persistence_2.13 + 2.5.31 com.typesafe.akka akka-protobuf_2.13 + 2.5.31 com.typesafe.akka akka-remote_2.13 + 2.5.31 com.typesafe.akka akka-slf4j_2.13 + 2.5.31 com.typesafe.akka akka-stream_2.13 + 2.5.31 diff --git a/akka/repackaged-akka/pom.xml b/akka/repackaged-akka/pom.xml index 92e09e4f94..51f431258e 100644 --- a/akka/repackaged-akka/pom.xml +++ b/akka/repackaged-akka/pom.xml @@ -11,16 +11,14 @@ 4.0.0 - org.opendaylight.odlparent + org.opendaylight.controller bundle-parent - 7.0.6 - + 3.0.0-SNAPSHOT + ../../bundle-parent - org.opendaylight.controller repackaged-akka bundle - 3.0.0-SNAPSHOT ${project.artifactId} diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 4d41bb08af..3e7ca72bbf 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 0d0caea0ec..7afc35284f 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/bundle-parent/pom.xml b/bundle-parent/pom.xml new file mode 100644 index 0000000000..b1ad49d48d --- /dev/null +++ b/bundle-parent/pom.xml @@ -0,0 +1,119 @@ + + + + 4.0.0 + + org.opendaylight.mdsal + dom-parent + 7.0.0-SNAPSHOT + + + + org.opendaylight.controller + bundle-parent + 3.0.0-SNAPSHOT + pom + + + + + org.opendaylight.controller + controller-artifacts + 3.0.0-SNAPSHOT + pom + import + + + + + org.scala-lang + scala-library + 2.13.3 + + + org.scala-lang + scala-reflect + 2.13.3 + + + org.scala-lang.modules + scala-java8-compat_2.13 + 0.9.1 + + + org.scala-lang.modules + scala-parser-combinators_2.13 + 1.1.2 + + + + + + com.typesafe + config + 1.3.3 + + + com.typesafe + ssl-config-core_2.13 + 0.3.8 + + + + + com.typesafe.akka + akka-testkit_2.13 + 2.5.31 + test + + + com.typesafe.akka + akka-actor_2.13 + + + + + com.typesafe.akka + akka-persistence-tck_2.13 + 2.5.31 + test + + + com.typesafe.akka + akka-persistence_2.13 + + + + + + + org.reactivestreams + reactive-streams + 1.0.3 + + + + + org.agrona + agrona + 0.9.33 + + + io.aeron + aeron-client + 1.15.3 + + + io.aeron + aeron-driver + 1.15.3 + + + + diff --git a/docs/pom.xml b/docs/pom.xml index c852071136..3f3b552830 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent - 7.0.6 + 8.0.0 @@ -134,6 +134,10 @@ org.kohsuke.metainf-services metainf-services + + org.osgi + org.osgi.core + org.osgi osgi.cmpn @@ -238,16 +242,16 @@ http://hamcrest.org/JavaHamcrest/javadoc/2.2/ http://google.github.io/truth/api/1.0.1/ http://www.slf4j.org/apidocs/ - https://google.github.io/guava/releases/28.2-jre/api/docs/ + https://google.github.io/guava/releases/29.0-jre/api/docs/ http://doc.akka.io/japi/akka/2.5.31/ http://netty.io/4.1/api/ https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/ 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.odlparent/odlparent-docs/7.0.6/ - https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/5.0.6/ - https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/6.0.5/ + https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/8.0.0/ + https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/6.0.0-SNAPSHOT/ + https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/7.0.0-SNAPSHOT/ diff --git a/features/features-controller-experimental/pom.xml b/features/features-controller-experimental/pom.xml index c0369e197f..362da1be28 100644 --- a/features/features-controller-experimental/pom.xml +++ b/features/features-controller-experimental/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent feature-repo-parent - 7.0.6 + 8.0.0 diff --git a/features/features-controller-testing/pom.xml b/features/features-controller-testing/pom.xml index 20d48f79ee..fc8da803af 100644 --- a/features/features-controller-testing/pom.xml +++ b/features/features-controller-testing/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent feature-repo-parent - 7.0.6 + 8.0.0 diff --git a/features/features-controller/pom.xml b/features/features-controller/pom.xml index b849f9afae..3620acb18a 100644 --- a/features/features-controller/pom.xml +++ b/features/features-controller/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent feature-repo-parent - 7.0.6 + 8.0.0 diff --git a/features/odl-clustering-test-app/src/main/feature/feature.xml b/features/odl-clustering-test-app/src/main/feature/feature.xml index e3ac08c4f1..96ef65632e 100644 --- a/features/odl-clustering-test-app/src/main/feature/feature.xml +++ b/features/odl-clustering-test-app/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-mdsal-model-rfc6991 + odl-mdsal-model-rfc6991 diff --git a/features/odl-controller-blueprint/src/main/feature/feature.xml b/features/odl-controller-blueprint/src/main/feature/feature.xml index 94e3c3f7ef..86adcc657d 100644 --- a/features/odl-controller-blueprint/src/main/feature/feature.xml +++ b/features/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/${project.version} diff --git a/features/odl-controller-exp-messagebus/src/main/feature/feature.xml b/features/odl-controller-exp-messagebus/src/main/feature/feature.xml index f804c0bb07..c9b88bc8d7 100644 --- a/features/odl-controller-exp-messagebus/src/main/feature/feature.xml +++ b/features/odl-controller-exp-messagebus/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal diff --git a/features/odl-controller-exp-netty-config/src/main/feature/feature.xml b/features/odl-controller-exp-netty-config/src/main/feature/feature.xml index 50c1970475..70c4c6bc06 100644 --- a/features/odl-controller-exp-netty-config/src/main/feature/feature.xml +++ b/features/odl-controller-exp-netty-config/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-netty-4 + odl-netty-4 diff --git a/features/odl-controller-mdsal-common/src/main/feature/feature.xml b/features/odl-controller-mdsal-common/src/main/feature/feature.xml index d4e521703d..2dd5b08826 100644 --- a/features/odl-controller-mdsal-common/src/main/feature/feature.xml +++ b/features/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/odl-controller-model-topology/src/main/feature/feature.xml b/features/odl-controller-model-topology/src/main/feature/feature.xml index 462ef7cfc9..1b0e403059 100644 --- a/features/odl-controller-model-topology/src/main/feature/feature.xml +++ b/features/odl-controller-model-topology/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal + odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal diff --git a/features/odl-mdsal-broker-local/src/main/feature/feature.xml b/features/odl-mdsal-broker-local/src/main/feature/feature.xml index e9c07e4218..d4ad4d4cdf 100644 --- a/features/odl-mdsal-broker-local/src/main/feature/feature.xml +++ b/features/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/odl-mdsal-broker/src/main/feature/feature.xml b/features/odl-mdsal-broker/src/main/feature/feature.xml index 55212bf2f2..2e38fd396f 100644 --- a/features/odl-mdsal-broker/src/main/feature/feature.xml +++ b/features/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/odl-mdsal-clustering-commons/pom.xml b/features/odl-mdsal-clustering-commons/pom.xml index a88258bca4..a69095d9f6 100644 --- a/features/odl-mdsal-clustering-commons/pom.xml +++ b/features/odl-mdsal-clustering-commons/pom.xml @@ -22,20 +22,8 @@ - org.opendaylight.odlparent - odl-akka-system-2.5 - xml - features - - - org.opendaylight.odlparent - odl-akka-persistence-2.5 - xml - features - - - org.opendaylight.odlparent - odl-akka-clustering-2.5 + org.opendaylight.controller + odl-controller-akka xml features diff --git a/features/odl-mdsal-clustering-commons/src/main/feature/feature.xml b/features/odl-mdsal-clustering-commons/src/main/feature/feature.xml index eae70777bf..e6ed3054a9 100644 --- a/features/odl-mdsal-clustering-commons/src/main/feature/feature.xml +++ b/features/odl-mdsal-clustering-commons/src/main/feature/feature.xml @@ -8,13 +8,10 @@ --> - 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-apache-commons-lang3 + odl-dropwizard-metrics + odl-servlet-api + odl-yangtools-data + odl-yangtools-codec diff --git a/features/odl-mdsal-distributed-datastore/src/main/feature/feature.xml b/features/odl-mdsal-distributed-datastore/src/main/feature/feature.xml index 29a32bd2cf..9f67ce24ee 100644 --- a/features/odl-mdsal-distributed-datastore/src/main/feature/feature.xml +++ b/features/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/odl-mdsal-model-inventory/src/main/feature/feature.xml b/features/odl-mdsal-model-inventory/src/main/feature/feature.xml index d126926c6f..0639485275 100644 --- a/features/odl-mdsal-model-inventory/src/main/feature/feature.xml +++ b/features/odl-mdsal-model-inventory/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-mdsal-model-rfc6991 + odl-mdsal-model-rfc6991 diff --git a/features/odl-toaster/src/main/feature/feature.xml b/features/odl-toaster/src/main/feature/feature.xml index 18ee3b2026..6c4e82184d 100644 --- a/features/odl-toaster/src/main/feature/feature.xml +++ b/features/odl-toaster/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-mdsal-binding-runtime + odl-mdsal-binding-runtime diff --git a/features/pom.xml b/features/pom.xml index a132713f46..4bf284db32 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/features/single-feature-parent/pom.xml b/features/single-feature-parent/pom.xml index 6a9c040ecf..a4087f8ecd 100644 --- a/features/single-feature-parent/pom.xml +++ b/features/single-feature-parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent single-feature-parent - 7.0.6 + 8.0.0 @@ -24,7 +24,7 @@ org.opendaylight.controller - mdsal-parent + bundle-parent 3.0.0-SNAPSHOT pom import diff --git a/karaf/pom.xml b/karaf/pom.xml index 43f0f6c685..8571873492 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent karaf4-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index 186d630595..9faea3df9d 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 @@ -27,14 +27,14 @@ org.opendaylight.yangtools yangtools-artifacts - 5.0.6 + 6.0.0-SNAPSHOT pom import org.opendaylight.mdsal mdsal-artifacts - 6.0.5 + 7.0.0-SNAPSHOT pom import diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractInvokableServiceMetadata.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractInvokableServiceMetadata.java index 873fd00abe..35f59f85c5 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractInvokableServiceMetadata.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractInvokableServiceMetadata.java @@ -23,8 +23,8 @@ import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.mdsal.dom.spi.RpcRoutingStrategy; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.binding.RpcService; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.osgi.service.blueprint.container.ComponentDefinitionException; abstract class AbstractInvokableServiceMetadata extends AbstractDependentComponentFactoryMetadata { @@ -33,7 +33,7 @@ abstract class AbstractInvokableServiceMetadata extends AbstractDependentCompone private ListenerRegistration rpcListenerReg; private RpcConsumerRegistry rpcRegistry; private Class rpcInterface; - private Set rpcSchemaPaths; + private Set rpcSchemaPaths; AbstractInvokableServiceMetadata(final String id, final String interfaceName) { super(id); @@ -89,7 +89,7 @@ abstract class AbstractInvokableServiceMetadata extends AbstractDependentCompone private void retrievedSchemaContext(final SchemaContext schemaContext) { log.debug("{}: retrievedSchemaContext", logName()); - final Collection schemaPaths = RpcUtil.decomposeRpcService(rpcInterface, schemaContext, + final Collection schemaPaths = RpcUtil.decomposeRpcService(rpcInterface, schemaContext, rpcFilter()); if (schemaPaths.isEmpty()) { log.debug("{}: interface {} has no acceptable entries, assuming it is satisfied", logName(), rpcInterface); diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/ActionProviderBean.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/ActionProviderBean.java index af943f91de..cb97fb00fd 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/ActionProviderBean.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/ActionProviderBean.java @@ -20,7 +20,7 @@ import org.opendaylight.mdsal.dom.spi.RpcRoutingStrategy; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.util.concurrent.FluentFutures; import org.opendaylight.yangtools.yang.binding.RpcService; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.common.QName; import org.osgi.framework.Bundle; import org.osgi.service.blueprint.container.ComponentDefinitionException; import org.slf4j.Logger; @@ -121,7 +121,7 @@ public class ActionProviderBean { } private void registerFallback(final Class interfaceClass) { - final Collection paths = RpcUtil.decomposeRpcService(interfaceClass, + final Collection paths = RpcUtil.decomposeRpcService(interfaceClass, schemaService.getGlobalContext(), RpcRoutingStrategy::isContextBasedRouted); if (paths.isEmpty()) { LOG.warn("{}: interface {} has no actions defined", ACTION_PROVIDER, interfaceClass); 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 7ecc14e636..331aac7e30 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 @@ -13,11 +13,11 @@ import java.util.function.Predicate; import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections; import org.opendaylight.mdsal.dom.spi.RpcRoutingStrategy; import org.opendaylight.yangtools.yang.binding.RpcService; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.model.api.Module; import org.opendaylight.yangtools.yang.model.api.RpcDefinition; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,7 +33,7 @@ final class RpcUtil { throw new UnsupportedOperationException(); } - static Collection decomposeRpcService(final Class service, + static Collection decomposeRpcService(final Class service, final SchemaContext schemaContext, final Predicate filter) { final QNameModule moduleName = BindingReflections.getQNameModule(service); final Module module = schemaContext.findModule(moduleName).orElseThrow(() -> new IllegalArgumentException( @@ -41,11 +41,11 @@ final class RpcUtil { LOG.debug("Resolved service {} to module {}", service, module); final Collection rpcs = module.getRpcs(); - final Collection ret = new ArrayList<>(rpcs.size()); + final Collection ret = new ArrayList<>(rpcs.size()); for (RpcDefinition rpc : rpcs) { final RpcRoutingStrategy strategy = RpcRoutingStrategy.from(rpc); if (filter.test(strategy)) { - ret.add(rpc.getPath()); + ret.add(rpc.getQName()); } } diff --git a/opendaylight/commons/jolokia/pom.xml b/opendaylight/commons/jolokia/pom.xml index fbcec81cda..2eab26c056 100644 --- a/opendaylight/commons/jolokia/pom.xml +++ b/opendaylight/commons/jolokia/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/netty-event-executor-config/pom.xml b/opendaylight/config/netty-event-executor-config/pom.xml index fc3c2f9b44..95af0a1cb2 100644 --- a/opendaylight/config/netty-event-executor-config/pom.xml +++ b/opendaylight/config/netty-event-executor-config/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/netty-threadgroup-config/pom.xml b/opendaylight/config/netty-threadgroup-config/pom.xml index b289cb439f..8586e60052 100644 --- a/opendaylight/config/netty-threadgroup-config/pom.xml +++ b/opendaylight/config/netty-threadgroup-config/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/netty-timer-config/pom.xml b/opendaylight/config/netty-timer-config/pom.xml index 62cebf6362..e4155c5988 100644 --- a/opendaylight/config/netty-timer-config/pom.xml +++ b/opendaylight/config/netty-timer-config/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/pom.xml b/opendaylight/config/pom.xml index ed8c0161b1..522c62e4b6 100644 --- a/opendaylight/config/pom.xml +++ b/opendaylight/config/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/threadpool-config-api/pom.xml b/opendaylight/config/threadpool-config-api/pom.xml index 87fbcab528..57eff47f45 100644 --- a/opendaylight/config/threadpool-config-api/pom.xml +++ b/opendaylight/config/threadpool-config-api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/config/threadpool-config-impl/pom.xml b/opendaylight/config/threadpool-config-impl/pom.xml index 9c0e051cfa..d3ee816e58 100644 --- a/opendaylight/config/threadpool-config-impl/pom.xml +++ b/opendaylight/config/threadpool-config-impl/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 7.0.6 + 8.0.0 diff --git a/opendaylight/md-sal/cds-access-api/pom.xml b/opendaylight/md-sal/cds-access-api/pom.xml index 52e0190114..22fa2059d5 100644 --- a/opendaylight/md-sal/cds-access-api/pom.xml +++ b/opendaylight/md-sal/cds-access-api/pom.xml @@ -13,8 +13,8 @@ - com.typesafe.akka - akka-actor_2.13 + org.opendaylight.controller + repackaged-akka @@ -40,7 +40,6 @@ com.typesafe.akka akka-testkit_2.13 - test commons-lang diff --git a/opendaylight/md-sal/cds-access-client/pom.xml b/opendaylight/md-sal/cds-access-client/pom.xml index 9eaaf5800a..634cc6f105 100644 --- a/opendaylight/md-sal/cds-access-client/pom.xml +++ b/opendaylight/md-sal/cds-access-client/pom.xml @@ -16,10 +16,6 @@ org.opendaylight.controller cds-access-api - - com.typesafe.akka - akka-actor_2.13 - org.opendaylight.yangtools @@ -37,7 +33,6 @@ com.typesafe.akka akka-testkit_2.13 - test com.google.guava diff --git a/opendaylight/md-sal/cds-dom-api/pom.xml b/opendaylight/md-sal/cds-dom-api/pom.xml index 956527f524..2c48997331 100644 --- a/opendaylight/md-sal/cds-dom-api/pom.xml +++ b/opendaylight/md-sal/cds-dom-api/pom.xml @@ -13,8 +13,8 @@ - com.typesafe.akka - akka-actor_2.13 + org.opendaylight.controller + repackaged-akka diff --git a/opendaylight/md-sal/mdsal-it-base/pom.xml b/opendaylight/md-sal/mdsal-it-base/pom.xml index 28562f822f..2ba6f29e1a 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 - 7.0.6 + 8.0.0 @@ -26,7 +26,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.mdsal mdsal-artifacts - 6.0.5 + 7.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 f8b8992498..58496a0f99 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 - 7.0.6 + 8.0.0 @@ -27,6 +27,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html opendaylight-karaf-empty zip false + + + false diff --git a/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotification.java b/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotification.java index 69a8b2795a..348abad35f 100644 --- a/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotification.java +++ b/opendaylight/md-sal/messagebus-util/src/main/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotification.java @@ -7,14 +7,15 @@ */ package org.opendaylight.controller.messagebus.app.util; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.mdsal.dom.api.DOMNotification; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicNotification; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class TopicDOMNotification implements DOMNotification { + private static final @NonNull Absolute TOPIC_NOTIFICATION_ID = Absolute.of(TopicNotification.QNAME); - private static final SchemaPath TOPIC_NOTIFICATION_ID = SchemaPath.create(true, TopicNotification.QNAME); private final ContainerNode body; public TopicDOMNotification(final ContainerNode body) { @@ -22,7 +23,7 @@ public class TopicDOMNotification implements DOMNotification { } @Override - public SchemaPath getType() { + public Absolute getType() { return TOPIC_NOTIFICATION_ID; } diff --git a/opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java b/opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java index a366c6963f..be11b1014a 100644 --- a/opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java +++ b/opendaylight/md-sal/messagebus-util/src/test/java/org/opendaylight/controller/messagebus/app/util/TopicDOMNotificationTest.java @@ -17,7 +17,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventaggregator.rev141202.TopicNotification; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class TopicDOMNotificationTest { @@ -43,8 +43,8 @@ public class TopicDOMNotificationTest { @Test public void getTypeTest() { - SchemaPath topicNotificationId = SchemaPath.create(true, TopicNotification.QNAME); - assertEquals("Type has not been created correctly.", topicNotificationId, topicDOMNotification.getType()); + assertEquals("Type has not been created correctly.", Absolute.of(TopicNotification.QNAME), + topicDOMNotification.getType()); } @Test diff --git a/opendaylight/md-sal/parent/pom.xml b/opendaylight/md-sal/parent/pom.xml index 43004c3c2b..8dfe93a2d0 100644 --- a/opendaylight/md-sal/parent/pom.xml +++ b/opendaylight/md-sal/parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 6.0.5 + 7.0.0-SNAPSHOT @@ -24,7 +24,7 @@ org.opendaylight.controller - controller-artifacts + bundle-parent 3.0.0-SNAPSHOT pom import diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index 2464f7cdb0..2e2b294cd4 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/opendaylight/md-sal/sal-akka-raft/pom.xml b/opendaylight/md-sal/sal-akka-raft/pom.xml index 90c03a62de..9e24995a9f 100644 --- a/opendaylight/md-sal/sal-akka-raft/pom.xml +++ b/opendaylight/md-sal/sal-akka-raft/pom.xml @@ -17,24 +17,8 @@ sal-clustering-commons - com.typesafe.akka - akka-actor_2.13 - - - com.typesafe.akka - akka-cluster_2.13 - - - com.typesafe.akka - akka-persistence_2.13 - - - com.typesafe.akka - akka-remote_2.13 - - - com.typesafe.akka - akka-slf4j_2.13 + org.opendaylight.controller + repackaged-akka org.scala-lang @@ -53,7 +37,6 @@ com.typesafe.akka akka-testkit_2.13 - test org.awaitility diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml b/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml index e77dfebcfa..7b7419e947 100644 --- a/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml +++ b/opendaylight/md-sal/sal-akka-segmented-journal/pom.xml @@ -19,20 +19,16 @@ and is available at http://www.eclipse.org/legal/epl-v10.html sal-akka-segmented-journal bundle + + + false + + - com.typesafe.akka - akka-actor_2.13 - - - com.typesafe.akka - akka-persistence_2.13 - - - com.typesafe.akka - akka-slf4j_2.13 - test + org.opendaylight.controller + repackaged-akka com.typesafe.akka diff --git a/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml b/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml index 9907066b6c..ba7b6de9ec 100644 --- a/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml +++ b/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml @@ -52,14 +52,9 @@ - - com.typesafe.akka - akka-actor_2.13 - com.typesafe.akka akka-testkit_2.13 - test diff --git a/opendaylight/md-sal/sal-clustering-commons/pom.xml b/opendaylight/md-sal/sal-clustering-commons/pom.xml index 2da58c373b..24edda47ac 100644 --- a/opendaylight/md-sal/sal-clustering-commons/pom.xml +++ b/opendaylight/md-sal/sal-clustering-commons/pom.xml @@ -11,6 +11,11 @@ sal-clustering-commons bundle + + + false + + @@ -47,49 +52,24 @@ - com.typesafe.akka - akka-actor_2.13 - - - com.typesafe.akka - akka-cluster_2.13 + org.opendaylight.controller + repackaged-akka com.typesafe.akka - akka-osgi_2.13 - - - org.osgi - org.osgi.compendium - - - - - com.typesafe.akka - akka-persistence_2.13 + akka-testkit_2.13 com.typesafe.akka - akka-remote_2.13 + akka-persistence-tck_2.13 + javax.servlet javax.servlet-api - - com.typesafe.akka - akka-slf4j_2.13 - - - com.typesafe.akka - akka-testkit_2.13 - - - com.typesafe.akka - akka-persistence-tck_2.13 - diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/AbstractNormalizedNodePruner.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/AbstractNormalizedNodePruner.java index f0ef49645a..8999034504 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/AbstractNormalizedNodePruner.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/AbstractNormalizedNodePruner.java @@ -29,7 +29,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.ReusableImmutableNormali import org.opendaylight.yangtools.yang.data.util.DataSchemaContextNode; import org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -72,7 +72,7 @@ abstract class AbstractNormalizedNodePruner implements NormalizedNodeStreamWrite this.tree = requireNonNull(tree); } - AbstractNormalizedNodePruner(final SchemaContext schemaContext) { + AbstractNormalizedNodePruner(final EffectiveModelContext schemaContext) { this(DataSchemaContextTree.from(schemaContext)); } diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/ReusableNormalizedNodePruner.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/ReusableNormalizedNodePruner.java index d9563235b7..4b75428f9d 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/ReusableNormalizedNodePruner.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/ReusableNormalizedNodePruner.java @@ -11,7 +11,7 @@ import com.google.common.annotations.Beta; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; /** * The NormalizedNodePruner removes all nodes from the input NormalizedNode that do not have a corresponding @@ -21,7 +21,7 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext; @Beta public abstract class ReusableNormalizedNodePruner extends AbstractNormalizedNodePruner { private static final class SimplePruner extends ReusableNormalizedNodePruner { - SimplePruner(final SchemaContext schemaContext) { + SimplePruner(final EffectiveModelContext schemaContext) { super(schemaContext); } @@ -35,7 +35,7 @@ public abstract class ReusableNormalizedNodePruner extends AbstractNormalizedNod } } - ReusableNormalizedNodePruner(final SchemaContext schemaContext) { + ReusableNormalizedNodePruner(final EffectiveModelContext schemaContext) { super(schemaContext); } @@ -50,13 +50,13 @@ public abstract class ReusableNormalizedNodePruner extends AbstractNormalizedNod * @return A new uninitialized pruner * @throws NullPointerException if {@code schemaContext} is null */ - public static @NonNull ReusableNormalizedNodePruner forSchemaContext(final SchemaContext schemaContext) { + public static @NonNull ReusableNormalizedNodePruner forSchemaContext(final EffectiveModelContext schemaContext) { return new SimplePruner(schemaContext); } /** * Create a new pruner bound to a DataSchemaContextTree. This is a more efficient alternative of - * {@link #forSchemaContext(SchemaContext)}. + * {@link #forSchemaContext(EffectiveModelContext)}. * * @param tree DataSchemaContextTree to use * @return A new uninitialized pruner diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePrunerTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePrunerTest.java index 422b9ce9c5..41e494c56d 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePrunerTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePrunerTest.java @@ -39,13 +39,13 @@ import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetEntryNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; @RunWith(MockitoJUnitRunner.StrictStubs.class) public class NormalizedNodePrunerTest { - private static final SchemaContext NO_TEST_SCHEMA = TestModel.createTestContextWithoutTestSchema(); - private static final SchemaContext NO_AUG_SCHEMA = TestModel.createTestContextWithoutAugmentationSchema(); - private static final SchemaContext FULL_SCHEMA = TestModel.createTestContext(); + private static final EffectiveModelContext NO_TEST_SCHEMA = TestModel.createTestContextWithoutTestSchema(); + private static final EffectiveModelContext NO_AUG_SCHEMA = TestModel.createTestContextWithoutAugmentationSchema(); + private static final EffectiveModelContext FULL_SCHEMA = TestModel.createTestContext(); private static AbstractNormalizedNodePruner prunerFullSchema(final YangInstanceIdentifier path) { final ReusableNormalizedNodePruner pruner = ReusableNormalizedNodePruner.forSchemaContext(FULL_SCHEMA); diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java index d99134682f..c613d6cf62 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java @@ -43,7 +43,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableCo import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetEntryNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableMapEntryNodeBuilder; -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 { @@ -170,16 +170,16 @@ public final class TestModel { return TestModel.class.getResourceAsStream(resourceName); } - public static SchemaContext createTestContext() { + public static EffectiveModelContext createTestContext() { return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG, DATASTORE_AUG_YANG, DATASTORE_TEST_NOTIFICATION_YANG); } - public static SchemaContext createTestContextWithoutTestSchema() { + public static EffectiveModelContext createTestContextWithoutTestSchema() { return YangParserTestUtils.parseYangResource(DATASTORE_TEST_NOTIFICATION_YANG); } - public static SchemaContext createTestContextWithoutAugmentationSchema() { + public static EffectiveModelContext createTestContextWithoutAugmentationSchema() { return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG, DATASTORE_TEST_NOTIFICATION_YANG); } diff --git a/opendaylight/md-sal/sal-clustering-config/pom.xml b/opendaylight/md-sal/sal-clustering-config/pom.xml index c42e79fcea..32babe6634 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 - 7.0.6 + 8.0.0 diff --git a/opendaylight/md-sal/sal-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-distributed-datastore/pom.xml index 696891e523..b38618f1b4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/pom.xml @@ -11,6 +11,11 @@ sal-distributed-datastore bundle + + + false + + @@ -29,36 +34,6 @@ - - com.typesafe.akka - akka-actor_2.13 - - - com.typesafe.akka - akka-cluster_2.13 - - - com.typesafe.akka - akka-osgi_2.13 - - - org.osgi - org.osgi.compendium - - - - - com.typesafe.akka - akka-persistence_2.13 - - - com.typesafe.akka - akka-remote_2.13 - - - com.typesafe.akka - akka-slf4j_2.13 - org.scala-lang.modules scala-java8-compat_2.13 @@ -66,7 +41,6 @@ com.typesafe.akka akka-testkit_2.13 - test diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java index 8ce7119651..f156c2fe9f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java @@ -23,7 +23,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.DataTreeModificationCursor; import org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaValidationFailedException; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -127,8 +127,8 @@ public abstract class PruningDataTreeModification extends ForwardingObject imple } @Override - public final SchemaContext getSchemaContext() { - return delegate.getSchemaContext(); + public final EffectiveModelContext getEffectiveModelContext() { + return delegate.getEffectiveModelContext(); } @Override 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 aab9322e9a..bbe676bfa3 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 @@ -23,8 +23,8 @@ import static org.opendaylight.mdsal.common.api.LogicalDatastoreType.OPERATIONAL import java.util.HashMap; import java.util.Map; import org.junit.Test; -import org.opendaylight.binding.runtime.spi.BindingRuntimeHelpers; import org.opendaylight.mdsal.binding.dom.codec.impl.BindingCodecContext; +import org.opendaylight.mdsal.binding.runtime.spi.BindingRuntimeHelpers; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainer; /** diff --git a/opendaylight/md-sal/sal-distributed-eos/pom.xml b/opendaylight/md-sal/sal-distributed-eos/pom.xml index 8ab10e4e49..000a6a040e 100644 --- a/opendaylight/md-sal/sal-distributed-eos/pom.xml +++ b/opendaylight/md-sal/sal-distributed-eos/pom.xml @@ -11,6 +11,11 @@ sal-distributed-eos bundle + + + false + + org.opendaylight.mdsal @@ -35,7 +40,6 @@ com.typesafe.akka akka-testkit_2.13 - test org.opendaylight.controller diff --git a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml index cd5cc1d89e..ed8e05f2e1 100644 --- a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml @@ -12,42 +12,6 @@ bundle - - com.typesafe.akka - akka-actor_2.13 - - - - com.typesafe.akka - akka-cluster_2.13 - - - - com.typesafe.akka - akka-persistence_2.13 - - - - com.typesafe.akka - akka-remote_2.13 - - - - com.typesafe.akka - akka-testkit_2.13 - test - - - - com.typesafe.akka - akka-slf4j_2.13 - - - - com.typesafe.akka - akka-osgi_2.13 - - org.opendaylight.controller sal-clustering-commons @@ -65,9 +29,8 @@ - org.mockito - mockito-core - test + com.typesafe.akka + akka-testkit_2.13 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml index 973cbbc022..b940e198cc 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml +++ b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml @@ -13,39 +13,8 @@ - com.typesafe.akka - akka-actor_2.13 - - - com.typesafe.akka - akka-cluster_2.13 - - - com.typesafe.akka - akka-remote_2.13 - - - com.typesafe.akka - akka-testkit_2.13 - test - - - com.typesafe.akka - akka-osgi_2.13 - - - org.osgi - org.osgi.compendium - - - - - com.typesafe.akka - akka-slf4j_2.13 - - - com.typesafe.akka - akka-persistence_2.13 + org.opendaylight.controller + repackaged-akka @@ -90,6 +59,10 @@ scala-library + + com.typesafe.akka + akka-testkit_2.13 + org.slf4j slf4j-simple diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteFuture.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteFuture.java index ae977d6d22..7fd8598978 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteFuture.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteFuture.java @@ -16,24 +16,23 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.ExecutionContext; import scala.concurrent.Future; -abstract class AbstractRemoteFuture extends AbstractFuture { +abstract class AbstractRemoteFuture extends AbstractFuture { private static final Logger LOG = LoggerFactory.getLogger(AbstractRemoteFuture.class); - private final @NonNull SchemaPath type; + private final @NonNull T type; - AbstractRemoteFuture(final @NonNull SchemaPath type, final Future requestFuture) { + AbstractRemoteFuture(final @NonNull T type, final Future requestFuture) { this.type = requireNonNull(type); requestFuture.onComplete(new FutureUpdater(), ExecutionContext.Implicits$.MODULE$.global()); } @Override - public final T get() throws InterruptedException, ExecutionException { + public final O get() throws InterruptedException, ExecutionException { try { return super.get(); } catch (ExecutionException e) { @@ -42,7 +41,7 @@ abstract class AbstractRemoteFuture extends AbstractFutu } @Override - public final T get(final long timeout, final TimeUnit unit) + public final O get(final long timeout, final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { try { return super.get(timeout, unit); @@ -52,7 +51,7 @@ abstract class AbstractRemoteFuture extends AbstractFutu } @Override - protected final boolean set(final T value) { + protected final boolean set(final O value) { final boolean ret = super.set(value); if (ret) { LOG.debug("Future {} for action {} successfully completed", this, type); @@ -65,7 +64,7 @@ abstract class AbstractRemoteFuture extends AbstractFutu setException(error); } - abstract @Nullable T processReply(Object reply); + abstract @Nullable O processReply(Object reply); abstract @NonNull Class exceptionClass(); @@ -80,7 +79,7 @@ abstract class AbstractRemoteFuture extends AbstractFutu @Override public void onComplete(final Throwable error, final Object reply) { if (error == null) { - final T result = processReply(reply); + final O result = processReply(reply); if (result != null) { LOG.debug("Received response for operation {}: result is {}", type, result); set(result); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteImplementation.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteImplementation.java index 6a8030f7c7..838252bbd9 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteImplementation.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/AbstractRemoteImplementation.java @@ -18,7 +18,7 @@ import scala.concurrent.Future; /** * An abstract base class for remote RPC/action implementations. */ -abstract class AbstractRemoteImplementation> { +abstract class AbstractRemoteImplementation> { // 0 for local, 1 for binding, 2 for remote static final long COST = 2; diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/OpsInvoker.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/OpsInvoker.java index 5ccea6a423..4ac3867d67 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/OpsInvoker.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/OpsInvoker.java @@ -29,10 +29,12 @@ import org.opendaylight.mdsal.dom.api.DOMActionService; import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier; import org.opendaylight.mdsal.dom.api.DOMRpcResult; import org.opendaylight.mdsal.dom.api.DOMRpcService; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.RpcError; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; /** * Actor receiving invocation requests from remote nodes, routing them to @@ -91,15 +93,15 @@ final class OpsInvoker extends AbstractUntypedActor { return; } - Futures.addCallback(future, new AbstractCallback(getSender(), msg.getType()) { + Futures.addCallback(future, new AbstractCallback(getSender(), msg.getType()) { @Override - Object nullResponse(final SchemaPath type) { + Object nullResponse(final QName type) { LOG.warn("Execution of {} resulted in null result", type); return new RpcResponse(null); } @Override - Object response(final SchemaPath type, final DOMRpcResult result) { + Object response(final QName type, final DOMRpcResult result) { final Collection errors = result.getErrors(); return errors.isEmpty() ? new RpcResponse(result.getResult()) // This is legacy (wrong) behavior, which ignores the fact that errors may be just warnings, @@ -125,14 +127,14 @@ final class OpsInvoker extends AbstractUntypedActor { return; } - Futures.addCallback(future, new AbstractCallback(getSender(), msg.getType()) { + Futures.addCallback(future, new AbstractCallback(getSender(), msg.getType()) { @Override - Object nullResponse(final SchemaPath type) { + Object nullResponse(final Absolute type) { throw new IllegalStateException("Null invocation result of action " + type); } @Override - Object response(final SchemaPath type, final DOMActionResult result) { + Object response(final Absolute type, final DOMActionResult result) { final Collection errors = result.getErrors(); return errors.isEmpty() ? new ActionResponse(result.getOutput(), result.getErrors()) // This is legacy (wrong) behavior, which ignores the fact that errors may be just warnings, @@ -143,17 +145,17 @@ final class OpsInvoker extends AbstractUntypedActor { }, MoreExecutors.directExecutor()); } - private abstract class AbstractCallback implements FutureCallback { + private abstract class AbstractCallback implements FutureCallback { private final ActorRef replyTo; - private final SchemaPath type; + private final T type; - AbstractCallback(final ActorRef replyTo, final SchemaPath type) { + AbstractCallback(final ActorRef replyTo, final T type) { this.replyTo = requireNonNull(replyTo); this.type = requireNonNull(type); } @Override - public final void onSuccess(final T result) { + public final void onSuccess(final R result) { final Object response; if (result == null) { // This shouldn't happen but the FutureCallback annotates the result param with Nullable so handle null @@ -175,8 +177,8 @@ final class OpsInvoker extends AbstractUntypedActor { replyTo.tell(new Failure(failure), self()); } - abstract @NonNull Object nullResponse(@NonNull SchemaPath type); + abstract @NonNull Object nullResponse(@NonNull T type); - abstract @NonNull Object response(@NonNull SchemaPath type, @NonNull T result); + abstract @NonNull Object response(@NonNull T type, @NonNull R result); } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteActionImplementation.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteActionImplementation.java index c3eeeedcd3..2b78806ba2 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteActionImplementation.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteActionImplementation.java @@ -14,7 +14,7 @@ import org.opendaylight.mdsal.dom.api.DOMActionImplementation; import org.opendaylight.mdsal.dom.api.DOMActionResult; import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,7 +33,7 @@ final class RemoteActionImplementation extends AbstractRemoteImplementation invokeAction(final SchemaPath type, final DOMDataTreeIdentifier path, + public ListenableFuture invokeAction(final Absolute type, final DOMDataTreeIdentifier path, final ContainerNode input) { LOG.debug("invoking action {} with path {}", type, path); return new RemoteDOMActionFuture(type, ask(ExecuteAction.from(type, path, input))); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMActionFuture.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMActionFuture.java index 8dbbff5bbe..6b4ab55de4 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMActionFuture.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMActionFuture.java @@ -13,11 +13,11 @@ import org.opendaylight.mdsal.dom.api.DOMActionException; import org.opendaylight.mdsal.dom.api.DOMActionResult; import org.opendaylight.mdsal.dom.spi.SimpleDOMActionResult; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import scala.concurrent.Future; -final class RemoteDOMActionFuture extends AbstractRemoteFuture { - RemoteDOMActionFuture(final @NonNull SchemaPath type, final @NonNull Future requestFuture) { +final class RemoteDOMActionFuture extends AbstractRemoteFuture { + RemoteDOMActionFuture(final @NonNull Absolute type, final @NonNull Future requestFuture) { super(type, requestFuture); } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java index b858f8056a..ef1e635bcb 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java @@ -12,11 +12,11 @@ import org.opendaylight.controller.remote.rpc.messages.RpcResponse; import org.opendaylight.mdsal.dom.api.DOMRpcException; import org.opendaylight.mdsal.dom.api.DOMRpcResult; import org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.common.QName; import scala.concurrent.Future; -final class RemoteDOMRpcFuture extends AbstractRemoteFuture { - RemoteDOMRpcFuture(final @NonNull SchemaPath type, final @NonNull Future requestFuture) { +final class RemoteDOMRpcFuture extends AbstractRemoteFuture { + RemoteDOMRpcFuture(final @NonNull QName type, final @NonNull Future requestFuture) { super(type, requestFuture); } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/AbstractExecute.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/AbstractExecute.java index a23bcb3a9f..e9e04b2bda 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/AbstractExecute.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/AbstractExecute.java @@ -14,27 +14,26 @@ import com.google.common.base.MoreObjects.ToStringHelper; import java.io.Serializable; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; /** * An abstract base class for invocation requests. Specialized via {@link ExecuteAction} and {@link ExecuteRpc}. */ -public abstract class AbstractExecute> implements Serializable { +public abstract class AbstractExecute> implements Serializable { private static final long serialVersionUID = 1L; - private final transient @NonNull SchemaPath type; - private final transient T input; + private final transient @NonNull T type; + private final transient I input; - AbstractExecute(final @NonNull SchemaPath type, final T input) { + AbstractExecute(final @NonNull T type, final I input) { this.type = requireNonNull(type); this.input = input; } - public final @NonNull SchemaPath getType() { + public final @NonNull T getType() { return type; } - public final T getInput() { + public final I getInput() { return input; } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteAction.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteAction.java index 4fb9c61429..cb03c220be 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteAction.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteAction.java @@ -13,6 +13,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.base.MoreObjects.ToStringHelper; import java.io.Externalizable; import java.io.IOException; +import java.io.InvalidObjectException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.eclipse.jdt.annotation.NonNull; @@ -23,20 +24,21 @@ import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataInput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataOutput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeStreamVersion; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; -public final class ExecuteAction extends AbstractExecute<@NonNull ContainerNode> { +public final class ExecuteAction extends AbstractExecute { private static final long serialVersionUID = 1128904894827335676L; private final @NonNull DOMDataTreeIdentifier path; - private ExecuteAction(final @NonNull SchemaPath type, final @NonNull DOMDataTreeIdentifier path, + private ExecuteAction(final @NonNull Absolute type, final @NonNull DOMDataTreeIdentifier path, final @NonNull ContainerNode input) { super(type, requireNonNull(input)); this.path = requireNonNull(path); } - public static @NonNull ExecuteAction from(final @NonNull SchemaPath type, @NonNull final DOMDataTreeIdentifier path, + public static @NonNull ExecuteAction from(final @NonNull Absolute type, @NonNull final DOMDataTreeIdentifier path, final @NonNull ContainerNode input) { return new ExecuteAction(type, path, input); } @@ -74,7 +76,7 @@ public final class ExecuteAction extends AbstractExecute<@NonNull ContainerNode> @Override public void writeExternal(final ObjectOutput out) throws IOException { try (NormalizedNodeDataOutput stream = NormalizedNodeStreamVersion.current().newDataOutput(out)) { - stream.writeSchemaPath(executeAction.getType()); + stream.writeSchemaNodeIdentifier(executeAction.getType()); executeAction.getPath().getDatastoreType().writeTo(out); stream.writeYangInstanceIdentifier(executeAction.getPath().getRootIdentifier()); stream.writeOptionalNormalizedNode(executeAction.getInput()); @@ -84,12 +86,16 @@ public final class ExecuteAction extends AbstractExecute<@NonNull ContainerNode> @Override public void readExternal(final ObjectInput in) throws IOException { final NormalizedNodeDataInput stream = NormalizedNodeDataInput.newDataInput(in); - final SchemaPath name = stream.readSchemaPath(); + final SchemaNodeIdentifier sni = stream.readSchemaNodeIdentifier(); + if (!(sni instanceof Absolute)) { + throw new InvalidObjectException("Non-absolute type " + sni); + } + final LogicalDatastoreType type = LogicalDatastoreType.readFrom(in); final YangInstanceIdentifier path = stream.readYangInstanceIdentifier(); final ContainerNode input = (ContainerNode) stream.readOptionalNormalizedNode().orElse(null); - executeAction = new ExecuteAction(name, new DOMDataTreeIdentifier(type, path), input); + executeAction = new ExecuteAction((Absolute) sni, new DOMDataTreeIdentifier(type, path), input); } private Object readResolve() { diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java index 135111f3c3..881a58775c 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/messages/ExecuteRpc.java @@ -16,16 +16,16 @@ import java.io.ObjectOutput; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataInput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataOutput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeStreamVersion; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; -public final class ExecuteRpc extends AbstractExecute<@Nullable NormalizedNode> { +public final class ExecuteRpc extends AbstractExecute> { private static final long serialVersionUID = 1128904894827335676L; - private ExecuteRpc(final @NonNull SchemaPath type, final @Nullable NormalizedNode input) { + private ExecuteRpc(final @NonNull QName type, final @Nullable NormalizedNode input) { super(type, input); } @@ -58,7 +58,7 @@ public final class ExecuteRpc extends AbstractExecute<@Nullable NormalizedNode input = stream.readOptionalNormalizedNode().orElse(null); executeRpc = new ExecuteRpc(type, input); } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRoutingTable.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRoutingTable.java index e81110f180..dfb05c67f1 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRoutingTable.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/ActionRoutingTable.java @@ -13,6 +13,7 @@ import akka.serialization.Serialization; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.Externalizable; import java.io.IOException; +import java.io.InvalidObjectException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.ArrayList; @@ -22,9 +23,12 @@ import java.util.Set; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMActionInstance; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataInput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataOutput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeStreamVersion; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,10 +61,10 @@ public final class ActionRoutingTable extends AbstractRoutingTable(size); for (int i = 0; i < size; ++i) { - actions.add(DOMActionInstance.of(nnin.readSchemaPath(), LogicalDatastoreType.OPERATIONAL, + final SchemaNodeIdentifier sni = nnin.readSchemaNodeIdentifier(); + if (!(sni instanceof Absolute)) { + throw new InvalidObjectException("Non-absolute type " + sni); + } + + actions.add(DOMActionInstance.of((Absolute) sni, LogicalDatastoreType.OPERATIONAL, nnin.readYangInstanceIdentifier())); } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java index 62312c14cb..f0795a3a42 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RoutingTable.java @@ -23,6 +23,7 @@ import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataInput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeDataOutput; import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeStreamVersion; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public final class RoutingTable extends AbstractRoutingTable { private static final class Proxy implements Externalizable { @@ -51,7 +52,8 @@ public final class RoutingTable extends AbstractRoutingTable(size); for (int i = 0; i < size; ++i) { - rpcs.add(DOMRpcIdentifier.create(nnin.readSchemaPath(), nnin.readYangInstanceIdentifier())); + // TODO: we should be able to get by with just a QName + rpcs.add(DOMRpcIdentifier.create(nnin.readSchemaNodeIdentifier().firstNodeIdentifier(), + nnin.readYangInstanceIdentifier())); } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java index cc117bd167..bacde76a4b 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImpl.java @@ -33,12 +33,10 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routedAction = new HashSet<>(table.getItems().size()); for (DOMActionInstance route : table.getItems()) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType()); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + routedAction.add(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + route.getType()); } } @@ -86,14 +84,12 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routes = table.getItems(); Map actionMap = new HashMap<>(routes.size()); for (DOMActionInstance route : routes) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - String routeString = actionPath.toString(); - if (routeString.contains(routeName)) { - actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + String routeString = actionPath.toString(); + if (routeString.contains(routeName)) { + actionMap.put(ROUTE_CONSTANT + routeString + NAME_CONSTANT + route.getType(), address); } } } @@ -108,14 +104,12 @@ public class RemoteActionRegistryMXBeanImpl extends AbstractRegistryMXBean routes = table.getItems(); Map actionMap = new HashMap<>(routes.size()); for (DOMActionInstance route : routes) { - if (route.getType().getLastComponent() != null) { - final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create( - new NodeIdentifier(route.getType().getLastComponent())); - if (!actionPath.isEmpty()) { - String type = route.getType().toString(); - if (type.contains(name)) { - actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address); - } + final YangInstanceIdentifier actionPath = YangInstanceIdentifier.create(new NodeIdentifier( + route.getType().lastNodeIdentifier())); + if (!actionPath.isEmpty()) { + String type = route.getType().toString(); + if (type.contains(name)) { + actionMap.put(ROUTE_CONSTANT + actionPath + NAME_CONSTANT + type, address); } } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractOpsTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractOpsTest.java index 4d96770a6a..7a7d32c981 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractOpsTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractOpsTest.java @@ -39,7 +39,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils; /** @@ -57,10 +57,10 @@ public class AbstractOpsTest { static final QName TEST_RPC_OUTPUT = QName.create(TEST_NS, TEST_REV, "output"); - static final SchemaPath TEST_RPC_TYPE = SchemaPath.create(true, TEST_RPC); + static final Absolute TEST_RPC_TYPE = Absolute.of(TEST_RPC); static final YangInstanceIdentifier TEST_PATH = YangInstanceIdentifier.create( new YangInstanceIdentifier.NodeIdentifier(TEST_RPC)); - public static final DOMRpcIdentifier TEST_RPC_ID = DOMRpcIdentifier.create(TEST_RPC_TYPE, TEST_PATH); + public static final DOMRpcIdentifier TEST_RPC_ID = DOMRpcIdentifier.create(TEST_RPC, TEST_PATH); public static final DOMDataTreeIdentifier TEST_DATA_TREE_ID = new DOMDataTreeIdentifier( LogicalDatastoreType.OPERATIONAL, TEST_PATH); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsBrokerTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsBrokerTest.java index d99c5bb3f3..a4e00591d1 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsBrokerTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsBrokerTest.java @@ -33,7 +33,7 @@ public class OpsBrokerTest extends AbstractOpsTest { final ContainerNode invokeRpcResult = makeRPCOutput("bar"); final DOMRpcResult rpcResult = new DefaultDOMRpcResult(invokeRpcResult); doReturn(FluentFutures.immediateFluentFuture(rpcResult)).when(domRpcService1) - .invokeRpc(eq(TEST_RPC_TYPE), any()); + .invokeRpc(eq(TEST_RPC), any()); final ExecuteRpc executeRpc = ExecuteRpc.from(TEST_RPC_ID, null); rpcInvoker1.tell(executeRpc, rpcRegistry1Probe.getRef()); @@ -45,7 +45,7 @@ public class OpsBrokerTest extends AbstractOpsTest { @Test public void testExecuteRpcFailureWithException() { - when(domRpcService1.invokeRpc(eq(TEST_RPC_TYPE), any())).thenReturn(FluentFutures.immediateFailedFluentFuture( + when(domRpcService1.invokeRpc(eq(TEST_RPC), any())).thenReturn(FluentFutures.immediateFailedFluentFuture( new DOMRpcImplementationNotAvailableException("NOT FOUND"))); final ExecuteRpc executeMsg = ExecuteRpc.from(TEST_RPC_ID, null); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsListenerTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsListenerTest.java index d5cfcc009f..5b3555594a 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsListenerTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsListenerTest.java @@ -22,15 +22,15 @@ import org.opendaylight.mdsal.dom.api.DOMActionInstance; import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class OpsListenerTest { private static final QName TEST_QNAME = QName.create("test", "2015-06-12", "test"); - private static final SchemaPath RPC_TYPE = SchemaPath.create(true, TEST_QNAME); - private static final YangInstanceIdentifier TEST_PATH = YangInstanceIdentifier - .create(new YangInstanceIdentifier.NodeIdentifier(TEST_QNAME)); - private static final DOMRpcIdentifier RPC_ID = DOMRpcIdentifier.create(RPC_TYPE, TEST_PATH); + private static final Absolute RPC_TYPE = Absolute.of(TEST_QNAME); + private static final YangInstanceIdentifier TEST_PATH = + YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(TEST_QNAME)); + private static final DOMRpcIdentifier RPC_ID = DOMRpcIdentifier.create(TEST_QNAME, TEST_PATH); private static final DOMActionInstance ACTION_INSTANCE = DOMActionInstance.of(RPC_TYPE, LogicalDatastoreType.OPERATIONAL, TEST_PATH); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsRegistrarTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsRegistrarTest.java index 1bbb22ed7a..4569ac68ab 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsRegistrarTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/OpsRegistrarTest.java @@ -43,7 +43,7 @@ import org.opendaylight.mdsal.dom.api.DOMRpcProviderService; import org.opendaylight.yangtools.concepts.ObjectRegistration; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class OpsRegistrarTest { @Mock @@ -79,18 +79,16 @@ public class OpsRegistrarTest { testActorRef = new TestActorRef<>(system, props, testKit.getRef(), "actorRef"); endpointAddress = new Address("http", "local"); - final DOMRpcIdentifier firstEndpointId = DOMRpcIdentifier.create( - SchemaPath.create(true, QName.create("first:identifier", "foo"))); - final DOMRpcIdentifier secondEndpointId = DOMRpcIdentifier.create( - SchemaPath.create(true, QName.create("second:identifier", "bar"))); + final DOMRpcIdentifier firstEndpointId = DOMRpcIdentifier.create(QName.create("first:identifier", "foo")); + final DOMRpcIdentifier secondEndpointId = DOMRpcIdentifier.create(QName.create("second:identifier", "bar")); final QName firstActionQName = QName.create("first:actionIdentifier", "fooAction"); - final DOMActionInstance firstActionInstance = DOMActionInstance.of( - SchemaPath.create(true, firstActionQName), LogicalDatastoreType.OPERATIONAL, + final DOMActionInstance firstActionInstance = DOMActionInstance.of(Absolute.of(firstActionQName), + LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(firstActionQName))); - final DOMActionInstance secondActionInstance = DOMActionInstance.of( - SchemaPath.create(true, firstActionQName), LogicalDatastoreType.OPERATIONAL, + final DOMActionInstance secondActionInstance = DOMActionInstance.of(Absolute.of(firstActionQName), + LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(firstActionQName))); final TestKit senderKit = new TestKit(system); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteOpsImplementationTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteOpsImplementationTest.java index 47ce52bf9c..b2a70be9d3 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteOpsImplementationTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteOpsImplementationTest.java @@ -31,9 +31,10 @@ import org.opendaylight.mdsal.dom.api.DOMRpcResult; import org.opendaylight.mdsal.dom.spi.DefaultDOMRpcResult; import org.opendaylight.mdsal.dom.spi.SimpleDOMActionResult; import org.opendaylight.yangtools.util.concurrent.FluentFutures; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; /** * Unit tests for RemoteRpcImplementation. @@ -56,7 +57,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { ArgumentCaptor.forClass(NormalizedNode.class); doReturn(FluentFutures.immediateFluentFuture(rpcResult)).when(domRpcService2) - .invokeRpc(eq(TEST_RPC_TYPE), inputCaptor.capture()); + .invokeRpc(eq(TEST_RPC), inputCaptor.capture()); final ListenableFuture frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, invokeRpcInput); assertTrue(frontEndFuture instanceof RemoteDOMRpcFuture); @@ -99,7 +100,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { (ArgumentCaptor) ArgumentCaptor.forClass(NormalizedNode.class); doReturn(FluentFutures.immediateFluentFuture(rpcResult)).when(domRpcService2) - .invokeRpc(eq(TEST_RPC_TYPE), inputCaptor.capture()); + .invokeRpc(eq(TEST_RPC), inputCaptor.capture()); ListenableFuture frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, null); assertTrue(frontEndFuture instanceof RemoteDOMRpcFuture); @@ -144,7 +145,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { (ArgumentCaptor) ArgumentCaptor.forClass(NormalizedNode.class); doReturn(FluentFutures.immediateFluentFuture(rpcResult)).when(domRpcService2) - .invokeRpc(eq(TEST_RPC_TYPE), inputCaptor.capture()); + .invokeRpc(eq(TEST_RPC), inputCaptor.capture()); final ListenableFuture frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, invokeRpcInput); assertTrue(frontEndFuture instanceof RemoteDOMRpcFuture); @@ -164,7 +165,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { final ArgumentCaptor> inputCaptor = (ArgumentCaptor) ArgumentCaptor.forClass(NormalizedNode.class); - when(domRpcService2.invokeRpc(eq(TEST_RPC_TYPE), inputCaptor.capture())).thenReturn( + when(domRpcService2.invokeRpc(eq(TEST_RPC), inputCaptor.capture())).thenReturn( FluentFutures.immediateFailedFluentFuture(new RemoteDOMRpcException("Test Exception", null))); final ListenableFuture frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, invokeRpcInput); @@ -226,7 +227,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { public void testInvokeRpcWithLookupException() throws Throwable { final NormalizedNode invokeRpcInput = makeRPCInput("foo"); - doThrow(new RuntimeException("test")).when(domRpcService2).invokeRpc(any(SchemaPath.class), + doThrow(new RuntimeException("test")).when(domRpcService2).invokeRpc(any(QName.class), any(NormalizedNode.class)); final ListenableFuture frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, invokeRpcInput); @@ -248,7 +249,7 @@ public class RemoteOpsImplementationTest extends AbstractOpsTest { public void testInvokeActionWithLookupException() throws Throwable { final ContainerNode invokeRpcInput = makeRPCInput("foo"); - doThrow(new RuntimeException("test")).when(domActionService2).invokeAction(any(SchemaPath.class), + doThrow(new RuntimeException("test")).when(domActionService2).invokeAction(any(Absolute.class), any(DOMDataTreeIdentifier.class), any(ContainerNode.class)); final ListenableFuture frontEndFuture = remoteActionImpl1.invokeAction(TEST_RPC_TYPE, diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistryTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistryTest.java index 82b2c79d73..867d9a8700 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistryTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/ActionRegistryTest.java @@ -53,7 +53,7 @@ import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMActionInstance; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -377,9 +377,8 @@ public class ActionRegistryTest { final Collection added = new ArrayList<>(nRoutes); for (int i = 0; i < nRoutes; i++) { QName type = QName.create(URI.create("/mockaction"), "mockaction" + routeIdCounter++); - final DOMActionInstance routeId = DOMActionInstance.of(SchemaPath.create(true, - type), LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(new - YangInstanceIdentifier.NodeIdentifier(type))); + final DOMActionInstance routeId = DOMActionInstance.of(Absolute.of(type), LogicalDatastoreType.OPERATIONAL, + YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(type))); added.add(routeId); //Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS); @@ -415,9 +414,8 @@ public class ActionRegistryTest { private List createRouteIds() { QName type = QName.create(URI.create("/mockaction"), "mockaction" + routeIdCounter++); List routeIds = new ArrayList<>(1); - routeIds.add(DOMActionInstance.of(SchemaPath.create(true, type), - LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create( - new YangInstanceIdentifier.NodeIdentifier(type)))); + routeIds.add(DOMActionInstance.of(Absolute.of(type), LogicalDatastoreType.OPERATIONAL, + YangInstanceIdentifier.create(new YangInstanceIdentifier.NodeIdentifier(type)))); return routeIds; } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java index 4ae6e1e57f..d552ad5f12 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java @@ -52,7 +52,6 @@ import org.opendaylight.controller.remote.rpc.registry.RpcRegistry.RemoteRpcEndp import org.opendaylight.controller.remote.rpc.registry.gossip.Bucket; import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier; import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -370,8 +369,7 @@ public class RpcRegistryTest { final int nRoutes = 500; final Collection added = new ArrayList<>(nRoutes); for (int i = 0; i < nRoutes; i++) { - final DOMRpcIdentifier routeId = DOMRpcIdentifier.create(SchemaPath.create(true, - QName.create(URI.create("/mockrpc"), "type" + i))); + final DOMRpcIdentifier routeId = DOMRpcIdentifier.create(QName.create(URI.create("/mockrpc"), "type" + i)); added.add(routeId); //Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS); @@ -406,7 +404,7 @@ public class RpcRegistryTest { private List createRouteIds() { QName type = QName.create(URI.create("/mockrpc"), "mockrpc" + routeIdCounter++); List routeIds = new ArrayList<>(1); - routeIds.add(DOMRpcIdentifier.create(SchemaPath.create(true, type))); + routeIds.add(DOMRpcIdentifier.create(type)); return routeIds; } } diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImplTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImplTest.java index 3d5655ded5..1a76aa6f9c 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImplTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBeanImplTest.java @@ -31,13 +31,14 @@ import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.mdsal.dom.api.DOMActionInstance; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; +import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; public class RemoteActionRegistryMXBeanImplTest { private static final QName LOCAL_QNAME = QName.create("base", "local"); - private static final SchemaPath EMPTY_SCHEMA_PATH = SchemaPath.ROOT; - private static final SchemaPath LOCAL_SCHEMA_PATH = SchemaPath.create(true, LOCAL_QNAME); + private static final QName REMOTE_QNAME = QName.create("base", "local"); + private static final Absolute LOCAL_SCHEMA_PATH = Absolute.of(LOCAL_QNAME); + private static final Absolute REMOTE_SCHEMA_PATH = Absolute.of(REMOTE_QNAME); private ActorSystem system; private TestActorRef testActor; @@ -49,7 +50,7 @@ public class RemoteActionRegistryMXBeanImplTest { system = ActorSystem.create("test"); final DOMActionInstance emptyActionIdentifier = DOMActionInstance.of( - EMPTY_SCHEMA_PATH, LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.empty()); + REMOTE_SCHEMA_PATH, LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.empty()); final DOMActionInstance localActionIdentifier = DOMActionInstance.of( LOCAL_SCHEMA_PATH, LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.of(LOCAL_QNAME)); diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBeanImplTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBeanImplTest.java index 4d719a2a66..6421750e0d 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBeanImplTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBeanImplTest.java @@ -7,6 +7,8 @@ */ package org.opendaylight.controller.remote.rpc.registry.mbeans; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -33,13 +35,10 @@ import org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreAccess; import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; public class RemoteRpcRegistryMXBeanImplTest { - private static final QName LOCAL_QNAME = QName.create("base", "local"); - private static final SchemaPath EMPTY_SCHEMA_PATH = SchemaPath.ROOT; - private static final SchemaPath LOCAL_SCHEMA_PATH = SchemaPath.create(true, LOCAL_QNAME); + private static final QName REMOTE_QNAME = QName.create("base", "remote"); private ActorSystem system; private TestActorRef testActor; @@ -51,9 +50,9 @@ public class RemoteRpcRegistryMXBeanImplTest { system = ActorSystem.create("test"); final DOMRpcIdentifier emptyRpcIdentifier = DOMRpcIdentifier.create( - EMPTY_SCHEMA_PATH, YangInstanceIdentifier.empty()); + REMOTE_QNAME, YangInstanceIdentifier.empty()); final DOMRpcIdentifier localRpcIdentifier = DOMRpcIdentifier.create( - LOCAL_SCHEMA_PATH, YangInstanceIdentifier.of(LOCAL_QNAME)); + LOCAL_QNAME, YangInstanceIdentifier.of(LOCAL_QNAME)); buckets = Lists.newArrayList(emptyRpcIdentifier, localRpcIdentifier); @@ -92,7 +91,7 @@ public class RemoteRpcRegistryMXBeanImplTest { assertEquals(1, globalRpc.size()); final String rpc = globalRpc.iterator().next(); - assertEquals(EMPTY_SCHEMA_PATH.toString(), rpc); + assertEquals(REMOTE_QNAME.toString(), rpc); } @Test @@ -112,8 +111,7 @@ public class RemoteRpcRegistryMXBeanImplTest { assertEquals(1, localRegisteredRoutedRpc.size()); final String localRpc = localRegisteredRoutedRpc.iterator().next(); - assertTrue(localRpc.contains(LOCAL_QNAME.toString())); - assertTrue(localRpc.contains(LOCAL_SCHEMA_PATH.toString())); + assertThat(localRpc, containsString(LOCAL_QNAME.toString())); } @Test diff --git a/opendaylight/md-sal/samples/clustering-test-app/configuration/pom.xml b/opendaylight/md-sal/samples/clustering-test-app/configuration/pom.xml index f8a044fa63..555292de74 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/configuration/pom.xml +++ b/opendaylight/md-sal/samples/clustering-test-app/configuration/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/opendaylight/md-sal/samples/clustering-test-app/pom.xml b/opendaylight/md-sal/samples/clustering-test-app/pom.xml index 8d8a8ca749..979822bc70 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/pom.xml +++ b/opendaylight/md-sal/samples/clustering-test-app/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/GetConstantService.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/GetConstantService.java index a800dc921d..87e4dd6cce 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/GetConstantService.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/GetConstantService.java @@ -24,7 +24,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,7 +47,7 @@ public final class GetConstantService implements DOMRpcImplementation { final DOMRpcProviderService rpcProviderService, final String constant) { LOG.debug("Registering get-constant service, constant value: {}", constant); return rpcProviderService.registerRpcImplementation(new GetConstantService(constant), - DOMRpcIdentifier.create(SchemaPath.create(true, GET_CONSTANT))); + DOMRpcIdentifier.create(GET_CONSTANT)); } @Override diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/RoutedGetConstantService.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/RoutedGetConstantService.java index 64470b022e..4dd3cdff33 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/RoutedGetConstantService.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/RoutedGetConstantService.java @@ -27,7 +27,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,7 +52,7 @@ public final class RoutedGetConstantService implements DOMRpcImplementation { LOG.debug("Registering get-contexted-constant on context: {}, with value: {}", context, constant); final YangInstanceIdentifier yid = codec.toYangInstanceIdentifier(context); - final DOMRpcIdentifier id = DOMRpcIdentifier.create(SchemaPath.create(true, GET_CONTEXTED_CONSTANT), yid); + final DOMRpcIdentifier id = DOMRpcIdentifier.create(GET_CONTEXTED_CONSTANT, yid); return rpcProviderService.registerRpcImplementation(new RoutedGetConstantService(constant), id); } diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/SingletonGetConstantService.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/SingletonGetConstantService.java index ffa3b80f9f..b9df997997 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/SingletonGetConstantService.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/SingletonGetConstantService.java @@ -28,7 +28,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,7 +79,7 @@ public final class SingletonGetConstantService implements DOMRpcImplementation, @Override public void instantiateServiceInstance() { LOG.debug("Gained ownership of get-singleton-constant, registering service into rpcService"); - final DOMRpcIdentifier id = DOMRpcIdentifier.create(SchemaPath.create(true, GET_SINGLETON_CONSTANT)); + final DOMRpcIdentifier id = DOMRpcIdentifier.create(GET_SINGLETON_CONSTANT); rpcRegistration = rpcProviderService.registerRpcImplementation(this, id); } diff --git a/opendaylight/md-sal/samples/pom.xml b/opendaylight/md-sal/samples/pom.xml index 9911cc86d4..81908ac8dc 100644 --- a/opendaylight/md-sal/samples/pom.xml +++ b/opendaylight/md-sal/samples/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/opendaylight/model/model-inventory/pom.xml b/opendaylight/model/model-inventory/pom.xml index e384684f28..ef46dd7a5b 100644 --- a/opendaylight/model/model-inventory/pom.xml +++ b/opendaylight/model/model-inventory/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.mdsal binding-parent - 6.0.5 + 7.0.0-SNAPSHOT diff --git a/opendaylight/model/pom.xml b/opendaylight/model/pom.xml index 009ea49732..0c9062b03d 100644 --- a/opendaylight/model/pom.xml +++ b/opendaylight/model/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 diff --git a/pom.xml b/pom.xml index 5521ae09b8..acfc6c64f6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 7.0.6 + 8.0.0 @@ -22,6 +22,7 @@ artifacts + bundle-parent akka