From 6602310b78b5bf54899456e2efa867d116731267 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 21 Jun 2017 15:40:28 +0200 Subject: [PATCH] Bump to odlparent 2.0.0 This takes odlparent 2.0.0, adjusts for guava update and feature movement. Since jenkins is failing on the distro run, that is disabled and a follow-up patch will re-enable it to get us going again. Change-Id: If3e1289ed7f73a79a5a47428c634bda9702e824d Signed-off-by: Robert Varga --- benchmark/artifacts/pom.xml | 2 +- benchmark/pom.xml | 2 +- .../features-mdsal-benchmark/pom.xml | 129 ++--- .../src/main/features/features.xml | 36 -- .../features4-mdsal-benchmark/pom.xml | 57 --- features/benchmark/odl-benchmark-api/pom.xml | 2 +- features/benchmark/odl-dsbenchmark/pom.xml | 2 +- .../benchmark/odl-mdsal-benchmark/pom.xml | 2 +- features/benchmark/odl-ntfbenchmark/pom.xml | 2 +- features/benchmark/pom.xml | 3 +- .../features-config-netty/pom.xml | 97 ++-- .../src/main/features/features.xml | 17 - .../features4-config-netty/pom.xml | 36 -- .../config-netty/odl-config-netty/pom.xml | 2 +- features/config-netty/pom.xml | 3 +- .../features-config-persister/pom.xml | 149 ++---- .../src/main/features/features.xml | 38 -- .../features4-config-persister/pom.xml | 57 --- .../odl-config-manager-facade-xml/pom.xml | 2 +- .../odl-config-persister-all/pom.xml | 2 +- .../odl-config-persister/pom.xml | 10 +- .../odl-config-startup/pom.xml | 2 +- features/config-persister/pom.xml | 3 +- features/config/features-config/pom.xml | 197 +++----- .../src/main/features/features.xml | 42 -- features/config/features4-config/pom.xml | 64 --- features/config/odl-config-all/pom.xml | 2 +- features/config/odl-config-api/pom.xml | 2 +- features/config/odl-config-core/pom.xml | 2 +- features/config/odl-config-manager/pom.xml | 2 +- .../odl-config-netty-config-api/pom.xml | 8 +- features/config/pom.xml | 3 +- features/extras/features-extras/pom.xml | 42 +- .../src/main/features/features.xml | 26 - features/extras/features4-extras/pom.xml | 43 -- features/extras/odl-extras-all/pom.xml | 2 +- features/extras/odl-jolokia/pom.xml | 2 +- features/extras/pom.xml | 3 +- features/mdsal/features-mdsal/pom.xml | 443 ++++-------------- .../src/main/features/features.xml | 125 ----- features/mdsal/features4-mdsal/pom.xml | 105 ----- .../mdsal/odl-clustering-test-app/pom.xml | 2 +- features/mdsal/odl-mdsal-all/pom.xml | 2 +- features/mdsal/odl-mdsal-broker-local/pom.xml | 8 +- features/mdsal/odl-mdsal-broker/pom.xml | 2 +- .../odl-mdsal-clustering-commons/pom.xml | 12 +- features/mdsal/odl-mdsal-clustering/pom.xml | 2 +- features/mdsal/odl-mdsal-common/pom.xml | 2 +- .../odl-mdsal-distributed-datastore/pom.xml | 2 +- .../odl-mdsal-remoterpc-connector/pom.xml | 8 +- .../mdsal/odl-message-bus-collector/pom.xml | 2 +- features/mdsal/odl-toaster/pom.xml | 2 +- features/mdsal/pom.xml | 3 +- features/pom.xml | 2 +- .../features-protocol-framework/pom.xml | 73 ++- .../src/main/features/features.xml | 13 - .../features4-protocol-framework/pom.xml | 36 -- .../odl-protocol-framework/pom.xml | 2 +- features/protocol-framework/pom.xml | 3 +- karaf/karaf-parent/pom.xml | 24 - karaf/opendaylight-karaf/pom.xml | 5 +- karaf/pom.xml | 8 +- .../archetype-resources/artifacts/pom.xml | 2 +- .../archetype-resources/features/pom.xml | 2 +- .../archetype-resources/karaf/pom.xml | 2 +- .../resources/archetype-resources/pom.xml | 2 +- opendaylight/archetypes/pom.xml | 2 +- opendaylight/blueprint/pom.xml | 2 +- opendaylight/commons/jolokia/pom.xml | 2 +- opendaylight/commons/liblldp/pom.xml | 2 +- opendaylight/commons/logback_settings/pom.xml | 2 +- .../commons/protocol-framework/pom.xml | 2 +- opendaylight/config/config-artifacts/pom.xml | 5 - opendaylight/config/config-it-base/pom.xml | 2 +- .../config/config-netty-config/pom.xml | 2 +- .../internal/AbstractFeatureWrapper.java | 103 ++-- .../internal/FeatureConfigPusher.java | 106 ++--- .../internal/FeatureServiceCustomizer.java | 21 +- .../config-persister-feature4-adapter/pom.xml | 74 --- .../ConfigPusherFeatureActivator.java | 40 -- .../internal/AbstractFeatureWrapper.java | 268 ----------- .../internal/ChildAwareFeatureWrapper.java | 108 ----- .../internal/ConfigFeaturesListener.java | 48 -- .../internal/ConfigPusherCustomizer.java | 61 --- .../internal/ConfigPushingRunnable.java | 77 --- .../internal/FeatureConfigPusher.java | 154 ------ .../internal/FeatureConfigSnapshotHolder.java | 173 ------- .../internal/FeatureServiceCustomizer.java | 78 --- opendaylight/config/pom.xml | 1 - .../md-sal/benchmark-data-store/pom.xml | 2 +- opendaylight/md-sal/cds-access-api/pom.xml | 2 +- opendaylight/md-sal/cds-access-client/pom.xml | 2 +- opendaylight/md-sal/cds-dom-api/pom.xml | 2 +- opendaylight/md-sal/md-sal-config/pom.xml | 2 +- opendaylight/md-sal/mdsal-artifacts/pom.xml | 2 +- opendaylight/md-sal/mdsal-it-base/pom.xml | 2 +- opendaylight/md-sal/mdsal-it-parent/pom.xml | 4 +- .../md-sal/mdsal-trace/binding-impl/pom.xml | 2 +- .../features/features-mdsal-trace/pom.xml | 80 +--- .../src/main/features/features.xml | 24 - .../features/features4-mdsal-trace/pom.xml | 28 -- .../features/odl-mdsal-trace/pom.xml | 2 +- .../md-sal/mdsal-trace/features/pom.xml | 3 +- opendaylight/md-sal/mdsal-trace/pom.xml | 2 +- opendaylight/md-sal/messagebus-config/pom.xml | 2 +- opendaylight/md-sal/messagebus-util/pom.xml | 2 +- opendaylight/md-sal/pom.xml | 2 +- .../md-sal/sal-akka-raft-example/pom.xml | 2 +- opendaylight/md-sal/sal-akka-raft/pom.xml | 2 +- opendaylight/md-sal/sal-binding-api/pom.xml | 2 +- .../md-sal/sal-binding-broker/pom.xml | 2 +- .../md-sal/sal-binding-dom-it/pom.xml | 2 +- opendaylight/md-sal/sal-binding-util/pom.xml | 2 +- .../md-sal/sal-clustering-config/pom.xml | 2 +- opendaylight/md-sal/sal-common-impl/pom.xml | 2 +- .../impl/service/AbstractDataTransaction.java | 3 +- .../md-sal/sal-common-testutil/pom.xml | 2 +- opendaylight/md-sal/sal-common-util/pom.xml | 2 +- opendaylight/md-sal/sal-connector-api/pom.xml | 2 +- .../DebugThreePhaseCommitCohort.java | 15 +- .../datastore/LocalTransactionContext.java | 11 +- .../cluster/datastore/TransactionProxy.java | 18 +- .../sharding/PrefixedShardConfigWriter.java | 6 +- .../sharding/ShardProxyTransaction.java | 12 +- .../ClientBackedReadTransactionTest.java | 7 +- .../ConcurrentDOMDataBrokerTest.java | 5 +- .../actors/dds/ClientSnapshotTest.java | 7 +- .../AbstractTransactionProxyTest.java | 2 +- .../cluster/datastore/ShardTest.java | 2 +- .../datastore/TransactionProxyTest.java | 39 +- opendaylight/md-sal/sal-dom-api/pom.xml | 2 +- opendaylight/md-sal/sal-dom-broker/pom.xml | 2 +- ...aBrokerDelegatingReadWriteTransaction.java | 6 +- ...MDataBrokerDelegatingWriteTransaction.java | 3 +- opendaylight/md-sal/sal-dom-spi/pom.xml | 2 +- .../sal-dummy-distributed-datastore/pom.xml | 2 +- .../md-sal/sal-remoterpc-connector/pom.xml | 2 +- .../controller/remote/rpc/RpcInvoker.java | 8 +- .../md-sal/sal-schema-service/pom.xml | 2 +- .../md-sal/samples/toaster-consumer/pom.xml | 2 +- .../kitchen/impl/KitchenServiceImpl.java | 30 +- .../toaster/provider/OpendaylightToaster.java | 3 +- pom.xml | 2 +- 143 files changed, 666 insertions(+), 3036 deletions(-) delete mode 100644 features/benchmark/features-mdsal-benchmark/src/main/features/features.xml delete mode 100644 features/benchmark/features4-mdsal-benchmark/pom.xml delete mode 100644 features/config-netty/features-config-netty/src/main/features/features.xml delete mode 100644 features/config-netty/features4-config-netty/pom.xml delete mode 100644 features/config-persister/features-config-persister/src/main/features/features.xml delete mode 100644 features/config-persister/features4-config-persister/pom.xml delete mode 100644 features/config/features-config/src/main/features/features.xml delete mode 100644 features/config/features4-config/pom.xml delete mode 100644 features/extras/features-extras/src/main/features/features.xml delete mode 100644 features/extras/features4-extras/pom.xml delete mode 100644 features/mdsal/features-mdsal/src/main/features/features.xml delete mode 100644 features/mdsal/features4-mdsal/pom.xml delete mode 100644 features/protocol-framework/features-protocol-framework/src/main/features/features.xml delete mode 100644 features/protocol-framework/features4-protocol-framework/pom.xml delete mode 100644 karaf/karaf-parent/pom.xml delete mode 100644 opendaylight/config/config-persister-feature4-adapter/pom.xml delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java delete mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java delete mode 100644 opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/src/main/features/features.xml delete mode 100644 opendaylight/md-sal/mdsal-trace/features/features4-mdsal-trace/pom.xml diff --git a/benchmark/artifacts/pom.xml b/benchmark/artifacts/pom.xml index ff13d7d7ee..aad3cea4c6 100644 --- a/benchmark/artifacts/pom.xml +++ b/benchmark/artifacts/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/benchmark/pom.xml b/benchmark/pom.xml index a48d78efbc..cb9f0432d7 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 org.opendaylight.controller diff --git a/features/benchmark/features-mdsal-benchmark/pom.xml b/features/benchmark/features-mdsal-benchmark/pom.xml index 5f71359c91..9659014787 100644 --- a/features/benchmark/features-mdsal-benchmark/pom.xml +++ b/features/benchmark/features-mdsal-benchmark/pom.xml @@ -1,82 +1,57 @@ - - - org.opendaylight.odlparent - features-parent - 1.9.0 - - - org.opendaylight.controller - features-mdsal-benchmark - 1.4.0-SNAPSHOT - ${project.artifactId} - 4.0.0 + Copyright © 2016, 2017 Red Hat, Inc. and others. - - 1.6.0-SNAPSHOT - 2.3.0-SNAPSHOT - 0.11.0-SNAPSHOT - 1.2.0-SNAPSHOT - + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html + --> + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + + + org.opendaylight.controller + features-mdsal-benchmark + 1.4.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-benchmark-api + ${project.version} + xml + features + + + ${project.groupId} + odl-dsbenchmark + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-benchmark + ${project.version} + xml + features + + + ${project.groupId} + odl-ntfbenchmark + ${project.version} + xml + features + + - - - org.opendaylight.yangtools - features-yangtools - features - ${yangtools.version} - xml - runtime - - - org.opendaylight.mdsal - features-mdsal - ${mdsal.version} - features - xml - runtime - - - org.opendaylight.mdsal.model - features-mdsal-model - ${mdsal.model.version} - features - xml - runtime - - - org.opendaylight.controller - features-mdsal - features - ${controller.mdsal.version} - xml - runtime - - - ${project.groupId} - dsbenchmark - ${project.version} - - - ${project.groupId} - ntfbenchmark - ${project.version} - - - ${project.groupId} - rpcbenchmark - ${project.version} - - - ${project.groupId} - benchmark-api - ${project.version} - - diff --git a/features/benchmark/features-mdsal-benchmark/src/main/features/features.xml b/features/benchmark/features-mdsal-benchmark/src/main/features/features.xml deleted file mode 100644 index 7e2b451fcb..0000000000 --- a/features/benchmark/features-mdsal-benchmark/src/main/features/features.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features - - - odl-mdsal-models - mvn:org.opendaylight.controller/benchmark-api/{{VERSION}} - - - odl-mdsal-broker - odl-benchmark-api - mvn:org.opendaylight.controller/dsbenchmark/{{VERSION}} - - - odl-mdsal-broker - odl-benchmark-api - mvn:org.opendaylight.controller/ntfbenchmark/{{VERSION}} - - - odl-dsbenchmark - odl-ntfbenchmark - mvn:org.opendaylight.controller/rpcbenchmark/{{VERSION}} - - diff --git a/features/benchmark/features4-mdsal-benchmark/pom.xml b/features/benchmark/features4-mdsal-benchmark/pom.xml deleted file mode 100644 index c15ba1f3c1..0000000000 --- a/features/benchmark/features4-mdsal-benchmark/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-mdsal-benchmark - 1.4.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-benchmark-api - ${project.version} - xml - features - - - ${project.groupId} - odl-dsbenchmark - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-benchmark - ${project.version} - xml - features - - - ${project.groupId} - odl-ntfbenchmark - ${project.version} - xml - features - - - - \ No newline at end of file diff --git a/features/benchmark/odl-benchmark-api/pom.xml b/features/benchmark/odl-benchmark-api/pom.xml index e3ca306d22..3dd8ac742a 100644 --- a/features/benchmark/odl-benchmark-api/pom.xml +++ b/features/benchmark/odl-benchmark-api/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/benchmark/odl-dsbenchmark/pom.xml b/features/benchmark/odl-dsbenchmark/pom.xml index 56d78b37ab..6623738a09 100644 --- a/features/benchmark/odl-dsbenchmark/pom.xml +++ b/features/benchmark/odl-dsbenchmark/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/benchmark/odl-mdsal-benchmark/pom.xml b/features/benchmark/odl-mdsal-benchmark/pom.xml index c8c720f046..2864ddc8ef 100644 --- a/features/benchmark/odl-mdsal-benchmark/pom.xml +++ b/features/benchmark/odl-mdsal-benchmark/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/benchmark/odl-ntfbenchmark/pom.xml b/features/benchmark/odl-ntfbenchmark/pom.xml index 6c850f2f3d..a9fb582be7 100644 --- a/features/benchmark/odl-ntfbenchmark/pom.xml +++ b/features/benchmark/odl-ntfbenchmark/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/benchmark/pom.xml b/features/benchmark/pom.xml index f96ee96192..8cd2a140ad 100644 --- a/features/benchmark/pom.xml +++ b/features/benchmark/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 org.opendaylight.controller @@ -22,7 +22,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL features-mdsal-benchmark - features4-mdsal-benchmark odl-benchmark-api odl-dsbenchmark odl-mdsal-benchmark diff --git a/features/config-netty/features-config-netty/pom.xml b/features/config-netty/features-config-netty/pom.xml index 1c9ce88c46..4f5a3dac1f 100644 --- a/features/config-netty/features-config-netty/pom.xml +++ b/features/config-netty/features-config-netty/pom.xml @@ -1,77 +1,36 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.9.0 - - + + + 4.0.0 - - 0.7.0-SNAPSHOT - etc/opendaylight/karaf - 00-netty.xml - + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + + + org.opendaylight.controller + features-config-netty + 0.7.0-SNAPSHOT + feature - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - + + ${project.groupId} + odl-config-netty + ${project.version} + xml + features + - - - - - org.opendaylight.controller - features-config-persister - features - xml - - - org.opendaylight.controller - netty-event-executor-config - - - org.opendaylight.controller - netty-threadgroup-config - - - org.opendaylight.controller - netty-timer-config - - - org.opendaylight.controller - threadpool-config-api - - - org.opendaylight.controller - threadpool-config-impl - - - org.opendaylight.controller - config-netty-config - ${config.version} - xml - config - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - diff --git a/features/config-netty/features-config-netty/src/main/features/features.xml b/features/config-netty/features-config-netty/src/main/features/features.xml deleted file mode 100644 index a66f7e589d..0000000000 --- a/features/config-netty/features-config-netty/src/main/features/features.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - mvn:org.opendaylight.controller/features-config-persister/${config.version}/xml/features - - odl-config-netty-config-api - mvn:org.opendaylight.controller/netty-event-executor-config/${project.version} - mvn:org.opendaylight.controller/netty-threadgroup-config/${project.version} - mvn:org.opendaylight.controller/netty-timer-config/${project.version} - mvn:org.opendaylight.controller/threadpool-config-api/${project.version} - mvn:org.opendaylight.controller/threadpool-config-impl/${project.version} - odl-config-startup - mvn:org.opendaylight.controller/config-netty-config/${config.version}/xml/config - - diff --git a/features/config-netty/features4-config-netty/pom.xml b/features/config-netty/features4-config-netty/pom.xml deleted file mode 100644 index 248d5fe63b..0000000000 --- a/features/config-netty/features4-config-netty/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-config-netty - 0.7.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-config-netty - ${project.version} - xml - features - - - - \ No newline at end of file diff --git a/features/config-netty/odl-config-netty/pom.xml b/features/config-netty/odl-config-netty/pom.xml index 4d98488383..3ff3297f2c 100644 --- a/features/config-netty/odl-config-netty/pom.xml +++ b/features/config-netty/odl-config-netty/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config-netty/pom.xml b/features/config-netty/pom.xml index 763b3b8893..aa332b7d35 100644 --- a/features/config-netty/pom.xml +++ b/features/config-netty/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -23,7 +23,6 @@ features-config-netty - features4-config-netty odl-config-netty diff --git a/features/config-persister/features-config-persister/pom.xml b/features/config-persister/features-config-persister/pom.xml index 8ab966b0bf..4f221144f7 100644 --- a/features/config-persister/features-config-persister/pom.xml +++ b/features/config-persister/features-config-persister/pom.xml @@ -1,108 +1,57 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.9.0 - - + + + 4.0.0 - - 2.3.0-SNAPSHOT - 0.7.0-SNAPSHOT - features.xml - + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + + + org.opendaylight.controller + features-config-persister + 0.7.0-SNAPSHOT + feature - - - org.opendaylight.mdsal - mdsal-artifacts - ${mdsal.version} - import - pom - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - + + ${project.groupId} + odl-config-manager-facade-xml + ${project.version} + xml + features + + + ${project.groupId} + odl-config-persister + ${project.version} + xml + features + + + ${project.groupId} + odl-config-persister-all + ${project.version} + xml + features + + + ${project.groupId} + odl-config-startup + ${project.version} + xml + features + - - - - - org.opendaylight.mdsal - features-mdsal - ${mdsal.version} - features - xml - - - org.opendaylight.controller - features-config - features - xml - - - org.opendaylight.controller - config-persister-api - - - org.opendaylight.controller - config-manager-facade-xml - - - org.opendaylight.controller - config-util - - - org.opendaylight.controller - config-persister-file-xml-adapter - - - org.opendaylight.controller - config-persister-impl - - - org.opendaylight.controller - config-persister-feature-adapter - - - commons-io - commons-io - - - org.apache.commons - commons-lang3 - - - javax.validation - validation-api - - - org.eclipse.persistence - org.eclipse.persistence.core - - - org.eclipse.persistence - org.eclipse.persistence.moxy - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - diff --git a/features/config-persister/features-config-persister/src/main/features/features.xml b/features/config-persister/features-config-persister/src/main/features/features.xml deleted file mode 100644 index 9a2fb9dd5b..0000000000 --- a/features/config-persister/features-config-persister/src/main/features/features.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-config/{{VERSION}}/xml/features - - odl-config-persister - odl-config-startup - - - odl-config-api - odl-config-core - odl-config-manager - odl-mdsal-binding-runtime - mvn:org.opendaylight.controller/yang-jmx-generator/{{VERSION}} - mvn:org.opendaylight.controller/config-persister-api/{{VERSION}} - mvn:org.opendaylight.controller/config-util/{{VERSION}} - mvn:org.opendaylight.controller/config-manager-facade-xml/{{VERSION}} - mvn:org.opendaylight.controller/config-persister-file-xml-adapter/{{VERSION}} - mvn:org.opendaylight.controller/config-persister-impl/{{VERSION}} - mvn:org.opendaylight.controller/config-persister-feature-adapter/{{VERSION}} - - mvn:commons-io/commons-io/{{VERSION}} - mvn:org.apache.commons/commons-lang3/{{VERSION}} - wrap:mvn:javax.validation/validation-api/{{VERSION}} - mvn:org.eclipse.persistence/org.eclipse.persistence.core/{{VERSION}} - mvn:org.eclipse.persistence/org.eclipse.persistence.moxy/{{VERSION}} - - - odl-config-persister - - - odl-config-core - mvn:org.opendaylight.controller/config-manager-facade-xml/{{VERSION}} - - diff --git a/features/config-persister/features4-config-persister/pom.xml b/features/config-persister/features4-config-persister/pom.xml deleted file mode 100644 index 58d5e7ecfa..0000000000 --- a/features/config-persister/features4-config-persister/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-config-persister - 0.7.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-config-manager-facade-xml - ${project.version} - xml - features - - - ${project.groupId} - odl-config-persister - ${project.version} - xml - features - - - ${project.groupId} - odl-config-persister-all - ${project.version} - xml - features - - - ${project.groupId} - odl-config-startup - ${project.version} - xml - features - - - - \ No newline at end of file diff --git a/features/config-persister/odl-config-manager-facade-xml/pom.xml b/features/config-persister/odl-config-manager-facade-xml/pom.xml index f05e2da5d2..f5a0e610fc 100644 --- a/features/config-persister/odl-config-manager-facade-xml/pom.xml +++ b/features/config-persister/odl-config-manager-facade-xml/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config-persister/odl-config-persister-all/pom.xml b/features/config-persister/odl-config-persister-all/pom.xml index 6dffea01b2..aff9a581b1 100644 --- a/features/config-persister/odl-config-persister-all/pom.xml +++ b/features/config-persister/odl-config-persister-all/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config-persister/odl-config-persister/pom.xml b/features/config-persister/odl-config-persister/pom.xml index 4c51f1f473..4637789259 100644 --- a/features/config-persister/odl-config-persister/pom.xml +++ b/features/config-persister/odl-config-persister/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 @@ -75,14 +75,14 @@ ${project.groupId} - config-persister-feature4-adapter + config-persister-feature-adapter - + org.apache.karaf org.apache.karaf.util - ${karaf4.version} + ${karaf.version} - \ No newline at end of file + diff --git a/features/config-persister/odl-config-startup/pom.xml b/features/config-persister/odl-config-startup/pom.xml index 2db6078ce8..8bdd04f153 100644 --- a/features/config-persister/odl-config-startup/pom.xml +++ b/features/config-persister/odl-config-startup/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config-persister/pom.xml b/features/config-persister/pom.xml index 65c084bb4c..45d907405b 100644 --- a/features/config-persister/pom.xml +++ b/features/config-persister/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -23,7 +23,6 @@ features-config-persister - features4-config-persister odl-config-manager-facade-xml odl-config-persister odl-config-persister-all diff --git a/features/config/features-config/pom.xml b/features/config/features-config/pom.xml index 694d788958..8c406859e8 100644 --- a/features/config/features-config/pom.xml +++ b/features/config/features-config/pom.xml @@ -1,151 +1,64 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.9.0 - - + + + 4.0.0 - - 1.2.0-SNAPSHOT - 2.3.0-SNAPSHOT - 0.7.0-SNAPSHOT - 1.9.0 - features.xml - etc/opendaylight/karaf - + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + + org.opendaylight.controller + features-config + 0.7.0-SNAPSHOT + feature - - - org.opendaylight.odlparent - odlparent-artifacts - 1.9.0 - import - pom - - - org.opendaylight.yangtools - yangtools-artifacts - ${yangtools.version} - import - pom - - - org.opendaylight.mdsal - mdsal-artifacts - ${mdsal.version} - import - pom - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - + + ${project.groupId} + odl-config-all + ${project.version} + xml + features + + + ${project.groupId} + odl-config-api + ${project.version} + xml + features + + + ${project.groupId} + odl-config-core + ${project.version} + xml + features + + + ${project.groupId} + odl-config-manager + ${project.version} + xml + features + + + ${project.groupId} + odl-config-netty-config-api + ${project.version} + xml + features + - - - - - - - - org.opendaylight.odlparent - features-odlparent - features - xml - - - org.opendaylight.yangtools - features-yangtools - features - xml - - - org.opendaylight.mdsal - features-mdsal - features - xml - - - - - org.opendaylight.controller - config-api - - - org.opendaylight.controller - netty-config-api - - - io.netty - netty-transport - - - io.netty - netty-common - - - io.netty - netty-codec - - - io.netty - netty-handler - - - io.netty - netty-buffer - - - org.opendaylight.controller - config-util - - - org.opendaylight.controller - yang-jmx-generator - - - org.opendaylight.controller - shutdown-api - - - org.opendaylight.controller - shutdown-impl - - - org.osgi - org.osgi.core - - - com.google.guava - guava - - - org.javassist - javassist - - - org.opendaylight.controller - config-manager - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - diff --git a/features/config/features-config/src/main/features/features.xml b/features/config/features-config/src/main/features/features.xml deleted file mode 100644 index 47d0df0294..0000000000 --- a/features/config/features-config/src/main/features/features.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.odlparent/features-odlparent/{{VERSION}}/xml/features - - - odl-config-api - odl-config-netty-config-api - odl-config-core - odl-config-manager - - - - odl-mdsal-binding-base - mvn:org.opendaylight.controller/config-api/{{VERSION}} - - - - odl-config-api - odl-netty-4 - mvn:org.opendaylight.controller/netty-config-api/{{VERSION}} - - - - odl-yangtools-common - - odl-mdsal-binding-runtime - odl-config-api - mvn:org.opendaylight.controller/config-util/{{VERSION}} - mvn:org.opendaylight.controller/yang-jmx-generator/{{VERSION}} - mvn:org.opendaylight.controller/shutdown-api/{{VERSION}} - mvn:org.opendaylight.controller/shutdown-impl/{{VERSION}} - - - odl-config-core - mvn:org.opendaylight.controller/config-manager/{{VERSION}} - - diff --git a/features/config/features4-config/pom.xml b/features/config/features4-config/pom.xml deleted file mode 100644 index 8ece2caedd..0000000000 --- a/features/config/features4-config/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-config - 0.7.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-config-all - ${project.version} - xml - features - - - ${project.groupId} - odl-config-api - ${project.version} - xml - features - - - ${project.groupId} - odl-config-core - ${project.version} - xml - features - - - ${project.groupId} - odl-config-manager - ${project.version} - xml - features - - - ${project.groupId} - odl-config-netty-config-api - ${project.version} - xml - features - - - - \ No newline at end of file diff --git a/features/config/odl-config-all/pom.xml b/features/config/odl-config-all/pom.xml index 0990fce707..7620130821 100644 --- a/features/config/odl-config-all/pom.xml +++ b/features/config/odl-config-all/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config/odl-config-api/pom.xml b/features/config/odl-config-api/pom.xml index 74e49dcec4..06b8ac2268 100644 --- a/features/config/odl-config-api/pom.xml +++ b/features/config/odl-config-api/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config/odl-config-core/pom.xml b/features/config/odl-config-core/pom.xml index 5696d68f37..a8ddb61412 100644 --- a/features/config/odl-config-core/pom.xml +++ b/features/config/odl-config-core/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config/odl-config-manager/pom.xml b/features/config/odl-config-manager/pom.xml index 0b2a353579..9d7ac18744 100644 --- a/features/config/odl-config-manager/pom.xml +++ b/features/config/odl-config-manager/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/config/odl-config-netty-config-api/pom.xml b/features/config/odl-config-netty-config-api/pom.xml index 4ac7ae013f..2f267afab8 100644 --- a/features/config/odl-config-netty-config-api/pom.xml +++ b/features/config/odl-config-netty-config-api/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 @@ -33,8 +33,8 @@ org.opendaylight.odlparent - odl4-netty-4 - 1.9.0 + odl-netty-4 + 2.0.0 xml features @@ -45,4 +45,4 @@ - \ No newline at end of file + diff --git a/features/config/pom.xml b/features/config/pom.xml index 5d411ff74a..5d68cb249b 100644 --- a/features/config/pom.xml +++ b/features/config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -23,7 +23,6 @@ features-config - features4-config odl-config-all odl-config-api odl-config-core diff --git a/features/extras/features-extras/pom.xml b/features/extras/features-extras/pom.xml index 991d7b83c1..84d7f93f54 100644 --- a/features/extras/features-extras/pom.xml +++ b/features/extras/features-extras/pom.xml @@ -1,45 +1,43 @@ - - + --> + 4.0.0 + org.opendaylight.odlparent - features-parent - 1.9.0 + feature-repo-parent + 2.0.0 org.opendaylight.controller features-extras 1.9.0-SNAPSHOT - jar - - 0.6.0-SNAPSHOT - + feature - org.jolokia - jolokia-osgi + ${project.groupId} + odl-extras-all + ${project.version} + xml + features - org.opendaylight.controller - odl-jolokia-osgi - ${odl-jolokia-osgi.version} - cfg - configuration + ${project.groupId} + odl-jolokia + ${project.version} + xml + features - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=summary - diff --git a/features/extras/features-extras/src/main/features/features.xml b/features/extras/features-extras/src/main/features/features.xml deleted file mode 100644 index 99111e7c94..0000000000 --- a/features/extras/features-extras/src/main/features/features.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - odl-jolokia - - - mvn:org.opendaylight.controller/odl-jolokia-osgi/{{VERSION}}/cfg/configuration - http - mvn:org.jolokia/jolokia-osgi/{{VERSION}} - - diff --git a/features/extras/features4-extras/pom.xml b/features/extras/features4-extras/pom.xml deleted file mode 100644 index a602774d94..0000000000 --- a/features/extras/features4-extras/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-extras - 1.9.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-extras-all - ${project.version} - xml - features - - - ${project.groupId} - odl-jolokia - ${project.version} - xml - features - - - - diff --git a/features/extras/odl-extras-all/pom.xml b/features/extras/odl-extras-all/pom.xml index 95657aafd9..6edba87478 100644 --- a/features/extras/odl-extras-all/pom.xml +++ b/features/extras/odl-extras-all/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/extras/odl-jolokia/pom.xml b/features/extras/odl-jolokia/pom.xml index 90dc97961f..23106e83bb 100644 --- a/features/extras/odl-jolokia/pom.xml +++ b/features/extras/odl-jolokia/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/extras/pom.xml b/features/extras/pom.xml index f1c373ee70..76ab3b6a7a 100644 --- a/features/extras/pom.xml +++ b/features/extras/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -23,7 +23,6 @@ features-extras - features4-extras odl-extras-all odl-jolokia diff --git a/features/mdsal/features-mdsal/pom.xml b/features/mdsal/features-mdsal/pom.xml index 5a86a60960..4b99c844b6 100644 --- a/features/mdsal/features-mdsal/pom.xml +++ b/features/mdsal/features-mdsal/pom.xml @@ -1,350 +1,105 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.9.0 - - - - org.opendaylight.controller - features-mdsal - 1.6.0-SNAPSHOT - - jar + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + - - 0.7.0-SNAPSHOT - 1.2.0-SNAPSHOT - 2.3.0-SNAPSHOT - 0.11.0-SNAPSHOT - 1.9.0 - 1.6.0-SNAPSHOT - 0.7.0-SNAPSHOT - 1.9.0-SNAPSHOT - 1.9.0 - features.xml - etc/opendaylight/karaf - 05-clustering.xml - 06-clustered-entity-ownership.xml - 00-netty.xml - 01-md-sal.xml - + org.opendaylight.controller + features-mdsal + 1.6.0-SNAPSHOT + feature - - - org.opendaylight.odlparent - odlparent-artifacts - 1.9.0 - import - pom - - - org.opendaylight.yangtools - yangtools-artifacts - ${yangtools.version} - import - pom - - - org.opendaylight.mdsal - mdsal-artifacts - ${mdsal.version} - import - pom - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - - - org.opendaylight.controller - mdsal-artifacts - ${controller.mdsal.version} - import - pom - + + ${project.groupId} + odl-clustering-test-app + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-all + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-broker + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-broker-local + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-clustering + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-clustering-commons + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-common + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-distributed-datastore + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-remoterpc-connector + ${project.version} + xml + features + + + ${project.groupId} + odl-message-bus-collector + ${project.version} + xml + features + + + ${project.groupId} + odl-toaster + ${project.version} + xml + features + - - - - - - net.java.dev.stax-utils - stax-utils - - - - org.opendaylight.controller - blueprint - ${blueprint.version} - - - - - org.opendaylight.odlparent - features-odlparent - features - xml - - - org.opendaylight.yangtools - features-yangtools - features - xml - - - org.opendaylight.mdsal - features-mdsal - features - xml - - - org.opendaylight.mdsal.model - features-mdsal-model - features - ${mdsal.model.version} - xml - - - org.opendaylight.odlparent - features-akka - ${akka.features.version} - features - xml - - - org.opendaylight.controller - features-config - features - xml - - - org.opendaylight.controller - features-config-persister - features - xml - - - org.opendaylight.controller - features-config-netty - features - xml - - - - org.opendaylight.controller - md-sal-config - ${controller.mdsal.version} - xml - config - - - - org.opendaylight.controller - sal-akka-raft - ${controller.mdsal.version} - - - org.opendaylight.controller - sal-common-api - - - org.opendaylight.controller - sal-common-impl - - - org.opendaylight.controller - sal-common-util - - - org.opendaylight.controller - sal-core-spi - - - org.opendaylight.controller - sal-broker-impl - - - - org.opendaylight.controller - sal-binding-api - - - org.opendaylight.controller - sal-binding-config - - - org.opendaylight.controller - sal-binding-broker-impl - - - org.opendaylight.controller - sal-binding-util - - - org.opendaylight.controller - sal-connector-api - - - - org.opendaylight.controller - sal-clustering-commons - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - moduleshardconf - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - moduleconf - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - akkaconf - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - factoryakkaconf - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - config - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - xml - entityownershipconfig - - - org.opendaylight.controller - sal-clustering-config - ${controller.mdsal.version} - cfg - datastore - - - org.opendaylight.controller - sal-cluster-admin-api - ${controller.mdsal.version} - - - org.opendaylight.controller - sal-cluster-admin-impl - ${controller.mdsal.version} - - - org.opendaylight.controller - sal-distributed-datastore - - - org.opendaylight.controller - sal-dom-broker-config - - - org.opendaylight.controller - sal-schema-service - - - - - org.opendaylight.controller - messagebus-api - - - org.opendaylight.controller - messagebus-impl - - - org.opendaylight.controller - messagebus-config - ${controller.mdsal.version} - xml - config - - - - org.opendaylight.controller - sal-inmemory-datastore - - - org.opendaylight.controller - sal-remoterpc-connector - - - - org.opendaylight.controller.model - model-inventory - - - - org.opendaylight.controller.samples - clustering-it-config - ${controller.mdsal.version} - xml - testmoduleconf - - - org.opendaylight.controller.samples - clustering-it-config - ${controller.mdsal.version} - xml - testmoduleshardconf - - - org.opendaylight.controller.samples - clustering-it-model - ${controller.mdsal.version} - - - org.opendaylight.controller.samples - clustering-it-provider - ${controller.mdsal.version} - - - - - - org.opendaylight.controller.samples - sample-toaster - - - org.opendaylight.controller.samples - sample-toaster-consumer - - - org.opendaylight.controller.samples - sample-toaster-provider - - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - diff --git a/features/mdsal/features-mdsal/src/main/features/features.xml b/features/mdsal/features-mdsal/src/main/features/features.xml deleted file mode 100644 index 00bb515c67..0000000000 --- a/features/mdsal/features-mdsal/src/main/features/features.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - mvn:org.opendaylight.odlparent/features-odlparent/{{VERSION}}/xml/features - mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features - - mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features - - mvn:org.opendaylight.controller/features-config/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-config-persister/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-config-netty/{{VERSION}}/xml/features - mvn:org.opendaylight.odlparent/features-akka/{{VERSION}}/xml/features - - odl-mdsal-broker - odl-mdsal-broker-local - odl-toaster - - - odl-yangtools-yang-data - odl-config-api - odl-mdsal-binding-runtime - wrap:mvn:net.java.dev.stax-utils/stax-utils/{{VERSION}} - mvn:org.opendaylight.controller/sal-common-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-common-impl/{{VERSION}} - mvn:org.opendaylight.controller/sal-common-util/{{VERSION}} - - - - odl-yangtools-common - odl-mdsal-binding-dom-adapter - odl-mdsal-models - odl-mdsal-common - odl-config-startup - odl-config-netty - odl-lmax-3 - - - odl-mdsal-dom - odl-mdsal-eos-dom - odl-mdsal-eos-binding - odl-mdsal-singleton-dom - mvn:org.opendaylight.controller/sal-core-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-core-spi/{{VERSION}} - mvn:org.opendaylight.controller/sal-schema-service/{{VERSION}} - mvn:org.opendaylight.controller/sal-broker-impl/{{VERSION}} - mvn:org.opendaylight.controller/sal-binding-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-binding-broker-impl/{{VERSION}} - mvn:org.opendaylight.controller/sal-binding-util/{{VERSION}} - mvn:org.opendaylight.controller/sal-connector-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-dom-config/{{VERSION}} - mvn:org.opendaylight.controller/sal-binding-config/{{VERSION}} - mvn:org.opendaylight.controller/sal-inmemory-datastore/{{VERSION}} - mvn:org.opendaylight.controller/sal-dom-broker-config/{{VERSION}} - mvn:org.opendaylight.controller/blueprint/{{VERSION}} - mvn:org.opendaylight.controller/md-sal-config/{{VERSION}}/xml/config - - - odl-yangtools-common - odl-mdsal-binding-runtime - odl-mdsal-broker - mvn:org.opendaylight.controller.samples/sample-toaster/{{VERSION}} - mvn:org.opendaylight.controller.samples/sample-toaster-consumer/{{VERSION}} - mvn:org.opendaylight.controller.samples/sample-toaster-provider/{{VERSION}} - - - odl-mdsal-broker-local - odl-akka-system-2.4 - odl-akka-persistence-2.4 - odl-akka-clustering-2.4 - mvn:org.opendaylight.controller/sal-clustering-commons/{{VERSION}} - mvn:org.opendaylight.controller/sal-akka-raft/{{VERSION}} - mvn:io.dropwizard.metrics/metrics-core/{{VERSION}} - - - odl-mdsal-broker-local - odl-mdsal-clustering-commons - mvn:org.opendaylight.controller/cds-access-api/{{VERSION}} - mvn:org.opendaylight.controller/cds-access-client/{{VERSION}} - mvn:org.opendaylight.controller/cds-dom-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-distributed-datastore/{{VERSION}} - mvn:org.opendaylight.controller/sal-cluster-admin-api/{{VERSION}} - mvn:org.opendaylight.controller/sal-cluster-admin-impl/{{VERSION}} - - - odl-mdsal-broker-local - odl-mdsal-clustering-commons - odl-akka-leveldb-0.7 - mvn:org.opendaylight.controller/sal-remoterpc-connector/{{VERSION}} - - - odl-mdsal-remoterpc-connector - odl-mdsal-distributed-datastore - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/config - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/entityownershipconfig - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/akkaconf - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/factoryakkaconf - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/moduleshardconf - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/xml/moduleconf - mvn:org.opendaylight.controller/sal-clustering-config/{{VERSION}}/cfg/datastore - - - odl-mdsal-broker - - - odl-mdsal-models - odl-mdsal-broker - mvn:org.opendaylight.controller.samples/clustering-it-model/{{VERSION}} - mvn:org.opendaylight.controller.samples/clustering-it-provider/{{VERSION}} - - - - - mvn:org.opendaylight.controller.model/model-inventory/{{VERSION}} - odl-mdsal-broker - mvn:org.opendaylight.controller/messagebus-api/{{VERSION}} - mvn:org.opendaylight.controller/messagebus-spi/{{VERSION}} - mvn:org.opendaylight.controller/messagebus-util/{{VERSION}} - mvn:org.opendaylight.controller/messagebus-impl/{{VERSION}} - mvn:org.opendaylight.controller/messagebus-config/{{VERSION}}/xml/config - - diff --git a/features/mdsal/features4-mdsal/pom.xml b/features/mdsal/features4-mdsal/pom.xml deleted file mode 100644 index 45d8431dc1..0000000000 --- a/features/mdsal/features4-mdsal/pom.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-mdsal - 1.6.0-SNAPSHOT - feature - - - - ${project.groupId} - odl-clustering-test-app - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-all - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-broker - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-broker-local - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-clustering - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-clustering-commons - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-common - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-distributed-datastore - ${project.version} - xml - features - - - ${project.groupId} - odl-mdsal-remoterpc-connector - ${project.version} - xml - features - - - ${project.groupId} - odl-message-bus-collector - ${project.version} - xml - features - - - ${project.groupId} - odl-toaster - ${project.version} - xml - features - - - diff --git a/features/mdsal/odl-clustering-test-app/pom.xml b/features/mdsal/odl-clustering-test-app/pom.xml index 93eecc9ea2..b1a4f96bb3 100644 --- a/features/mdsal/odl-clustering-test-app/pom.xml +++ b/features/mdsal/odl-clustering-test-app/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-all/pom.xml b/features/mdsal/odl-mdsal-all/pom.xml index cd044c9a5a..fc706706d8 100644 --- a/features/mdsal/odl-mdsal-all/pom.xml +++ b/features/mdsal/odl-mdsal-all/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-broker-local/pom.xml b/features/mdsal/odl-mdsal-broker-local/pom.xml index fe7dbf83ca..7334bb07d8 100644 --- a/features/mdsal/odl-mdsal-broker-local/pom.xml +++ b/features/mdsal/odl-mdsal-broker-local/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 @@ -36,7 +36,7 @@ org.opendaylight.odlparent odlparent-artifacts - 1.9.0 + 2.0.0 pom import @@ -118,7 +118,7 @@ org.opendaylight.odlparent - odl4-lmax-3 + odl-lmax-3 xml features @@ -213,4 +213,4 @@ - \ No newline at end of file + diff --git a/features/mdsal/odl-mdsal-broker/pom.xml b/features/mdsal/odl-mdsal-broker/pom.xml index 8fa01f53ac..940f78f56c 100644 --- a/features/mdsal/odl-mdsal-broker/pom.xml +++ b/features/mdsal/odl-mdsal-broker/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-clustering-commons/pom.xml b/features/mdsal/odl-mdsal-clustering-commons/pom.xml index 88daffa735..7b5e41b379 100644 --- a/features/mdsal/odl-mdsal-clustering-commons/pom.xml +++ b/features/mdsal/odl-mdsal-clustering-commons/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 @@ -28,7 +28,7 @@ org.opendaylight.odlparent odlparent-artifacts - 1.9.0 + 2.0.0 pom import @@ -45,19 +45,19 @@ org.opendaylight.odlparent - odl4-akka-system-2.4 + odl-akka-system-2.4 xml features org.opendaylight.odlparent - odl4-akka-persistence-2.4 + odl-akka-persistence-2.4 xml features org.opendaylight.odlparent - odl4-akka-clustering-2.4 + odl-akka-clustering-2.4 xml features @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/features/mdsal/odl-mdsal-clustering/pom.xml b/features/mdsal/odl-mdsal-clustering/pom.xml index ff3e6eac2e..685fec578d 100644 --- a/features/mdsal/odl-mdsal-clustering/pom.xml +++ b/features/mdsal/odl-mdsal-clustering/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-common/pom.xml b/features/mdsal/odl-mdsal-common/pom.xml index 40e84f453f..d18464af9e 100644 --- a/features/mdsal/odl-mdsal-common/pom.xml +++ b/features/mdsal/odl-mdsal-common/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml index c03b154f39..370004fa08 100644 --- a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml +++ b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml index 80fb3b6a39..4e3a94aab5 100644 --- a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml +++ b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 @@ -40,8 +40,8 @@ org.opendaylight.odlparent - odl4-akka-leveldb-0.7 - 1.9.0 + odl-akka-leveldb-0.7 + 2.0.0 xml features @@ -51,4 +51,4 @@ ${project.version} - \ No newline at end of file + diff --git a/features/mdsal/odl-message-bus-collector/pom.xml b/features/mdsal/odl-message-bus-collector/pom.xml index c5aa9df70e..334285c20d 100644 --- a/features/mdsal/odl-message-bus-collector/pom.xml +++ b/features/mdsal/odl-message-bus-collector/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/odl-toaster/pom.xml b/features/mdsal/odl-toaster/pom.xml index a5e745b91e..6797fc3781 100644 --- a/features/mdsal/odl-toaster/pom.xml +++ b/features/mdsal/odl-toaster/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/mdsal/pom.xml b/features/mdsal/pom.xml index d4cc76274f..8b29fe941c 100644 --- a/features/mdsal/pom.xml +++ b/features/mdsal/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -24,7 +24,6 @@ features-mdsal - features4-mdsal odl-clustering-test-app odl-mdsal-all odl-mdsal-broker diff --git a/features/pom.xml b/features/pom.xml index 62f88f11d6..5f09aa9a5b 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/features/protocol-framework/features-protocol-framework/pom.xml b/features/protocol-framework/features-protocol-framework/pom.xml index c9ed8f68ac..13d297e593 100644 --- a/features/protocol-framework/features-protocol-framework/pom.xml +++ b/features/protocol-framework/features-protocol-framework/pom.xml @@ -1,47 +1,36 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.9.0 - - + + + 4.0.0 - - 0.7.0-SNAPSHOT - + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + + + org.opendaylight.controller + features-protocol-framework + 0.10.0-SNAPSHOT + feature + + + + org.opendaylight.controller + odl-protocol-framework + 0.10.0-SNAPSHOT + xml + features + + - - - org.opendaylight.controller - features-config - features - ${config.version} - xml - - - org.opendaylight.controller - features-config-netty - ${config.version} - features - xml - - - org.opendaylight.controller - protocol-framework - ${project.version} - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - diff --git a/features/protocol-framework/features-protocol-framework/src/main/features/features.xml b/features/protocol-framework/features-protocol-framework/src/main/features/features.xml deleted file mode 100644 index 01ff4694dd..0000000000 --- a/features/protocol-framework/features-protocol-framework/src/main/features/features.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - mvn:org.opendaylight.controller/features-config/{{VERSION}}/xml/features - mvn:org.opendaylight.controller/features-config-netty/{{VERSION}}/xml/features - - odl-config-api - odl-config-netty-config-api - mvn:org.opendaylight.controller/protocol-framework/{{VERSION}} - - diff --git a/features/protocol-framework/features4-protocol-framework/pom.xml b/features/protocol-framework/features4-protocol-framework/pom.xml deleted file mode 100644 index ad8bf689db..0000000000 --- a/features/protocol-framework/features4-protocol-framework/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-protocol-framework - 0.10.0-SNAPSHOT - feature - - - - org.opendaylight.controller - odl-protocol-framework - 0.10.0-SNAPSHOT - xml - features - - - - \ No newline at end of file diff --git a/features/protocol-framework/odl-protocol-framework/pom.xml b/features/protocol-framework/odl-protocol-framework/pom.xml index b6a754a1a5..5e54f4e53c 100644 --- a/features/protocol-framework/odl-protocol-framework/pom.xml +++ b/features/protocol-framework/odl-protocol-framework/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/features/protocol-framework/pom.xml b/features/protocol-framework/pom.xml index e422061221..afc0fd9d1c 100644 --- a/features/protocol-framework/pom.xml +++ b/features/protocol-framework/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -23,7 +23,6 @@ features-protocol-framework - features4-protocol-framework odl-protocol-framework diff --git a/karaf/karaf-parent/pom.xml b/karaf/karaf-parent/pom.xml deleted file mode 100644 index e343943d71..0000000000 --- a/karaf/karaf-parent/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - org.opendaylight.odlparent - karaf-parent - 1.9.0 - - - 4.0.0 - org.opendaylight.controller - karaf-parent - 1.9.0-SNAPSHOT - ${project.artifactId} - pom - - diff --git a/karaf/opendaylight-karaf/pom.xml b/karaf/opendaylight-karaf/pom.xml index 47797e77c7..deba74b67c 100644 --- a/karaf/opendaylight-karaf/pom.xml +++ b/karaf/opendaylight-karaf/pom.xml @@ -3,10 +3,11 @@ 4.0.0 org.opendaylight.odlparent - karaf-parent - 1.9.0 + karaf4-parent + 2.0.0 + org.opendaylight.controller distribution.opendaylight-karaf 1.9.0-SNAPSHOT diff --git a/karaf/pom.xml b/karaf/pom.xml index 6c1563d365..d571aa0d3d 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -12,15 +12,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 + org.opendaylight.controller karaf-aggregator 1.5.0-SNAPSHOT pom + - karaf-parent - opendaylight-karaf + diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/artifacts/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/artifacts/pom.xml index f31eb3b5d8..9b17f6f902 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/artifacts/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/artifacts/pom.xml @@ -17,7 +17,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/pom.xml index 0f0046da83..cd39f56d5e 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/pom.xml @@ -17,7 +17,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent features-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/karaf/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/karaf/pom.xml index 149241dfa6..5093f84cd2 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/karaf/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/karaf/pom.xml @@ -16,7 +16,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf-parent - 1.9.0 + 2.0.0 ${groupId} diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml index d4a8d5e08c..5f205c0edd 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/archetypes/pom.xml b/opendaylight/archetypes/pom.xml index 0618446d1e..e0a7180bd3 100644 --- a/opendaylight/archetypes/pom.xml +++ b/opendaylight/archetypes/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index 9bb8ce8737..c030bfbc96 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/commons/jolokia/pom.xml b/opendaylight/commons/jolokia/pom.xml index 77d5c7d8b7..aa6737feca 100644 --- a/opendaylight/commons/jolokia/pom.xml +++ b/opendaylight/commons/jolokia/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/commons/liblldp/pom.xml b/opendaylight/commons/liblldp/pom.xml index 17953ac0be..a1687b6845 100644 --- a/opendaylight/commons/liblldp/pom.xml +++ b/opendaylight/commons/liblldp/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/commons/logback_settings/pom.xml b/opendaylight/commons/logback_settings/pom.xml index af006c7142..3ed2b0b5ed 100644 --- a/opendaylight/commons/logback_settings/pom.xml +++ b/opendaylight/commons/logback_settings/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 org.opendaylight.controller diff --git a/opendaylight/commons/protocol-framework/pom.xml b/opendaylight/commons/protocol-framework/pom.xml index 314fdea7cc..570ae8148e 100644 --- a/opendaylight/commons/protocol-framework/pom.xml +++ b/opendaylight/commons/protocol-framework/pom.xml @@ -7,7 +7,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/config/config-artifacts/pom.xml b/opendaylight/config/config-artifacts/pom.xml index 2d40551d0c..b70b3da53d 100644 --- a/opendaylight/config/config-artifacts/pom.xml +++ b/opendaylight/config/config-artifacts/pom.xml @@ -71,11 +71,6 @@ config-persister-feature-adapter ${project.version} - - ${project.groupId} - config-persister-feature4-adapter - ${project.version} - ${project.groupId} config-persister-file-adapter diff --git a/opendaylight/config/config-it-base/pom.xml b/opendaylight/config/config-it-base/pom.xml index cf62269e50..ef0d04afa9 100644 --- a/opendaylight/config/config-it-base/pom.xml +++ b/opendaylight/config/config-it-base/pom.xml @@ -19,7 +19,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html bundle - 1.9.0 + 2.0.0 diff --git a/opendaylight/config/config-netty-config/pom.xml b/opendaylight/config/config-netty-config/pom.xml index 46e45f6e49..e173abe80e 100644 --- a/opendaylight/config/config-netty-config/pom.xml +++ b/opendaylight/config/config-netty-config/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java index 7e33ceea2a..bce4d3c0c5 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java @@ -19,11 +19,15 @@ import javax.xml.bind.JAXBException; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.stream.XMLStreamException; import org.apache.karaf.features.BundleInfo; +import org.apache.karaf.features.Capability; import org.apache.karaf.features.Conditional; import org.apache.karaf.features.ConfigFileInfo; import org.apache.karaf.features.ConfigInfo; import org.apache.karaf.features.Dependency; import org.apache.karaf.features.Feature; +import org.apache.karaf.features.Library; +import org.apache.karaf.features.Requirement; +import org.apache.karaf.features.Scoping; import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -151,139 +155,114 @@ public class AbstractFeatureWrapper implements Feature { return feature.getName(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getId() - */ @Override public String getId() { return feature.getId(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getName() - */ @Override public String getName() { return feature.getName(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getDescription() - */ @Override public String getDescription() { return feature.getDescription(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getDetails() - */ @Override public String getDetails() { return feature.getDetails(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getVersion() - */ @Override public String getVersion() { return feature.getVersion(); } - /** - * @return - * @see org.apache.karaf.features.Feature#hasVersion() - */ @Override public boolean hasVersion() { return feature.hasVersion(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getResolver() - */ @Override public String getResolver() { return feature.getResolver(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getInstall() - */ @Override public String getInstall() { return feature.getInstall(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getDependencies() - */ @Override public List getDependencies() { return feature.getDependencies(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getBundles() - */ @Override public List getBundles() { return feature.getBundles(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getConfigurations() - */ @Override public List getConfigurations() { return feature.getConfigurations(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getConfigurationFiles() - */ @Override public List getConfigurationFiles() { return feature.getConfigurationFiles(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getConditional() - */ @Override public List getConditional() { return feature.getConditional(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getStartLevel() - */ @Override public int getStartLevel() { return feature.getStartLevel(); } - /** - * @return - * @see org.apache.karaf.features.Feature#getRegion() - */ @Override - public String getRegion() { - return feature.getRegion(); + public List getCapabilities() { + return feature.getCapabilities(); + } + + @Override + public List getLibraries() { + return feature.getLibraries(); + } + + @Override + public String getNamespace() { + return feature.getNamespace(); + } + + @Override + public String getRepositoryUrl() { + return feature.getRepositoryUrl(); + } + + @Override + public List getRequirements() { + return feature.getRequirements(); + } + + @Override + public List getResourceRepositories() { + return feature.getResourceRepositories(); + } + + @Override + public Scoping getScoping() { + return feature.getScoping(); + } + + @Override + public boolean isHidden() { + return feature.isHidden(); } } diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java index 15223a8f9f..5d487e0b9c 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java @@ -11,14 +11,14 @@ import com.google.common.base.Optional; import com.google.common.collect.LinkedHashMultimap; import java.util.ArrayList; import java.util.Arrays; -import java.util.ConcurrentModificationException; +import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; +import java.util.concurrent.TimeUnit; import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeaturesService; import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder; import org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,14 +27,12 @@ import org.slf4j.LoggerFactory; * Simple class to push configs to the config subsystem from Feature's configfiles */ public class FeatureConfigPusher { - private static final Logger LOG = LoggerFactory.getLogger(FeatureConfigPusher.class); + private static final int MAX_RETRIES = 100; + private static final int RETRY_PAUSE_MILLIS = 1; - private static final int MAX_RETRIES = 10; - private static final int RETRY_PAUSE_MILLIS = 100; - - private final FeaturesService featuresService; - private final ConfigPusher pusher; + private FeaturesService featuresService = null; + private ConfigPusher pusher = null; /* * A LinkedHashSet (to preserve order and insure uniqueness) of the pushedConfigs @@ -42,20 +40,20 @@ public class FeatureConfigPusher { * chains. Also, preserves the *original* Feature chain for which we pushed the config. * (which is handy for logging). */ - Set pushedConfigs = new LinkedHashSet<>(); + private final Set pushedConfigs = new LinkedHashSet<>(); /* * LinkedHashMultimap to track which configs we pushed for each Feature installation * For future use */ - LinkedHashMultimap feature2configs = LinkedHashMultimap.create(); + private final LinkedHashMultimap feature2configs = LinkedHashMultimap.create(); /* * @param p - ConfigPusher to push ConfigSnapshotHolders */ - public FeatureConfigPusher(final ConfigPusher pusher, final FeaturesService featuresService) { - this.pusher = pusher; - this.featuresService = featuresService; + public FeatureConfigPusher(final ConfigPusher p, final FeaturesService f) { + pusher = p; + featuresService = f; } /* * Push config files from Features to config subsystem @@ -66,11 +64,10 @@ public class FeatureConfigPusher { * If a Feature is not in the returned LinkedHashMultimap then we couldn't push its configs * (Ususally because it was not yet installed) */ - public LinkedHashMultimap pushConfigs(final List features) throws Exception { + public LinkedHashMultimap pushConfigs(final List features) + throws Exception { LinkedHashMultimap pushedFeatures = LinkedHashMultimap.create(); for (Feature feature : features) { - - Set configSnapShots = pushConfig(feature); if (!configSnapShots.isEmpty()) { pushedFeatures.putAll(feature, configSnapShots); @@ -80,57 +77,60 @@ public class FeatureConfigPusher { } private Set pushConfig(final Feature feature) throws Exception { - Set configs = new LinkedHashSet<>(); - if(isInstalled(feature)) { - // FIXME Workaround for BUG-2836, features service returns null for feature: standard-condition-webconsole_0_0_0, 3.0.1 - if(featuresService.getFeature(feature.getName(), feature.getVersion()) == null) { - LOG.debug("Feature: {}, {} is missing from features service. Skipping", feature.getName(), feature.getVersion()); - } else { - ChildAwareFeatureWrapper wrappedFeature = new ChildAwareFeatureWrapper(feature, featuresService); - configs = wrappedFeature.getFeatureConfigSnapshotHolders(); - if (!configs.isEmpty()) { - configs = pushConfig(configs, feature); - feature2configs.putAll(feature, configs); - } - } + // Ignore feature conditions — these encode conditions on other features and shouldn't be processed here + if (feature.getName().contains("-condition-")) { + LOG.debug("Ignoring conditional feature {}", feature); + return Collections.emptySet(); + } + // pax-exam's Karaf container generates a wrapper feature holding the test dependencies. Ignore it. + if ("test-dependencies".equals(feature.getName())) { + LOG.debug("Ignoring pax-exam wrapper feature {}", feature); + return Collections.emptySet(); + } + + if (!isInstalled(feature)) { + return Collections.emptySet(); + } + // FIXME Workaround for BUG-2836, features service returns null for feature: + // standard-condition-webconsole_0_0_0, 3.0.1 + if (featuresService.getFeature(feature.getName(), feature.getVersion()) == null) { + LOG.debug("Feature: {}, {} is missing from features service. Skipping", feature.getName(), + feature.getVersion()); + return Collections.emptySet(); + } + + ChildAwareFeatureWrapper wrappedFeature = new ChildAwareFeatureWrapper(feature, featuresService); + Set configs = wrappedFeature.getFeatureConfigSnapshotHolders(); + if (!configs.isEmpty()) { + configs = pushConfig(configs, feature); + feature2configs.putAll(feature, configs); } return configs; } - private boolean isInstalled(final Feature feature) { - Exception lastException = null; + private boolean isInstalled(final Feature feature) throws InterruptedException { for (int retries = 0; retries < MAX_RETRIES; retries++) { try { List installedFeatures = Arrays.asList(featuresService.listInstalledFeatures()); if (installedFeatures.contains(feature)) { return true; - } else { - LOG.warn("Karaf featuresService.listInstalledFeatures() has not yet finished installing feature (retry {}) {} {}", retries, feature.getName(), feature.getVersion()); } - // TODO This catch of ConcurrentModificationException may be able to simply be removed after - // we're fully on Karaf 4 only, as a comment in BUG-6787 indicates that (in Karaf 4) : - // "the 'installed' Map of FeaturesServiceImpl .. appears to be correctly synchronized/thread-safe". - // (Or, if it's still NOK, then it could be fixed properly upstream in Karaf once we're on recent.) - } catch (final ConcurrentModificationException e) { - // BUG-6787 experience shows that a LOG.warn (or info) here is very confusing to end-users; - // as we have a retry loop anyway, there is no point informing (and confusing) users of this - // intermediate state of, so ... NOOP, do not log here. - lastException = e; - } - try { - Thread.sleep(RETRY_PAUSE_MILLIS); - } catch (final InterruptedException e1) { - throw new IllegalStateException(e1); + + LOG.info("Karaf Feature Service has not yet finished installing feature {}/{} (retry {})", + feature.getName(), feature.getVersion(), retries); + } catch (final Exception e) { + LOG.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}", retries, e); } + + TimeUnit.MILLISECONDS.sleep(RETRY_PAUSE_MILLIS); } - LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() " - + "which has not yet finished installing feature {} {} (stack trace is last exception caught)", - MAX_RETRIES, feature.getName(), feature.getVersion(), lastException); + LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet finished installing feature {} {}", + MAX_RETRIES, feature.getName(), feature.getVersion()); return false; } - private Set pushConfig(final Set configs, final Feature feature) - throws InterruptedException { + private Set pushConfig(final Set configs, + final Feature feature) throws InterruptedException { Set configsToPush = new LinkedHashSet<>(configs); configsToPush.removeAll(pushedConfigs); if (!configsToPush.isEmpty()) { @@ -142,7 +142,7 @@ public class FeatureConfigPusher { LOG.warn("Ignoring default configuration {} for feature {}, the configuration is present in {}", configsToPush, feature.getId(), currentCfgPusher.get()); } else { - pusher.pushConfigs(new ArrayList(configsToPush)); + pusher.pushConfigs(new ArrayList<>(configsToPush)); } pushedConfigs.addAll(configsToPush); diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java index 0320ea2743..68ae3d31cb 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java @@ -9,7 +9,9 @@ package org.opendaylight.controller.configpusherfeature.internal; import com.google.common.base.Optional; import com.google.common.collect.Sets; + import java.util.Set; + import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeaturesListener; import org.apache.karaf.features.FeaturesService; @@ -19,8 +21,11 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; import org.osgi.util.tracker.ServiceTrackerCustomizer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class FeatureServiceCustomizer implements ServiceTrackerCustomizer, AutoCloseable { + private static final Logger LOG = LoggerFactory.getLogger(FeatureServiceCustomizer.class); private ConfigPusher configPusher = null; private ServiceRegistration registration; @@ -34,10 +39,14 @@ public class FeatureServiceCustomizer implements ServiceTrackerCustomizer currentPersister = XmlFileStorageAdapter.getInstance(); - if(XmlFileStorageAdapter.getInstance().isPresent()) { + if (XmlFileStorageAdapter.getInstance().isPresent()) { final Set installedFeatureIds = Sets.newHashSet(); - for (final Feature installedFeature : featureService.listInstalledFeatures()) { - installedFeatureIds.add(installedFeature.getId()); + try { + for (final Feature installedFeature : featureService.listInstalledFeatures()) { + installedFeatureIds.add(installedFeature.getId()); + } + } catch (final Exception e) { + LOG.error("Error listing installed features", e); } currentPersister.get().setFeaturesService(() -> installedFeatureIds); @@ -49,19 +58,19 @@ public class FeatureServiceCustomizer implements ServiceTrackerCustomizer reference, - final FeaturesService service) { + final FeaturesService service) { // we don't care if the properties change } @Override public void removedService(final ServiceReference reference, - final FeaturesService service) { + final FeaturesService service) { close(); } @Override public void close() { - if(registration != null) { + if (registration != null) { registration.unregister(); registration = null; } diff --git a/opendaylight/config/config-persister-feature4-adapter/pom.xml b/opendaylight/config/config-persister-feature4-adapter/pom.xml deleted file mode 100644 index eb22b90aec..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - 4.0.0 - - - org.opendaylight.controller - config-subsystem - 0.7.0-SNAPSHOT - .. - - - config-persister-feature4-adapter - bundle - - - - org.osgi - org.osgi.core - provided - - - org.apache.karaf.features - org.apache.karaf.features.core - ${karaf4.version} - provided - - - org.opendaylight.controller - config-persister-impl - - - org.opendaylight.controller - config-persister-api - - - org.opendaylight.controller - config-persister-directory-xml-adapter - - - org.apache.felix - org.apache.felix.utils - 1.6.0 - provided - - - com.google.guava - guava - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.artifactId} - ${project.version} - org.opendaylight.controller.configpusherfeature.ConfigPusherFeatureActivator - - org.apache.karaf.features.internal.model, - org.apache.felix.utils.version, - org.opendaylight.controller.configpusherfeature.internal - - - - - - - - diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java deleted file mode 100644 index c20c6f9182..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature; - -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.opendaylight.controller.configpusherfeature.internal.ConfigPusherCustomizer; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.util.tracker.ServiceTracker; - -public class ConfigPusherFeatureActivator implements BundleActivator { - - BundleContext bc = null; - ConfigPusherCustomizer cpc = null; - ServiceTracker cpst = null; - - public void start(final BundleContext context) throws Exception { - bc = context; - cpc = new ConfigPusherCustomizer(); - cpst = new ServiceTracker<>(bc, ConfigPusher.class.getName(), cpc); - cpst.open(); - } - - public void stop(final BundleContext context) throws Exception { - if(cpst != null) { - cpst.close(); - cpst = null; - } - if(cpc != null) { - cpc.close(); - cpc = null; - } - bc = null; - } -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java deleted file mode 100644 index bce4d3c0c5..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.base.Optional; -import com.google.common.base.Preconditions; -import com.google.common.io.Files; -import java.io.File; -import java.io.FileInputStream; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import javax.xml.bind.JAXBException; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.stream.XMLStreamException; -import org.apache.karaf.features.BundleInfo; -import org.apache.karaf.features.Capability; -import org.apache.karaf.features.Conditional; -import org.apache.karaf.features.ConfigFileInfo; -import org.apache.karaf.features.ConfigInfo; -import org.apache.karaf.features.Dependency; -import org.apache.karaf.features.Feature; -import org.apache.karaf.features.Library; -import org.apache.karaf.features.Requirement; -import org.apache.karaf.features.Scoping; -import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Element; - -/* - * Wrap a Feature for the purposes of extracting the FeatureConfigSnapshotHolders from - * its underlying ConfigFileInfo's - * - * Delegates the the contained feature and provides additional methods. - */ -public class AbstractFeatureWrapper implements Feature { - private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureWrapper.class); - - protected static final String CONFIG_FILE_SUFFIX = "xml"; - - protected Feature feature = null; - - protected AbstractFeatureWrapper() { - // prevent instantiation without Feature - } - - /* - * @param f Feature to wrap - */ - public AbstractFeatureWrapper(final Feature f) { - Preconditions.checkNotNull(f,"FeatureWrapper requires non-null Feature in constructor"); - this.feature = f; - } - - /* - * Get FeatureConfigSnapshotHolders appropriate to feed to the config subsystem - * from the underlying Feature Config files - */ - public Set getFeatureConfigSnapshotHolders() throws Exception { - final Set snapShotHolders = new LinkedHashSet<>(); - for(final ConfigFileInfo c: getConfigurationFiles()) { - // Skip non config snapshot XML files - if(isConfigSnapshot(c.getFinalname())) { - final Optional featureConfigSnapshotHolder = getFeatureConfigSnapshotHolder(c); - if(featureConfigSnapshotHolder.isPresent()) { - snapShotHolders.add(featureConfigSnapshotHolder.get()); - } - } - } - return snapShotHolders; - } - - protected Optional getFeatureConfigSnapshotHolder(final ConfigFileInfo c) { - try { - return Optional.of(new FeatureConfigSnapshotHolder(c, this)); - } catch (final JAXBException e) { - LOG.warn("Unable to parse configuration snapshot. Config from '{}' will be IGNORED. " + - "Note that subsequent config files may fail due to this problem. " + - "Xml markup in this file needs to be fixed, for detailed information see enclosed exception.", - c.getFinalname(), e); - } catch (final XMLStreamException e) { - // Files that cannot be loaded are ignored as non config subsystem files e.g. jetty.xml - LOG.debug("Unable to read configuration file '{}'. Not a configuration snapshot", - c.getFinalname(), e); - } - return Optional.absent(); - } - - private static boolean isConfigSnapshot(final String fileName) { - if(!Files.getFileExtension(fileName).equals(CONFIG_FILE_SUFFIX)) { - return false; - } - - if(fileName.endsWith("jetty.xml")) { - // Special case - ignore the jetty.xml file as it contains a DTD and causes a "Connection refused" - // error when it tries to go out to the network to retrieve it. We don't want it trying to go out - // to the network nor do we want an error logged trying to parse it. - return false; - } - - File file = new File(System.getProperty("karaf.home"), fileName); - try(FileInputStream fis = new FileInputStream(file)) { - DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); - builderFactory.setNamespaceAware(true); - builderFactory.setCoalescing(true); - builderFactory.setIgnoringElementContentWhitespace(true); - builderFactory.setIgnoringComments(true); - - Element root = builderFactory.newDocumentBuilder().parse(fis).getDocumentElement(); - return ConfigSnapshot.SNAPSHOT_ROOT_ELEMENT_NAME.equals(root.getLocalName()); - } catch (final Exception e) { - LOG.error("Could not parse XML file {}", file, e); - return false; - } - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (feature == null ? 0 : feature.hashCode()); - return result; - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final AbstractFeatureWrapper other = (AbstractFeatureWrapper) obj; - if (feature == null) { - if (other.feature != null) { - return false; - } - } else if (!feature.equals(other.feature)) { - return false; - } - return true; - } - - @Override - public String toString() { - return feature.getName(); - } - - @Override - public String getId() { - return feature.getId(); - } - - @Override - public String getName() { - return feature.getName(); - } - - @Override - public String getDescription() { - return feature.getDescription(); - } - - @Override - public String getDetails() { - return feature.getDetails(); - } - - @Override - public String getVersion() { - return feature.getVersion(); - } - - @Override - public boolean hasVersion() { - return feature.hasVersion(); - } - - @Override - public String getResolver() { - return feature.getResolver(); - } - - @Override - public String getInstall() { - return feature.getInstall(); - } - - @Override - public List getDependencies() { - return feature.getDependencies(); - } - - @Override - public List getBundles() { - return feature.getBundles(); - } - - @Override - public List getConfigurations() { - return feature.getConfigurations(); - } - - @Override - public List getConfigurationFiles() { - return feature.getConfigurationFiles(); - } - - @Override - public List getConditional() { - return feature.getConditional(); - } - - @Override - public int getStartLevel() { - return feature.getStartLevel(); - } - - @Override - public List getCapabilities() { - return feature.getCapabilities(); - } - - @Override - public List getLibraries() { - return feature.getLibraries(); - } - - @Override - public String getNamespace() { - return feature.getNamespace(); - } - - @Override - public String getRepositoryUrl() { - return feature.getRepositoryUrl(); - } - - @Override - public List getRequirements() { - return feature.getRequirements(); - } - - @Override - public List getResourceRepositories() { - return feature.getResourceRepositories(); - } - - @Override - public Scoping getScoping() { - return feature.getScoping(); - } - - @Override - public boolean isHidden() { - return feature.isHidden(); - } - -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java deleted file mode 100644 index f51bf4738a..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.base.Optional; -import com.google.common.base.Preconditions; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.apache.felix.utils.version.VersionRange; -import org.apache.felix.utils.version.VersionTable; -import org.apache.karaf.features.Dependency; -import org.apache.karaf.features.Feature; -import org.apache.karaf.features.FeaturesService; -import org.osgi.framework.Version; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/* - * Wrap a Feature for the purposes of extracting the FeatureConfigSnapshotHolders from - * its underlying ConfigFileInfo's and those of its children recursively - * - * Delegates the the contained feature and provides additional methods. - */ -public class ChildAwareFeatureWrapper extends AbstractFeatureWrapper implements Feature { - private static final Logger LOG = LoggerFactory.getLogger(ChildAwareFeatureWrapper.class); - private FeaturesService featuresService= null; - - protected ChildAwareFeatureWrapper(final Feature f) { - // Don't use without a feature service - } - - /* - * @param f Feature to wrap - * @param s FeaturesService to look up dependencies - */ - ChildAwareFeatureWrapper(final Feature f, final FeaturesService s) throws Exception { - super(s.getFeature(f.getName(), f.getVersion())); - Preconditions.checkNotNull(s, "FeatureWrapper requires non-null FeatureService in constructor"); - this.featuresService = s; - } - - protected FeaturesService getFeaturesService() { - return featuresService; - } - - /* - * Get FeatureConfigSnapshotHolders appropriate to feed to the config subsystem - * from the underlying Feature Config files and those of its children recursively - */ - public Set getChildFeatures() throws Exception { - List dependencies = feature.getDependencies(); - Set childFeatures = new LinkedHashSet<>(); - if(dependencies != null) { - for(Dependency dependency: dependencies) { - Feature fi = extractFeatureFromDependency(dependency); - if (fi != null) { - if (featuresService.getFeature(fi.getName(), fi.getVersion()) == null) { - LOG.warn("Feature: {}, {} is missing from features service. Skipping", fi.getName(), fi.getVersion()); - } else { - ChildAwareFeatureWrapper wrappedFeature = new ChildAwareFeatureWrapper(fi, featuresService); - childFeatures.add(wrappedFeature); - } - } - } - } - return childFeatures; - } - - @Override - public Set getFeatureConfigSnapshotHolders() throws Exception { - Set snapShotHolders = new LinkedHashSet<>(); - for(ChildAwareFeatureWrapper c: getChildFeatures()) { - for(FeatureConfigSnapshotHolder h: c.getFeatureConfigSnapshotHolders()) { - final Optional featureConfigSnapshotHolder = getFeatureConfigSnapshotHolder(h.getFileInfo()); - if(featureConfigSnapshotHolder.isPresent()) { - snapShotHolders.add(featureConfigSnapshotHolder.get()); - } - } - } - snapShotHolders.addAll(super.getFeatureConfigSnapshotHolders()); - return snapShotHolders; - } - - protected Feature extractFeatureFromDependency(final Dependency dependency) throws Exception { - Feature[] features = featuresService.listFeatures(); - VersionRange range = org.apache.karaf.features.internal.model.Feature.DEFAULT_VERSION.equals(dependency.getVersion()) - ? VersionRange.ANY_VERSION : new VersionRange(dependency.getVersion(), true, true); - Feature fi = null; - for(Feature f: features) { - if (f.getName().equals(dependency.getName())) { - Version v = VersionTable.getVersion(f.getVersion()); - if (range.contains(v) && - (fi == null || VersionTable.getVersion(fi.getVersion()).compareTo(v) < 0)) { - fi = f; - break; - } - } - } - return fi; - } - -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java deleted file mode 100644 index 075db509f8..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import org.apache.karaf.features.FeatureEvent; -import org.apache.karaf.features.FeaturesListener; -import org.apache.karaf.features.FeaturesService; -import org.apache.karaf.features.RepositoryEvent; -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ConfigFeaturesListener implements FeaturesListener, AutoCloseable { - private static final Logger LOG = LoggerFactory.getLogger(ConfigFeaturesListener.class); - private static final int QUEUE_SIZE = 1000; - private BlockingQueue queue = new LinkedBlockingQueue<>(QUEUE_SIZE); - Thread pushingThread = null; - - public ConfigFeaturesListener(final ConfigPusher p, final FeaturesService f) { - pushingThread = new Thread(new ConfigPushingRunnable(p, f, queue), "ConfigFeatureListener - ConfigPusher"); - pushingThread.start(); - } - - @Override - public void featureEvent(final FeatureEvent event) { - queue.offer(event); - } - - @Override - public void repositoryEvent(final RepositoryEvent event) { - LOG.debug("Repository: {} {}", event.getType(), event.getRepository()); - } - - @Override - public void close() { - if(pushingThread != null) { - pushingThread.interrupt(); - pushingThread = null; - } - } -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java deleted file mode 100644 index ac10c68c8f..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import org.apache.karaf.features.FeaturesService; -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.util.tracker.ServiceTracker; -import org.osgi.util.tracker.ServiceTrackerCustomizer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ConfigPusherCustomizer implements ServiceTrackerCustomizer, AutoCloseable { - private static final Logger LOG = LoggerFactory.getLogger(ConfigPusherCustomizer.class); - private ConfigFeaturesListener configFeaturesListener = null; - private FeatureServiceCustomizer featureServiceCustomizer = null; - private ServiceTracker fsst = null; - - @Override - public ConfigPusher addingService(final ServiceReference configPusherServiceReference) { - LOG.trace("Got ConfigPusherCustomizer.addingService {}", configPusherServiceReference); - BundleContext bc = configPusherServiceReference.getBundle().getBundleContext(); - ConfigPusher cpService = bc.getService(configPusherServiceReference); - featureServiceCustomizer = new FeatureServiceCustomizer(cpService); - fsst = new ServiceTracker<>(bc, FeaturesService.class.getName(), featureServiceCustomizer); - fsst.open(); - return cpService; - } - - @Override - public void modifiedService(final ServiceReference configPusherServiceReference, final ConfigPusher configPusher) { - // we don't care if the properties change - } - - @Override - public void removedService(final ServiceReference configPusherServiceReference, final ConfigPusher configPusher) { - this.close(); - } - - @Override - public void close() { - if(fsst != null) { - fsst.close(); - fsst = null; - } - if(configFeaturesListener != null) { - configFeaturesListener.close(); - configFeaturesListener = null; - } - if(featureServiceCustomizer != null) { - featureServiceCustomizer.close(); - featureServiceCustomizer = null; - } - } -} \ No newline at end of file diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java deleted file mode 100644 index 48c494b5c7..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.collect.LinkedHashMultimap; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import org.apache.karaf.features.Feature; -import org.apache.karaf.features.FeatureEvent; -import org.apache.karaf.features.FeatureEvent.EventType; -import org.apache.karaf.features.FeaturesService; -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ConfigPushingRunnable implements Runnable { - private static final Logger LOG = LoggerFactory.getLogger(ConfigPushingRunnable.class); - private static final int POLL_TIME = 1; - private BlockingQueue queue; - private FeatureConfigPusher configPusher; - public ConfigPushingRunnable(final ConfigPusher p, final FeaturesService f, final BlockingQueue q) { - queue = q; - configPusher = new FeatureConfigPusher(p, f); - } - - @Override - public void run() { - List toInstall = new ArrayList<>(); - FeatureEvent event = null; - boolean interuppted = false; - while(true) { - try { - if(!interuppted) { - if(toInstall.isEmpty()) { - event = queue.take(); - } else { - event = queue.poll(POLL_TIME, TimeUnit.MILLISECONDS); - } - if(event != null && event.getFeature() !=null) { - processFeatureEvent(event,toInstall); - } - } else if(toInstall.isEmpty()) { - LOG.error("ConfigPushingRunnable - exiting"); - return; - } - } catch (final InterruptedException e) { - LOG.error("ConfigPushingRunnable - interupted"); - interuppted = true; - } catch (final Exception e) { - LOG.error("Exception while processing features {} event {}", toInstall, event, e); - } - } - } - - protected void processFeatureEvent(final FeatureEvent event, final List toInstall) throws Exception { - if(event.getType() == EventType.FeatureInstalled) { - toInstall.add(event.getFeature()); - LinkedHashMultimap result = configPusher.pushConfigs(toInstall); - toInstall.removeAll(result.keySet()); - } else if(event.getType() == EventType.FeatureUninstalled) { - toInstall.remove(event.getFeature()); - } - } - - protected void logPushResult(final LinkedHashMultimap results) { - for(Feature f:results.keySet()) { - LOG.info("Pushed configs for feature {} {}",f,results.get(f)); - } - } -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java deleted file mode 100644 index 5d487e0b9c..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.base.Optional; -import com.google.common.collect.LinkedHashMultimap; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import org.apache.karaf.features.Feature; -import org.apache.karaf.features.FeaturesService; -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/* - * Simple class to push configs to the config subsystem from Feature's configfiles - */ -public class FeatureConfigPusher { - private static final Logger LOG = LoggerFactory.getLogger(FeatureConfigPusher.class); - private static final int MAX_RETRIES = 100; - private static final int RETRY_PAUSE_MILLIS = 1; - - private FeaturesService featuresService = null; - private ConfigPusher pusher = null; - - /* - * A LinkedHashSet (to preserve order and insure uniqueness) of the pushedConfigs - * This is used to prevent pushing duplicate configs if a Feature is in multiple dependency - * chains. Also, preserves the *original* Feature chain for which we pushed the config. - * (which is handy for logging). - */ - private final Set pushedConfigs = new LinkedHashSet<>(); - - /* - * LinkedHashMultimap to track which configs we pushed for each Feature installation - * For future use - */ - private final LinkedHashMultimap feature2configs = LinkedHashMultimap.create(); - - /* - * @param p - ConfigPusher to push ConfigSnapshotHolders - */ - public FeatureConfigPusher(final ConfigPusher p, final FeaturesService f) { - pusher = p; - featuresService = f; - } - /* - * Push config files from Features to config subsystem - * @param features - list of Features to extract config files from recursively and push - * to the config subsystem - * - * @return A LinkedHashMultimap of Features to the FeatureConfigSnapshotHolder actually pushed - * If a Feature is not in the returned LinkedHashMultimap then we couldn't push its configs - * (Ususally because it was not yet installed) - */ - public LinkedHashMultimap pushConfigs(final List features) - throws Exception { - LinkedHashMultimap pushedFeatures = LinkedHashMultimap.create(); - for (Feature feature : features) { - Set configSnapShots = pushConfig(feature); - if (!configSnapShots.isEmpty()) { - pushedFeatures.putAll(feature, configSnapShots); - } - } - return pushedFeatures; - } - - private Set pushConfig(final Feature feature) throws Exception { - // Ignore feature conditions — these encode conditions on other features and shouldn't be processed here - if (feature.getName().contains("-condition-")) { - LOG.debug("Ignoring conditional feature {}", feature); - return Collections.emptySet(); - } - // pax-exam's Karaf container generates a wrapper feature holding the test dependencies. Ignore it. - if ("test-dependencies".equals(feature.getName())) { - LOG.debug("Ignoring pax-exam wrapper feature {}", feature); - return Collections.emptySet(); - } - - if (!isInstalled(feature)) { - return Collections.emptySet(); - } - // FIXME Workaround for BUG-2836, features service returns null for feature: - // standard-condition-webconsole_0_0_0, 3.0.1 - if (featuresService.getFeature(feature.getName(), feature.getVersion()) == null) { - LOG.debug("Feature: {}, {} is missing from features service. Skipping", feature.getName(), - feature.getVersion()); - return Collections.emptySet(); - } - - ChildAwareFeatureWrapper wrappedFeature = new ChildAwareFeatureWrapper(feature, featuresService); - Set configs = wrappedFeature.getFeatureConfigSnapshotHolders(); - if (!configs.isEmpty()) { - configs = pushConfig(configs, feature); - feature2configs.putAll(feature, configs); - } - return configs; - } - - private boolean isInstalled(final Feature feature) throws InterruptedException { - for (int retries = 0; retries < MAX_RETRIES; retries++) { - try { - List installedFeatures = Arrays.asList(featuresService.listInstalledFeatures()); - if (installedFeatures.contains(feature)) { - return true; - } - - LOG.info("Karaf Feature Service has not yet finished installing feature {}/{} (retry {})", - feature.getName(), feature.getVersion(), retries); - } catch (final Exception e) { - LOG.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}", retries, e); - } - - TimeUnit.MILLISECONDS.sleep(RETRY_PAUSE_MILLIS); - } - LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet finished installing feature {} {}", - MAX_RETRIES, feature.getName(), feature.getVersion()); - return false; - } - - private Set pushConfig(final Set configs, - final Feature feature) throws InterruptedException { - Set configsToPush = new LinkedHashSet<>(configs); - configsToPush.removeAll(pushedConfigs); - if (!configsToPush.isEmpty()) { - - // Ignore features that are present in persisted current config - final Optional currentCfgPusher = XmlFileStorageAdapter.getInstance(); - if (currentCfgPusher.isPresent() && - currentCfgPusher.get().getPersistedFeatures().contains(feature.getId())) { - LOG.warn("Ignoring default configuration {} for feature {}, the configuration is present in {}", - configsToPush, feature.getId(), currentCfgPusher.get()); - } else { - pusher.pushConfigs(new ArrayList<>(configsToPush)); - } - - pushedConfigs.addAll(configsToPush); - } - Set configsPushed = new LinkedHashSet<>(pushedConfigs); - configsPushed.retainAll(configs); - return configsPushed; - } -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java deleted file mode 100644 index 7107cc994d..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import java.io.File; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.SortedSet; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.transform.stream.StreamSource; -import org.apache.karaf.features.ConfigFileInfo; -import org.apache.karaf.features.Feature; -import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder; -import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot; - -/* - * A ConfigSnapshotHolder that can track all the additional information - * relavent to the fact we are getting these from a Feature. - * - * Includes tracking the 'featureChain' - an reverse ordered list of the dependency - * graph of features that caused us to push this FeatureConfigSnapshotHolder. - * So if A -> B -> C, then the feature chain would be C -> B -> A - */ -public class FeatureConfigSnapshotHolder implements ConfigSnapshotHolder { - private ConfigSnapshot unmarshalled = null; - private ConfigFileInfo fileInfo = null; - private List featureChain = new ArrayList<>(); - - /* - * @param holder - FeatureConfigSnapshotHolder that we - * @param feature - new - */ - public FeatureConfigSnapshotHolder(final FeatureConfigSnapshotHolder holder, final Feature feature) throws JAXBException, XMLStreamException { - this(holder.fileInfo,holder.getFeature()); - this.featureChain.add(feature); - } - - /* - * Create a FeatureConfigSnapshotHolder for a given ConfigFileInfo and record the associated - * feature we are creating it from. - * @param fileInfo - ConfigFileInfo to read into the ConfigSnapshot - * @param feature - Feature the ConfigFileInfo was attached to - */ - public FeatureConfigSnapshotHolder(final ConfigFileInfo fileInfo, final Feature feature) throws JAXBException, XMLStreamException { - Preconditions.checkNotNull(fileInfo); - Preconditions.checkNotNull(fileInfo.getFinalname()); - Preconditions.checkNotNull(feature); - this.fileInfo = fileInfo; - this.featureChain.add(feature); - // TODO extract utility method for umarshalling config snapshots - JAXBContext jaxbContext = JAXBContext.newInstance(ConfigSnapshot.class); - Unmarshaller um = jaxbContext.createUnmarshaller(); - XMLInputFactory xif = XMLInputFactory.newFactory(); - xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); - xif.setProperty(XMLInputFactory.SUPPORT_DTD, false); - - XMLStreamReader xsr = xif.createXMLStreamReader(new StreamSource(new File(fileInfo.getFinalname()))); - unmarshalled = (ConfigSnapshot) um.unmarshal(xsr); - } - /* - * (non-Javadoc) - * @see java.lang.Object#hashCode() - * - * We really care most about the underlying ConfigShapshot, so compute hashcode on that - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((unmarshalled != null && unmarshalled.getConfigSnapshot() == null) ? 0 : unmarshalled.getConfigSnapshot().hashCode()); - return result; - } - /* - * (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - * * - * We really care most about the underlying ConfigShapshot, so compute equality on that - */ - @Override - public boolean equals(final Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - FeatureConfigSnapshotHolder fcsh = (FeatureConfigSnapshotHolder)obj; - if(this.unmarshalled.getConfigSnapshot().equals(fcsh.unmarshalled.getConfigSnapshot())) { - return true; - } - return false; - } - - @Override - public String toString() { - StringBuilder b = new StringBuilder(); - Path p = Paths.get(fileInfo.getFinalname()); - b.append(p.getFileName()) - .append("(") - .append(getCauseFeature()) - .append(",") - .append(getFeature()) - .append(")"); - return b.toString(); - } - - @Override - public String getConfigSnapshot() { - return unmarshalled.getConfigSnapshot(); - } - - @Override - public SortedSet getCapabilities() { - return unmarshalled.getCapabilities(); - } - - public ConfigFileInfo getFileInfo() { - return fileInfo; - } - - /* - * @returns The original feature to which the ConfigFileInfo was attached - * Example: - * A -> B -> C, ConfigFileInfo Foo is attached to C. - * feature:install A - * thus C is the 'Feature' Foo was attached. - */ - public Feature getFeature() { - return featureChain.get(0); - } - - /* - * @return The dependency chain of the features that caused the ConfigFileInfo to be pushed in reverse order. - * Example: - * A -> B -> C, ConfigFileInfo Foo is attached to C. - * The returned list is - * [C,B,A] - */ - public ImmutableList getFeatureChain() { - return ImmutableList.copyOf(Lists.reverse(featureChain)); - } - - /* - * @return The feature the installation of which was the root cause - * of this pushing of the ConfigFileInfo. - * Example: - * A -> B -> C, ConfigFileInfo Foo is attached to C. - * feature:install A - * this A is the 'Cause' of the installation of Foo. - */ - public Feature getCauseFeature() { - return Iterables.getLast(featureChain); - } -} diff --git a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java deleted file mode 100644 index 68ae3d31cb..0000000000 --- a/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.configpusherfeature.internal; - -import com.google.common.base.Optional; -import com.google.common.collect.Sets; - -import java.util.Set; - -import org.apache.karaf.features.Feature; -import org.apache.karaf.features.FeaturesListener; -import org.apache.karaf.features.FeaturesService; -import org.opendaylight.controller.config.persist.api.ConfigPusher; -import org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.ServiceRegistration; -import org.osgi.util.tracker.ServiceTrackerCustomizer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class FeatureServiceCustomizer implements ServiceTrackerCustomizer, AutoCloseable { - private static final Logger LOG = LoggerFactory.getLogger(FeatureServiceCustomizer.class); - private ConfigPusher configPusher = null; - private ServiceRegistration registration; - - FeatureServiceCustomizer(final ConfigPusher c) { - configPusher = c; - } - - @Override - public FeaturesService addingService(final ServiceReference reference) { - BundleContext bc = reference.getBundle().getBundleContext(); - final FeaturesService featureService = bc.getService(reference); - final Optional currentPersister = XmlFileStorageAdapter.getInstance(); - - if (XmlFileStorageAdapter.getInstance().isPresent()) { - final Set installedFeatureIds = Sets.newHashSet(); - try { - for (final Feature installedFeature : featureService.listInstalledFeatures()) { - installedFeatureIds.add(installedFeature.getId()); - } - } catch (final Exception e) { - LOG.error("Error listing installed features", e); - } - - currentPersister.get().setFeaturesService(() -> installedFeatureIds); - } - ConfigFeaturesListener configFeaturesListener = new ConfigFeaturesListener(configPusher, featureService); - registration = bc.registerService(FeaturesListener.class.getCanonicalName(), configFeaturesListener, null); - return featureService; - } - - @Override - public void modifiedService(final ServiceReference reference, - final FeaturesService service) { - // we don't care if the properties change - } - - @Override - public void removedService(final ServiceReference reference, - final FeaturesService service) { - close(); - } - - @Override - public void close() { - if (registration != null) { - registration.unregister(); - registration = null; - } - } -} diff --git a/opendaylight/config/pom.xml b/opendaylight/config/pom.xml index 238065596e..dc650d8560 100644 --- a/opendaylight/config/pom.xml +++ b/opendaylight/config/pom.xml @@ -23,7 +23,6 @@ config-persister-api config-persister-file-xml-adapter config-persister-feature-adapter - config-persister-feature4-adapter config-manager-facade-xml yang-jmx-generator yang-jmx-generator-plugin diff --git a/opendaylight/md-sal/benchmark-data-store/pom.xml b/opendaylight/md-sal/benchmark-data-store/pom.xml index 5a94e5855d..8345bdc0db 100644 --- a/opendaylight/md-sal/benchmark-data-store/pom.xml +++ b/opendaylight/md-sal/benchmark-data-store/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/cds-access-api/pom.xml b/opendaylight/md-sal/cds-access-api/pom.xml index 92f8e5ea23..1cd5d2e076 100644 --- a/opendaylight/md-sal/cds-access-api/pom.xml +++ b/opendaylight/md-sal/cds-access-api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/cds-access-client/pom.xml b/opendaylight/md-sal/cds-access-client/pom.xml index a90a7db57d..962ef8ed70 100644 --- a/opendaylight/md-sal/cds-access-client/pom.xml +++ b/opendaylight/md-sal/cds-access-client/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/cds-dom-api/pom.xml b/opendaylight/md-sal/cds-dom-api/pom.xml index 361f3e135c..97e6897048 100644 --- a/opendaylight/md-sal/cds-dom-api/pom.xml +++ b/opendaylight/md-sal/cds-dom-api/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/md-sal-config/pom.xml b/opendaylight/md-sal/md-sal-config/pom.xml index 5003595799..d4a467c8da 100644 --- a/opendaylight/md-sal/md-sal-config/pom.xml +++ b/opendaylight/md-sal/md-sal-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/mdsal-artifacts/pom.xml b/opendaylight/md-sal/mdsal-artifacts/pom.xml index 1b31edffaf..d9a30fffbb 100644 --- a/opendaylight/md-sal/mdsal-artifacts/pom.xml +++ b/opendaylight/md-sal/mdsal-artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/mdsal-it-base/pom.xml b/opendaylight/md-sal/mdsal-it-base/pom.xml index 95b23c184b..dab1caa4bf 100644 --- a/opendaylight/md-sal/mdsal-it-base/pom.xml +++ b/opendaylight/md-sal/mdsal-it-base/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 4.0.0 diff --git a/opendaylight/md-sal/mdsal-it-parent/pom.xml b/opendaylight/md-sal/mdsal-it-parent/pom.xml index a5791c399a..9ade146a9b 100644 --- a/opendaylight/md-sal/mdsal-it-parent/pom.xml +++ b/opendaylight/md-sal/mdsal-it-parent/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 4.0.0 @@ -23,7 +23,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html 1.6.0-SNAPSHOT org.opendaylight.odlparent opendaylight-karaf-empty - 1.9.0 + 2.0.0 zip false diff --git a/opendaylight/md-sal/mdsal-trace/binding-impl/pom.xml b/opendaylight/md-sal/mdsal-trace/binding-impl/pom.xml index 9bb7badba1..e00fa43530 100644 --- a/opendaylight/md-sal/mdsal-trace/binding-impl/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/binding-impl/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml index f82d97f80c..8170e0155f 100644 --- a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml @@ -1,64 +1,28 @@ - - - 4.0.0 + + org.opendaylight.odlparent + feature-repo-parent + 2.0.0 + + - - org.opendaylight.odlparent - features-parent - 1.9.0 - - - - org.opendaylight.controller - mdsal-trace-features - 1.6.0-SNAPSHOT - ${project.artifactId} - - + org.opendaylight.controller + features-mdsal-trace + 1.6.0-SNAPSHOT + OpenDaylight :: TracingBroker + feature - - - org.opendaylight.mdsal - mdsal-artifacts - 2.3.0-SNAPSHOT - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${project.version} - pom - import - + + org.opendaylight.controller + odl-mdsal-trace + ${project.version} + xml + features + - - - - - org.opendaylight.controller - features-mdsal - features - xml - - - ${project.groupId} - mdsal-trace-dom-impl - - - ${project.groupId} - mdsal-trace-binding-impl - - - ${project.groupId} - mdsal-trace-api - - diff --git a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/src/main/features/features.xml b/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/src/main/features/features.xml deleted file mode 100644 index 3eb6d7b325..0000000000 --- a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/src/main/features/features.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features - mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features - - - odl-mdsal-broker - odl-mdsal-broker-local - mvn:org.opendaylight.controller/mdsal-trace-api/{{VERSION}} - mvn:org.opendaylight.controller/mdsal-trace-dom-impl/{{VERSION}} - mvn:org.opendaylight.controller/mdsal-trace-binding-impl/{{VERSION}} - mvn:org.opendaylight.controller/mdsal-trace-api/{{VERSION}}/xml/config - - diff --git a/opendaylight/md-sal/mdsal-trace/features/features4-mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/features/features4-mdsal-trace/pom.xml deleted file mode 100644 index 55e319b161..0000000000 --- a/opendaylight/md-sal/mdsal-trace/features/features4-mdsal-trace/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - 4.0.0 - - - org.opendaylight.odlparent - feature-repo-parent - 1.9.0 - - - - org.opendaylight.controller - features4-mdsal-trace - 1.6.0-SNAPSHOT - OpenDaylight :: TracingBroker - feature - - - org.opendaylight.controller - odl-mdsal-trace - ${project.version} - xml - features - - - diff --git a/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml index 821889b751..238298a91c 100644 --- a/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml @@ -7,7 +7,7 @@ org.opendaylight.odlparent single-feature-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/features/pom.xml b/opendaylight/md-sal/mdsal-trace/features/pom.xml index 9828efdfec..d871d47198 100644 --- a/opendaylight/md-sal/mdsal-trace/features/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 @@ -24,6 +24,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL features-mdsal-trace odl-mdsal-trace - features4-mdsal-trace diff --git a/opendaylight/md-sal/mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/pom.xml index 1e8aa6b7b1..1b129a7722 100644 --- a/opendaylight/md-sal/mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/messagebus-config/pom.xml b/opendaylight/md-sal/messagebus-config/pom.xml index 55f181936f..bd281b75d2 100644 --- a/opendaylight/md-sal/messagebus-config/pom.xml +++ b/opendaylight/md-sal/messagebus-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/messagebus-util/pom.xml b/opendaylight/md-sal/messagebus-util/pom.xml index dcebde07ab..b2d90cfd17 100644 --- a/opendaylight/md-sal/messagebus-util/pom.xml +++ b/opendaylight/md-sal/messagebus-util/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index 11daedd5ca..0b1e89bc43 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-akka-raft-example/pom.xml b/opendaylight/md-sal/sal-akka-raft-example/pom.xml index c492147892..e09f2fb448 100644 --- a/opendaylight/md-sal/sal-akka-raft-example/pom.xml +++ b/opendaylight/md-sal/sal-akka-raft-example/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-akka-raft/pom.xml b/opendaylight/md-sal/sal-akka-raft/pom.xml index 23f37bfe14..62e2c24f52 100644 --- a/opendaylight/md-sal/sal-akka-raft/pom.xml +++ b/opendaylight/md-sal/sal-akka-raft/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-binding-api/pom.xml b/opendaylight/md-sal/sal-binding-api/pom.xml index aa6c5b8373..2330f612d4 100644 --- a/opendaylight/md-sal/sal-binding-api/pom.xml +++ b/opendaylight/md-sal/sal-binding-api/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-binding-broker/pom.xml b/opendaylight/md-sal/sal-binding-broker/pom.xml index 4c83b95dbb..1085705e84 100644 --- a/opendaylight/md-sal/sal-binding-broker/pom.xml +++ b/opendaylight/md-sal/sal-binding-broker/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-binding-dom-it/pom.xml b/opendaylight/md-sal/sal-binding-dom-it/pom.xml index 9ee450dde4..c188fddaf4 100644 --- a/opendaylight/md-sal/sal-binding-dom-it/pom.xml +++ b/opendaylight/md-sal/sal-binding-dom-it/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-binding-util/pom.xml b/opendaylight/md-sal/sal-binding-util/pom.xml index 5f0dc08379..2211fbca60 100644 --- a/opendaylight/md-sal/sal-binding-util/pom.xml +++ b/opendaylight/md-sal/sal-binding-util/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-clustering-config/pom.xml b/opendaylight/md-sal/sal-clustering-config/pom.xml index 6db9ec25c2..f9a5f9ba54 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 - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-common-impl/pom.xml b/opendaylight/md-sal/sal-common-impl/pom.xml index 065b52cba4..474d55c985 100644 --- a/opendaylight/md-sal/sal-common-impl/pom.xml +++ b/opendaylight/md-sal/sal-common-impl/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/service/AbstractDataTransaction.java b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/service/AbstractDataTransaction.java index b9df496e3a..9b0dbb0f97 100644 --- a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/service/AbstractDataTransaction.java +++ b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/service/AbstractDataTransaction.java @@ -7,7 +7,6 @@ */ package org.opendaylight.controller.md.sal.common.impl.service; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -25,6 +24,6 @@ public abstract class AbstractDataTransaction { Futures.immediateFuture(RpcResultBuilder.success(TransactionStatus.COMMITED).build()); public static ListenableFuture> convertToLegacyCommitFuture(final CheckedFuture from) { - return Futures.transform(from, (AsyncFunction>) input -> SUCCESS_FUTURE); + return Futures.transformAsync(from, input -> SUCCESS_FUTURE); } } diff --git a/opendaylight/md-sal/sal-common-testutil/pom.xml b/opendaylight/md-sal/sal-common-testutil/pom.xml index b3208cd19b..6f98628498 100644 --- a/opendaylight/md-sal/sal-common-testutil/pom.xml +++ b/opendaylight/md-sal/sal-common-testutil/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-common-util/pom.xml b/opendaylight/md-sal/sal-common-util/pom.xml index 790ad7e740..674a944620 100644 --- a/opendaylight/md-sal/sal-common-util/pom.xml +++ b/opendaylight/md-sal/sal-common-util/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-connector-api/pom.xml b/opendaylight/md-sal/sal-connector-api/pom.xml index dfaa0f8642..5779db693b 100644 --- a/opendaylight/md-sal/sal-connector-api/pom.xml +++ b/opendaylight/md-sal/sal-connector-api/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java index 1277854100..a2a2bfca08 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DebugThreePhaseCommitCohort.java @@ -12,6 +12,7 @@ import com.google.common.base.Preconditions; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import java.util.List; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.slf4j.Logger; @@ -32,26 +33,26 @@ class DebugThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort private final TransactionIdentifier transactionId; private Logger log = LOG; - DebugThreePhaseCommitCohort(TransactionIdentifier transactionId, AbstractThreePhaseCommitCohort delegate, - Throwable debugContext) { + DebugThreePhaseCommitCohort(final TransactionIdentifier transactionId, + final AbstractThreePhaseCommitCohort delegate, final Throwable debugContext) { this.delegate = Preconditions.checkNotNull(delegate); this.debugContext = Preconditions.checkNotNull(debugContext); this.transactionId = Preconditions.checkNotNull(transactionId); } - private ListenableFuture addFutureCallback(ListenableFuture future) { + private ListenableFuture addFutureCallback(final ListenableFuture future) { Futures.addCallback(future, new FutureCallback() { @Override - public void onSuccess(V result) { + public void onSuccess(final V result) { // no-op } @Override - public void onFailure(Throwable failure) { + public void onFailure(final Throwable failure) { log.warn("Transaction {} failed with error \"{}\" - was allocated in the following context", transactionId, failure, debugContext); } - }); + }, MoreExecutors.directExecutor()); return future; } @@ -83,7 +84,7 @@ class DebugThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort } @VisibleForTesting - void setLogger(Logger log) { + void setLogger(final Logger log) { this.log = log; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java index 76bafb75d3..9fad1f1016 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionContext.java @@ -11,6 +11,7 @@ import akka.actor.ActorSelection; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.datastore.messages.AbstractRead; @@ -31,8 +32,8 @@ abstract class LocalTransactionContext extends AbstractTransactionContext { private final LocalTransactionReadySupport readySupport; private Exception operationError; - LocalTransactionContext(DOMStoreTransaction txDelegate, TransactionIdentifier identifier, - LocalTransactionReadySupport readySupport) { + LocalTransactionContext(final DOMStoreTransaction txDelegate, final TransactionIdentifier identifier, + final LocalTransactionReadySupport readySupport) { super(identifier); this.txDelegate = Preconditions.checkNotNull(txDelegate); this.readySupport = readySupport; @@ -44,7 +45,7 @@ abstract class LocalTransactionContext extends AbstractTransactionContext { @Override @SuppressWarnings("checkstyle:IllegalCatch") - public void executeModification(AbstractModification modification) { + public void executeModification(final AbstractModification modification) { incrementModificationCount(); if (operationError == null) { try { @@ -56,7 +57,7 @@ abstract class LocalTransactionContext extends AbstractTransactionContext { } @Override - public void executeRead(AbstractRead readCmd, final SettableFuture proxyFuture) { + public void executeRead(final AbstractRead readCmd, final SettableFuture proxyFuture) { Futures.addCallback(readCmd.apply(getReadDelegate()), new FutureCallback() { @Override public void onSuccess(final T result) { @@ -67,7 +68,7 @@ abstract class LocalTransactionContext extends AbstractTransactionContext { public void onFailure(final Throwable failure) { proxyFuture.setException(failure); } - }); + }, MoreExecutors.directExecutor()); } private LocalThreePhaseCommitCohort ready() { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java index 405eb0f95b..f91da9ade3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java @@ -17,6 +17,7 @@ import com.google.common.collect.Iterables; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import java.util.ArrayList; import java.util.Collection; @@ -80,7 +81,8 @@ public class TransactionProxy extends AbstractDOMStoreTransaction CheckedFuture executeRead(String shardName, final AbstractRead readCmd) { + private CheckedFuture executeRead(final String shardName, + final AbstractRead readCmd) { Preconditions.checkState(type != TransactionType.WRITE_ONLY, "Reads from write-only transactions are not allowed"); @@ -90,7 +92,7 @@ public class TransactionProxy extends AbstractDOMStoreTransaction getDirectCommitFuture(TransactionContext transactionContext, - OperationCallback.Reference operationCallbackRef) { + private Future getDirectCommitFuture(final TransactionContext transactionContext, + final OperationCallback.Reference operationCallbackRef) { TransactionRateLimitingCallback rateLimitingCallback = new TransactionRateLimitingCallback( txContextFactory.getActorContext()); operationCallbackRef.set(rateLimitingCallback); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java index 0342a13517..2342e5eeb9 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/PrefixedShardConfigWriter.java @@ -11,6 +11,7 @@ package org.opendaylight.controller.cluster.sharding; import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import java.util.Collection; import java.util.concurrent.ExecutionException; import org.opendaylight.controller.cluster.access.concepts.MemberName; @@ -100,8 +101,9 @@ class PrefixedShardConfigWriter { final AsyncFunction validateFunction = input -> cohort.preCommit(); final AsyncFunction prepareFunction = input -> cohort.commit(); - final ListenableFuture prepareFuture = Futures.transform(cohort.canCommit(), validateFunction); - return Futures.transform(prepareFuture, prepareFunction); + final ListenableFuture prepareFuture = Futures.transformAsync(cohort.canCommit(), validateFunction, + MoreExecutors.directExecutor()); + return Futures.transformAsync(prepareFuture, prepareFunction, MoreExecutors.directExecutor()); } boolean checkDefaultIsPresent() { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardProxyTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardProxyTransaction.java index d08b47ba46..52630eb4ba 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardProxyTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardProxyTransaction.java @@ -14,6 +14,7 @@ import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import java.util.ArrayList; import java.util.Collection; @@ -129,9 +130,10 @@ class ShardProxyTransaction implements DOMDataTreeShardWriteTransaction { final AsyncFunction prepareFunction = input -> commit(); // transform validate into prepare - final ListenableFuture prepareFuture = Futures.transform(validate(), validateFunction); + final ListenableFuture prepareFuture = Futures.transformAsync(validate(), validateFunction, + MoreExecutors.directExecutor()); // transform prepare into commit and return as submit result - return Futures.transform(prepareFuture, prepareFunction); + return Futures.transformAsync(prepareFuture, prepareFunction, MoreExecutors.directExecutor()); } @Override @@ -153,7 +155,7 @@ class ShardProxyTransaction implements DOMDataTreeShardWriteTransaction { public void onFailure(final Throwable throwable) { ret.setException(throwable); } - }); + }, MoreExecutors.directExecutor()); return ret; } @@ -177,7 +179,7 @@ class ShardProxyTransaction implements DOMDataTreeShardWriteTransaction { public void onFailure(final Throwable throwable) { ret.setException(throwable); } - }); + }, MoreExecutors.directExecutor()); return ret; } @@ -201,7 +203,7 @@ class ShardProxyTransaction implements DOMDataTreeShardWriteTransaction { public void onFailure(final Throwable throwable) { ret.setException(throwable); } - }); + }, MoreExecutors.directExecutor()); return ret; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadTransactionTest.java index fcba12bdd7..8333b4875e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ClientBackedReadTransactionTest.java @@ -8,8 +8,8 @@ package org.opendaylight.controller.cluster.databroker; import com.google.common.base.Optional; -import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -18,7 +18,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.opendaylight.controller.cluster.access.client.ClientActorContext; import org.opendaylight.controller.cluster.databroker.actors.dds.ClientSnapshot; -import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -54,7 +53,7 @@ public class ClientBackedReadTransactionTest extends ClientBackedTransactionTest @Test public void testRead() throws Exception { - final CheckedFuture>, ReadFailedException> result = object().read( + final ListenableFuture>> result = object().read( YangInstanceIdentifier.EMPTY); final Optional> resultData = result.get(); Assert.assertTrue(resultData.isPresent()); @@ -63,7 +62,7 @@ public class ClientBackedReadTransactionTest extends ClientBackedTransactionTest @Test public void testExists() throws Exception { - final CheckedFuture result = object().exists(YangInstanceIdentifier.EMPTY); + final ListenableFuture result = object().exists(YangInstanceIdentifier.EMPTY); Assert.assertTrue(result.get()); } } \ No newline at end of file diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBrokerTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBrokerTest.java index bef18ffe20..8335fcdc3c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBrokerTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBrokerTest.java @@ -136,8 +136,7 @@ public class ConcurrentDOMDataBrokerTest { doReturn(Futures.immediateFuture(null)).when(mockCohort2).preCommit(); doReturn(Futures.immediateFuture(null)).when(mockCohort2).commit(); - CheckedFuture future = coordinator.submit( - transaction, Arrays.asList(mockCohort1, mockCohort2)); + ListenableFuture future = coordinator.submit(transaction, Arrays.asList(mockCohort1, mockCohort2)); final CountDownLatch doneLatch = new CountDownLatch(1); final AtomicReference caughtEx = new AtomicReference<>(); @@ -152,7 +151,7 @@ public class ConcurrentDOMDataBrokerTest { caughtEx.set(failure); doneLatch.countDown(); } - }); + }, MoreExecutors.directExecutor()); asyncCanCommitContinue.countDown(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientSnapshotTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientSnapshotTest.java index 709335cf53..d9b1e8efab 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientSnapshotTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/ClientSnapshotTest.java @@ -12,11 +12,10 @@ import static org.mockito.Mockito.when; import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.getWithTimeout; import com.google.common.base.Optional; -import com.google.common.util.concurrent.CheckedFuture; +import com.google.common.util.concurrent.ListenableFuture; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.opendaylight.mdsal.common.api.ReadFailedException; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -43,14 +42,14 @@ public class ClientSnapshotTest extends AbstractClientHandleTest @Test public void testExists() throws Exception { - final CheckedFuture exists = getHandle().exists(PATH); + final ListenableFuture exists = getHandle().exists(PATH); verify(getDataTreeSnapshot()).readNode(PATH); Assert.assertFalse(getWithTimeout(exists)); } @Test public void testRead() throws Exception { - final CheckedFuture>, ReadFailedException> exists = getHandle().read(PATH); + final ListenableFuture>> exists = getHandle().read(PATH); verify(getDataTreeSnapshot()).readNode(PATH); Assert.assertFalse(getWithTimeout(exists).isPresent()); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java index 1b9ea169b8..a80a0515fb 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java @@ -395,7 +395,7 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest { cause = e.getCause(); } - Throwables.propagateIfInstanceOf(cause, Exception.class); + Throwables.throwIfInstanceOf(cause, Exception.class); Throwables.propagate(cause); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 86a78a701f..3eb84bde13 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -810,7 +810,7 @@ public class ShardTest extends AbstractShardTest { final Failure failure = expectMsgClass(duration("5 seconds"), akka.actor.Status.Failure.class); if (failure != null) { - Throwables.propagateIfInstanceOf(failure.cause(), Exception.class); + Throwables.throwIfInstanceOf(failure.cause(), Exception.class); Throwables.propagate(failure.cause()); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java index 5ab1e5ade3..ca804fdeee 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java @@ -34,6 +34,7 @@ import com.google.common.base.Throwables; import com.google.common.collect.Sets; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.FutureCallback; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.Uninterruptibles; import java.util.Collection; import java.util.List; @@ -138,7 +139,8 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { propagateReadFailedExceptionCause(transactionProxy.read(TestModel.TEST_PATH)); } - private void testExceptionOnInitialCreateTransaction(Exception exToThrow, Invoker invoker) throws Exception { + private void testExceptionOnInitialCreateTransaction(final Exception exToThrow, final Invoker invoker) + throws Exception { ActorRef actorRef = getSystem().actorOf(Props.create(DoNothingActor.class)); if (exToThrow instanceof PrimaryNotFoundException) { @@ -156,7 +158,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { propagateReadFailedExceptionCause(invoker.invoke(transactionProxy)); } - private void testReadWithExceptionOnInitialCreateTransaction(Exception exToThrow) throws Exception { + private void testReadWithExceptionOnInitialCreateTransaction(final Exception exToThrow) throws Exception { testExceptionOnInitialCreateTransaction(exToThrow, proxy -> proxy.read(TestModel.TEST_PATH)); } @@ -355,7 +357,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { com.google.common.util.concurrent.Futures.addCallback(transactionProxy.read(TestModel.TEST_PATH), new FutureCallback>>() { @Override - public void onSuccess(Optional> result) { + public void onSuccess(final Optional> result) { try { transactionProxy.write(TestModel.TEST_PATH, nodeToWrite); } catch (Exception e) { @@ -366,11 +368,11 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } @Override - public void onFailure(Throwable failure) { + public void onFailure(final Throwable failure) { caughtEx.set(failure); readComplete.countDown(); } - }); + }, MoreExecutors.directExecutor()); createTxPromise.success(createTransactionReply(actorRef, DataStoreVersions.CURRENT_VERSION)); @@ -682,7 +684,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { verifyCohortFutures((SingleCommitCohortProxy)ready, RuntimeException.class); } - private void testWriteOnlyTxWithFindPrimaryShardFailure(Exception toThrow) throws Exception { + private void testWriteOnlyTxWithFindPrimaryShardFailure(final Exception toThrow) throws Exception { doReturn(Futures.failed(toThrow)).when(mockActorContext).findPrimaryShardAsync(anyString()); TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, WRITE_ONLY); @@ -773,26 +775,27 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { void run(TransactionProxy transactionProxy); } - private PrimaryShardInfo newPrimaryShardInfo(ActorRef actorRef) { + private PrimaryShardInfo newPrimaryShardInfo(final ActorRef actorRef) { return new PrimaryShardInfo(getSystem().actorSelection(actorRef.path()), DataStoreVersions.CURRENT_VERSION); } - private PrimaryShardInfo newPrimaryShardInfo(ActorRef actorRef, DataTree dataTree) { + private PrimaryShardInfo newPrimaryShardInfo(final ActorRef actorRef, final DataTree dataTree) { return new PrimaryShardInfo(getSystem().actorSelection(actorRef.path()), DataStoreVersions.CURRENT_VERSION, dataTree); } - private void throttleOperation(TransactionProxyOperation operation) { + private void throttleOperation(final TransactionProxyOperation operation) { throttleOperation(operation, 1, true); } - private void throttleOperation(TransactionProxyOperation operation, int outstandingOpsLimit, boolean shardFound) { + private void throttleOperation(final TransactionProxyOperation operation, final int outstandingOpsLimit, + final boolean shardFound) { throttleOperation(operation, outstandingOpsLimit, shardFound, TimeUnit.MILLISECONDS.toNanos( mockActorContext.getDatastoreContext().getOperationTimeoutInMillis())); } - private void throttleOperation(TransactionProxyOperation operation, int outstandingOpsLimit, boolean shardFound, - long expectedCompletionTime) { + private void throttleOperation(final TransactionProxyOperation operation, final int outstandingOpsLimit, + final boolean shardFound, final long expectedCompletionTime) { ActorSystem actorSystem = getSystem(); ActorRef shardActorRef = actorSystem.actorOf(Props.create(DoNothingActor.class)); @@ -834,11 +837,11 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } - private void completeOperation(TransactionProxyOperation operation) { + private void completeOperation(final TransactionProxyOperation operation) { completeOperation(operation, true); } - private void completeOperation(TransactionProxyOperation operation, boolean shardFound) { + private void completeOperation(final TransactionProxyOperation operation, final boolean shardFound) { ActorSystem actorSystem = getSystem(); ActorRef shardActorRef = actorSystem.actorOf(Props.create(DoNothingActor.class)); @@ -878,7 +881,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expected, end - start), end - start <= expected); } - private void completeOperationLocal(TransactionProxyOperation operation, DataTree dataTree) { + private void completeOperationLocal(final TransactionProxyOperation operation, final DataTree dataTree) { ActorSystem actorSystem = getSystem(); ActorRef shardActorRef = actorSystem.actorOf(Props.create(DoNothingActor.class)); @@ -913,7 +916,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { return dataTree; } - private static DataTree createDataTree(NormalizedNode readResponse) { + private static DataTree createDataTree(final NormalizedNode readResponse) { DataTree dataTree = mock(DataTree.class); DataTreeSnapshot dataTreeSnapshot = mock(DataTreeSnapshot.class); DataTreeModification dataTreeModification = mock(DataTreeModification.class); @@ -1238,7 +1241,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { .getOperationTimeoutInMillis()) * 2); } - private void testModificationOperationBatching(TransactionType type) throws Exception { + private void testModificationOperationBatching(final TransactionType type) throws Exception { int shardBatchedModificationCount = 3; dataStoreContextBuilder.shardBatchedModificationCount(shardBatchedModificationCount); @@ -1448,7 +1451,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } - private void setUpReadData(String shardName, NormalizedNode expectedNode) { + private void setUpReadData(final String shardName, final NormalizedNode expectedNode) { ActorSystem actorSystem = getSystem(); ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class)); diff --git a/opendaylight/md-sal/sal-dom-api/pom.xml b/opendaylight/md-sal/sal-dom-api/pom.xml index fddc0677a6..435536fe1f 100644 --- a/opendaylight/md-sal/sal-dom-api/pom.xml +++ b/opendaylight/md-sal/sal-dom-api/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-dom-broker/pom.xml b/opendaylight/md-sal/sal-dom-broker/pom.xml index c0ba23a689..42a57ab994 100644 --- a/opendaylight/md-sal/sal-dom-broker/pom.xml +++ b/opendaylight/md-sal/sal-dom-broker/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java index bd8643bd57..be27ddac52 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java @@ -16,11 +16,11 @@ import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import java.util.Map; import java.util.Queue; @@ -116,7 +116,7 @@ class ShardedDOMDataBrokerDelegatingReadWriteTransaction implements DOMDataReadW @Override public ListenableFuture> commit() { - return Futures.transform(submit(), (AsyncFunction>) input -> SUCCESS_FUTURE); + return Futures.transformAsync(submit(), input -> SUCCESS_FUTURE, MoreExecutors.directExecutor()); } @Override @@ -140,7 +140,7 @@ class ShardedDOMDataBrokerDelegatingReadWriteTransaction implements DOMDataReadW public void onFailure(final Throwable t) { readResult.setException(t); } - }); + }, MoreExecutors.directExecutor()); return Futures.makeChecked(readResult, ReadFailedException.MAPPER); } diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingWriteTransaction.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingWriteTransaction.java index b5191dd8a7..7a45c83445 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingWriteTransaction.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingWriteTransaction.java @@ -10,7 +10,6 @@ package org.opendaylight.controller.md.sal.dom.broker.impl.legacy.sharded.adapte import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -64,7 +63,7 @@ class ShardedDOMDataBrokerDelegatingWriteTransaction implements DOMDataWriteTran @Override public ListenableFuture> commit() { - return Futures.transform(submit(), (AsyncFunction>) input -> SUCCESS_FUTURE); + return Futures.transformAsync(submit(), input -> SUCCESS_FUTURE); } @Override diff --git a/opendaylight/md-sal/sal-dom-spi/pom.xml b/opendaylight/md-sal/sal-dom-spi/pom.xml index 966c906c66..5c19c4add0 100644 --- a/opendaylight/md-sal/sal-dom-spi/pom.xml +++ b/opendaylight/md-sal/sal-dom-spi/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml index 63b7ec3af5..7f85cb0bee 100644 --- a/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-dummy-distributed-datastore/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml index 41991804d8..a77ba4c43f 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml +++ b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcInvoker.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcInvoker.java index 7bb4b932d6..4c3ad7ef92 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcInvoker.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcInvoker.java @@ -12,11 +12,11 @@ import akka.actor.ActorRef; import akka.actor.Props; import com.google.common.base.Preconditions; import com.google.common.base.Throwables; -import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; import org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor; -import org.opendaylight.controller.md.sal.dom.api.DOMRpcException; import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult; import org.opendaylight.controller.md.sal.dom.api.DOMRpcService; import org.opendaylight.controller.remote.rpc.messages.ExecuteRpc; @@ -56,7 +56,7 @@ final class RpcInvoker extends AbstractUntypedActor { final ActorRef sender = getSender(); final ActorRef self = self(); - final CheckedFuture future; + final ListenableFuture future; try { future = rpcService.invokeRpc(schemaPath, msg.getInputNormalizedNode()); } catch (final RuntimeException e) { @@ -93,6 +93,6 @@ final class RpcInvoker extends AbstractUntypedActor { msg.getRpc(), Throwables.getRootCause(failure)); sender.tell(new akka.actor.Status.Failure(failure), self); } - }); + }, MoreExecutors.directExecutor()); } } diff --git a/opendaylight/md-sal/sal-schema-service/pom.xml b/opendaylight/md-sal/sal-schema-service/pom.xml index dcd520def7..31b6741cfe 100644 --- a/opendaylight/md-sal/sal-schema-service/pom.xml +++ b/opendaylight/md-sal/sal-schema-service/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/samples/toaster-consumer/pom.xml b/opendaylight/md-sal/samples/toaster-consumer/pom.xml index c8776839d7..0933b0249f 100644 --- a/opendaylight/md-sal/samples/toaster-consumer/pom.xml +++ b/opendaylight/md-sal/samples/toaster-consumer/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent bundle-parent - 1.9.0 + 2.0.0 diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java index 0583368c20..1899afb707 100644 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java +++ b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java @@ -10,7 +10,6 @@ package org.opendaylight.controller.sample.kitchen.impl; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.JdkFutureAdapters; import com.google.common.util.concurrent.ListenableFuture; @@ -73,23 +72,22 @@ public class KitchenServiceImpl extends AbstractMXBean // Then transform the RpcResults into 1. - return Futures.transform(combinedFutures, - (AsyncFunction>, RpcResult>) results -> { - boolean atLeastOneSucceeded = false; - Builder errorList = ImmutableList.builder(); - for (RpcResult result : results) { - if (result.isSuccessful()) { - atLeastOneSucceeded = true; - } - - if (result.getErrors() != null) { - errorList.addAll(result.getErrors()); - } + return Futures.transformAsync(combinedFutures, results -> { + boolean atLeastOneSucceeded = false; + Builder errorList = ImmutableList.builder(); + for (RpcResult result : results) { + if (result.isSuccessful()) { + atLeastOneSucceeded = true; } - return Futures.immediateFuture(RpcResultBuilder.status(atLeastOneSucceeded) - .withRpcErrors(errorList.build()).build()); - }); + if (result.getErrors() != null) { + errorList.addAll(result.getErrors()); + } + } + + return Futures.immediateFuture(RpcResultBuilder.status(atLeastOneSucceeded) + .withRpcErrors(errorList.build()).build()); + }); } private ListenableFuture> makeEggs(EggsType eggsType) { diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java index e475c320d1..4078409a68 100644 --- a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java +++ b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java @@ -16,7 +16,6 @@ import static org.opendaylight.yangtools.yang.common.RpcError.ErrorType.APPLICAT import com.google.common.base.Function; import com.google.common.base.Optional; import com.google.common.base.Preconditions; -import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -229,7 +228,7 @@ public class OpendaylightToaster extends AbstractMXBean ListenableFuture> readFuture = tx.read(OPERATIONAL, TOASTER_IID); final ListenableFuture commitFuture = - Futures.transform(readFuture, (AsyncFunction, Void>) toasterData -> { + Futures.transformAsync(readFuture, toasterData -> { ToasterStatus toasterStatus = ToasterStatus.Up; if (toasterData.isPresent()) { toasterStatus = toasterData.get().getToasterStatus(); diff --git a/pom.xml b/pom.xml index b841648a57..20858821d2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 1.9.0 + 2.0.0 org.opendaylight.controller -- 2.36.6