From 3354f45e32faaab5452f95f9931274a3580de912 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Thu, 19 Jan 2017 15:19:17 +0100 Subject: [PATCH] Add Karaf 4 features This moves the Karaf 3 features and adds matching Karaf 4 features for all the controller features. Blueprint is upgraded to match the version used in Karaf 4. Bug: 7526 Change-Id: Ie41cd727942ad2083ef0ca33e03f0d08003c546d Signed-off-by: Stephen Kitt --- .../features-mdsal-benchmark/pom.xml | 107 +++++ .../src/main/features/features.xml | 0 .../features4-mdsal-benchmark/pom.xml | 57 +++ features/benchmark/odl-benchmark-api/pom.xml | 42 ++ features/benchmark/odl-dsbenchmark/pom.xml | 58 +++ .../src/main/feature/feature.xml | 15 + .../benchmark/odl-mdsal-benchmark/pom.xml | 91 ++++ .../src/main/feature/feature.xml | 21 + features/benchmark/odl-ntfbenchmark/pom.xml | 59 +++ .../src/main/feature/feature.xml | 15 + features/benchmark/pom.xml | 120 +----- .../features-config-netty/pom.xml | 77 ++++ .../src/main/features/features.xml | 0 .../features4-config-netty/pom.xml | 36 ++ .../config-netty/odl-config-netty/pom.xml | 89 ++++ .../src/main/feature/feature.xml | 15 + features/config-netty/pom.xml | 101 ++--- .../features-config-persister/pom.xml | 108 +++++ .../src/main/features/features.xml | 0 .../features4-config-persister/pom.xml | 57 +++ .../odl-config-manager-facade-xml/pom.xml | 43 ++ .../odl-config-persister-all/pom.xml | 45 ++ .../odl-config-persister/pom.xml | 127 ++++++ .../odl-config-startup/pom.xml | 38 ++ features/config-persister/pom.xml | 135 ++---- features/config/features-config/pom.xml | 151 +++++++ .../src/main/features/features.xml | 0 features/config/features4-config/pom.xml | 64 +++ features/config/odl-config-all/pom.xml | 57 +++ features/config/odl-config-api/pom.xml | 41 ++ features/config/odl-config-core/pom.xml | 89 ++++ features/config/odl-config-manager/pom.xml | 41 ++ .../odl-config-netty-config-api/pom.xml | 48 +++ features/config/pom.xml | 183 ++------ features/extras/features-extras/pom.xml | 45 ++ .../src/main/features/features.xml | 0 features/extras/features4-extras/pom.xml | 43 ++ features/extras/odl-extras-all/pom.xml | 38 ++ features/extras/odl-jolokia/pom.xml | 39 ++ .../odl-jolokia/src/main/feature/feature.xml | 7 + features/extras/pom.xml | 36 +- features/mdsal/features-mdsal/pom.xml | 367 ++++++++++++++++ .../src/main/features/features.xml | 0 features/mdsal/features4-mdsal/pom.xml | 112 +++++ .../mdsal/odl-clustering-test-app/pom.xml | 53 +++ features/mdsal/odl-mdsal-all/pom.xml | 64 +++ features/mdsal/odl-mdsal-broker-local/pom.xml | 216 ++++++++++ .../src/main/feature/feature.xml | 17 + features/mdsal/odl-mdsal-broker/pom.xml | 111 +++++ .../src/main/feature/feature.xml | 33 ++ .../odl-mdsal-clustering-commons/pom.xml | 80 ++++ features/mdsal/odl-mdsal-clustering/pom.xml | 36 ++ features/mdsal/odl-mdsal-common/pom.xml | 71 +++ .../odl-mdsal-distributed-datastore/pom.xml | 72 ++++ .../odl-mdsal-remoterpc-connector/pom.xml | 54 +++ features/mdsal/odl-mdsal-xsql/pom.xml | 59 +++ .../src/main/feature/feature.xml | 15 + .../mdsal/odl-message-bus-collector/pom.xml | 82 ++++ .../src/main/feature/feature.xml | 15 + features/mdsal/odl-toaster/pom.xml | 66 +++ features/mdsal/pom.xml | 407 ++---------------- .../features-protocol-framework/pom.xml | 47 ++ .../src/main/features/features.xml | 0 .../features4-protocol-framework/pom.xml | 36 ++ .../odl-protocol-framework/pom.xml | 50 +++ features/protocol-framework/pom.xml | 73 ++-- opendaylight/blueprint/pom.xml | 6 + opendaylight/config/config-artifacts/pom.xml | 69 +++ .../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 | 138 ++++++ .../internal/FeatureConfigSnapshotHolder.java | 173 ++++++++ .../internal/FeatureServiceCustomizer.java | 84 ++++ opendaylight/config/pom.xml | 1 + opendaylight/md-sal/mdsal-artifacts/pom.xml | 72 ++++ opendaylight/md-sal/pom.xml | 1 + opendaylight/md-sal/sal-karaf4-xsql/pom.xml | 103 +++++ .../opendaylight/controller/xsql/xsql.java | 39 ++ .../OSGI-INF/blueprint/shell-log.xml | 12 + 84 files changed, 5003 insertions(+), 845 deletions(-) create mode 100644 features/benchmark/features-mdsal-benchmark/pom.xml rename features/benchmark/{ => features-mdsal-benchmark}/src/main/features/features.xml (100%) create mode 100644 features/benchmark/features4-mdsal-benchmark/pom.xml create mode 100644 features/benchmark/odl-benchmark-api/pom.xml create mode 100644 features/benchmark/odl-dsbenchmark/pom.xml create mode 100644 features/benchmark/odl-dsbenchmark/src/main/feature/feature.xml create mode 100644 features/benchmark/odl-mdsal-benchmark/pom.xml create mode 100644 features/benchmark/odl-mdsal-benchmark/src/main/feature/feature.xml create mode 100644 features/benchmark/odl-ntfbenchmark/pom.xml create mode 100644 features/benchmark/odl-ntfbenchmark/src/main/feature/feature.xml create mode 100644 features/config-netty/features-config-netty/pom.xml rename features/config-netty/{ => features-config-netty}/src/main/features/features.xml (100%) create mode 100644 features/config-netty/features4-config-netty/pom.xml create mode 100644 features/config-netty/odl-config-netty/pom.xml create mode 100644 features/config-netty/odl-config-netty/src/main/feature/feature.xml create mode 100644 features/config-persister/features-config-persister/pom.xml rename features/config-persister/{ => features-config-persister}/src/main/features/features.xml (100%) create mode 100644 features/config-persister/features4-config-persister/pom.xml create mode 100644 features/config-persister/odl-config-manager-facade-xml/pom.xml create mode 100644 features/config-persister/odl-config-persister-all/pom.xml create mode 100644 features/config-persister/odl-config-persister/pom.xml create mode 100644 features/config-persister/odl-config-startup/pom.xml create mode 100644 features/config/features-config/pom.xml rename features/config/{ => features-config}/src/main/features/features.xml (100%) create mode 100644 features/config/features4-config/pom.xml create mode 100644 features/config/odl-config-all/pom.xml create mode 100644 features/config/odl-config-api/pom.xml create mode 100644 features/config/odl-config-core/pom.xml create mode 100644 features/config/odl-config-manager/pom.xml create mode 100644 features/config/odl-config-netty-config-api/pom.xml create mode 100644 features/extras/features-extras/pom.xml rename features/extras/{ => features-extras}/src/main/features/features.xml (100%) create mode 100644 features/extras/features4-extras/pom.xml create mode 100644 features/extras/odl-extras-all/pom.xml create mode 100644 features/extras/odl-jolokia/pom.xml create mode 100644 features/extras/odl-jolokia/src/main/feature/feature.xml create mode 100644 features/mdsal/features-mdsal/pom.xml rename features/mdsal/{ => features-mdsal}/src/main/features/features.xml (100%) create mode 100644 features/mdsal/features4-mdsal/pom.xml create mode 100644 features/mdsal/odl-clustering-test-app/pom.xml create mode 100644 features/mdsal/odl-mdsal-all/pom.xml create mode 100644 features/mdsal/odl-mdsal-broker-local/pom.xml create mode 100644 features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml create mode 100644 features/mdsal/odl-mdsal-broker/pom.xml create mode 100644 features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml create mode 100644 features/mdsal/odl-mdsal-clustering-commons/pom.xml create mode 100644 features/mdsal/odl-mdsal-clustering/pom.xml create mode 100644 features/mdsal/odl-mdsal-common/pom.xml create mode 100644 features/mdsal/odl-mdsal-distributed-datastore/pom.xml create mode 100644 features/mdsal/odl-mdsal-remoterpc-connector/pom.xml create mode 100644 features/mdsal/odl-mdsal-xsql/pom.xml create mode 100644 features/mdsal/odl-mdsal-xsql/src/main/feature/feature.xml create mode 100644 features/mdsal/odl-message-bus-collector/pom.xml create mode 100644 features/mdsal/odl-message-bus-collector/src/main/feature/feature.xml create mode 100644 features/mdsal/odl-toaster/pom.xml create mode 100644 features/protocol-framework/features-protocol-framework/pom.xml rename features/protocol-framework/{ => features-protocol-framework}/src/main/features/features.xml (100%) create mode 100644 features/protocol-framework/features4-protocol-framework/pom.xml create mode 100644 features/protocol-framework/odl-protocol-framework/pom.xml create mode 100644 opendaylight/config/config-persister-feature4-adapter/pom.xml create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java create mode 100644 opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java create mode 100644 opendaylight/md-sal/sal-karaf4-xsql/pom.xml create mode 100644 opendaylight/md-sal/sal-karaf4-xsql/src/main/java/org/opendaylight/controller/xsql/xsql.java create mode 100644 opendaylight/md-sal/sal-karaf4-xsql/src/main/resources/OSGI-INF/blueprint/shell-log.xml diff --git a/features/benchmark/features-mdsal-benchmark/pom.xml b/features/benchmark/features-mdsal-benchmark/pom.xml new file mode 100644 index 0000000000..c9a7bb47ca --- /dev/null +++ b/features/benchmark/features-mdsal-benchmark/pom.xml @@ -0,0 +1,107 @@ + + + + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + org.opendaylight.controller + features-mdsal-benchmark + 1.3.0-SNAPSHOT + ${project.artifactId} + 4.0.0 + + 3.1.1 + + + + 1.5.0-SNAPSHOT + 2.2.0-SNAPSHOT + 0.10.0-SNAPSHOT + 1.1.0-SNAPSHOT + 04-xsql.xml + + + + + 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} + dsbenchmark + ${project.version} + xml + config + + + ${project.groupId} + ntfbenchmark + ${project.version} + + + ${project.groupId} + ntfbenchmark + ${project.version} + xml + config + + + ${project.groupId} + rpcbenchmark + ${project.version} + + + ${project.groupId} + rpcbenchmark + ${project.version} + xml + config + + + ${project.groupId} + benchmark-api + ${project.version} + + + diff --git a/features/benchmark/src/main/features/features.xml b/features/benchmark/features-mdsal-benchmark/src/main/features/features.xml similarity index 100% rename from features/benchmark/src/main/features/features.xml rename to features/benchmark/features-mdsal-benchmark/src/main/features/features.xml diff --git a/features/benchmark/features4-mdsal-benchmark/pom.xml b/features/benchmark/features4-mdsal-benchmark/pom.xml new file mode 100644 index 0000000000..2f55e85010 --- /dev/null +++ b/features/benchmark/features4-mdsal-benchmark/pom.xml @@ -0,0 +1,57 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-mdsal-benchmark + 1.3.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 new file mode 100644 index 0000000000..abbddac75e --- /dev/null +++ b/features/benchmark/odl-benchmark-api/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-benchmark-api + 1.3.0-SNAPSHOT + feature + + OpenDaylight :: Benchmark :: API + + + + org.opendaylight.mdsal.model + odl-mdsal-models + 0.10.0-SNAPSHOT + xml + features + + + ${project.groupId} + benchmark-api + ${project.version} + + + \ No newline at end of file diff --git a/features/benchmark/odl-dsbenchmark/pom.xml b/features/benchmark/odl-dsbenchmark/pom.xml new file mode 100644 index 0000000000..200ea78320 --- /dev/null +++ b/features/benchmark/odl-dsbenchmark/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-dsbenchmark + 1.3.0-SNAPSHOT + feature + + OpenDaylight :: dsbenchmark + + + + ${project.groupId} + odl-mdsal-broker + 1.5.0-SNAPSHOT + xml + features + + + ${project.groupId} + odl-benchmark-api + ${project.version} + xml + features + + + ${project.groupId} + dsbenchmark + ${project.version} + + + + ${project.groupId} + dsbenchmark + ${project.version} + xml + config + provided + + + \ No newline at end of file diff --git a/features/benchmark/odl-dsbenchmark/src/main/feature/feature.xml b/features/benchmark/odl-dsbenchmark/src/main/feature/feature.xml new file mode 100644 index 0000000000..fc4cb01cd5 --- /dev/null +++ b/features/benchmark/odl-dsbenchmark/src/main/feature/feature.xml @@ -0,0 +1,15 @@ + + + + + + mvn:org.opendaylight.controller/dsbenchmark/${project.version}/xml/config + + + diff --git a/features/benchmark/odl-mdsal-benchmark/pom.xml b/features/benchmark/odl-mdsal-benchmark/pom.xml new file mode 100644 index 0000000000..c3f22df7eb --- /dev/null +++ b/features/benchmark/odl-mdsal-benchmark/pom.xml @@ -0,0 +1,91 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-benchmark + 1.3.0-SNAPSHOT + feature + + OpenDaylight :: MD-SAL :: benchmark + + + + ${project.groupId} + odl-mdsal-broker + 1.5.0-SNAPSHOT + xml + features + + + ${project.groupId} + odl-benchmark-api + ${project.version} + xml + features + + + ${project.groupId} + benchmark-api + ${project.version} + + + ${project.groupId} + dsbenchmark + ${project.version} + + + ${project.groupId} + ntfbenchmark + ${project.version} + + + ${project.groupId} + rpcbenchmark + ${project.version} + + + + ${project.groupId} + dsbenchmark + ${project.version} + xml + config + provided + + + + ${project.groupId} + ntfbenchmark + ${project.version} + xml + config + provided + + + + ${project.groupId} + rpcbenchmark + ${project.version} + xml + config + provided + + + \ No newline at end of file diff --git a/features/benchmark/odl-mdsal-benchmark/src/main/feature/feature.xml b/features/benchmark/odl-mdsal-benchmark/src/main/feature/feature.xml new file mode 100644 index 0000000000..08b0dc0faa --- /dev/null +++ b/features/benchmark/odl-mdsal-benchmark/src/main/feature/feature.xml @@ -0,0 +1,21 @@ + + + + + + mvn:org.opendaylight.controller/dsbenchmark/${project.version}/xml/config + + + mvn:org.opendaylight.controller/ntfbenchmark/${project.version}/xml/config + + + mvn:org.opendaylight.controller/rpcbenchmark/${project.version}/xml/config + + + diff --git a/features/benchmark/odl-ntfbenchmark/pom.xml b/features/benchmark/odl-ntfbenchmark/pom.xml new file mode 100644 index 0000000000..fce655622d --- /dev/null +++ b/features/benchmark/odl-ntfbenchmark/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-ntfbenchmark + 1.3.0-SNAPSHOT + feature + + OpenDaylight :: ntfbenchmark + + + + ${project.groupId} + odl-mdsal-broker + 1.5.0-SNAPSHOT + xml + features + + + ${project.groupId} + odl-benchmark-api + ${project.version} + xml + features + + + ${project.groupId} + ntfbenchmark + ${project.version} + + + + ${project.groupId} + ntfbenchmark + ${project.version} + xml + config + provided + + + + \ No newline at end of file diff --git a/features/benchmark/odl-ntfbenchmark/src/main/feature/feature.xml b/features/benchmark/odl-ntfbenchmark/src/main/feature/feature.xml new file mode 100644 index 0000000000..ee4127b8ab --- /dev/null +++ b/features/benchmark/odl-ntfbenchmark/src/main/feature/feature.xml @@ -0,0 +1,15 @@ + + + + + + mvn:org.opendaylight.controller/ntfbenchmark/${project.version}/xml/config + + + diff --git a/features/benchmark/pom.xml b/features/benchmark/pom.xml index c9a7bb47ca..008d52ce39 100644 --- a/features/benchmark/pom.xml +++ b/features/benchmark/pom.xml @@ -5,103 +5,27 @@ 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 INTERNAL --> - - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - - org.opendaylight.controller - features-mdsal-benchmark - 1.3.0-SNAPSHOT - ${project.artifactId} - 4.0.0 - - 3.1.1 - + + 4.0.0 + + org.opendaylight.odlparent + odlparent-lite + 1.8.0-SNAPSHOT + + + org.opendaylight.controller + features-mdsal-benchmark-aggregator + 1.3.0-SNAPSHOT + pom + ${project.artifactId} - - 1.5.0-SNAPSHOT - 2.2.0-SNAPSHOT - 0.10.0-SNAPSHOT - 1.1.0-SNAPSHOT - 04-xsql.xml - - - - - 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} - dsbenchmark - ${project.version} - xml - config - - - ${project.groupId} - ntfbenchmark - ${project.version} - - - ${project.groupId} - ntfbenchmark - ${project.version} - xml - config - - - ${project.groupId} - rpcbenchmark - ${project.version} - - - ${project.groupId} - rpcbenchmark - ${project.version} - xml - config - - - ${project.groupId} - benchmark-api - ${project.version} - - + + features-mdsal-benchmark + features4-mdsal-benchmark + odl-benchmark-api + odl-dsbenchmark + odl-mdsal-benchmark + odl-ntfbenchmark + diff --git a/features/config-netty/features-config-netty/pom.xml b/features/config-netty/features-config-netty/pom.xml new file mode 100644 index 0000000000..9497487be7 --- /dev/null +++ b/features/config-netty/features-config-netty/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-config-netty + 0.6.0-SNAPSHOT + jar + + + 0.6.0-SNAPSHOT + etc/opendaylight/karaf + 00-netty.xml + + + + + + org.opendaylight.controller + config-artifacts + ${config.version} + import + pom + + + + + + + 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/src/main/features/features.xml b/features/config-netty/features-config-netty/src/main/features/features.xml similarity index 100% rename from features/config-netty/src/main/features/features.xml rename to features/config-netty/features-config-netty/src/main/features/features.xml diff --git a/features/config-netty/features4-config-netty/pom.xml b/features/config-netty/features4-config-netty/pom.xml new file mode 100644 index 0000000000..34a2d509e3 --- /dev/null +++ b/features/config-netty/features4-config-netty/pom.xml @@ -0,0 +1,36 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-config-netty + 0.6.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 new file mode 100644 index 0000000000..1378f3e766 --- /dev/null +++ b/features/config-netty/odl-config-netty/pom.xml @@ -0,0 +1,89 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-netty + 0.6.0-SNAPSHOT + feature + + OpenDaylight :: Config-Netty + + + etc/opendaylight/karaf + 00-netty.xml + + + + + + ${project.groupId} + config-artifacts + ${project.version} + pom + import + + + + + + + ${project.groupId} + odl-config-netty-config-api + xml + features + + + ${project.groupId} + netty-event-executor-config + + + ${project.groupId} + netty-threadgroup-config + + + ${project.groupId} + netty-timer-config + + + ${project.groupId} + threadpool-config-api + + + ${project.groupId} + threadpool-config-impl + + + ${project.groupId} + odl-config-startup + xml + features + + + + ${project.groupId} + config-netty-config + ${project.version} + xml + config + provided + + + + \ No newline at end of file diff --git a/features/config-netty/odl-config-netty/src/main/feature/feature.xml b/features/config-netty/odl-config-netty/src/main/feature/feature.xml new file mode 100644 index 0000000000..84b37487fe --- /dev/null +++ b/features/config-netty/odl-config-netty/src/main/feature/feature.xml @@ -0,0 +1,15 @@ + + + + + + mvn:org.opendaylight.controller/config-netty-config/${project.version}/xml/config + + + diff --git a/features/config-netty/pom.xml b/features/config-netty/pom.xml index 9497487be7..8a5e2cc0f9 100644 --- a/features/config-netty/pom.xml +++ b/features/config-netty/pom.xml @@ -1,77 +1,36 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - + + + 4.0.0 + + org.opendaylight.odlparent + odlparent-lite + 1.8.0-SNAPSHOT + + - - 0.6.0-SNAPSHOT - etc/opendaylight/karaf - 00-netty.xml - + org.opendaylight.controller + features-config-netty-aggregator + 0.6.0-SNAPSHOT + pom - - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - - - + + features-config-netty + features4-config-netty + odl-config-netty + - - - 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 - + + 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/pom.xml b/features/config-persister/features-config-persister/pom.xml new file mode 100644 index 0000000000..b202e54053 --- /dev/null +++ b/features/config-persister/features-config-persister/pom.xml @@ -0,0 +1,108 @@ + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-config-persister + 0.6.0-SNAPSHOT + jar + + + 2.2.0-SNAPSHOT + 0.6.0-SNAPSHOT + features.xml + + + + + + org.opendaylight.mdsal + mdsal-artifacts + ${mdsal.version} + import + pom + + + org.opendaylight.controller + config-artifacts + ${config.version} + import + pom + + + + + + + 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/src/main/features/features.xml b/features/config-persister/features-config-persister/src/main/features/features.xml similarity index 100% rename from features/config-persister/src/main/features/features.xml rename to features/config-persister/features-config-persister/src/main/features/features.xml diff --git a/features/config-persister/features4-config-persister/pom.xml b/features/config-persister/features4-config-persister/pom.xml new file mode 100644 index 0000000000..0f02a582dc --- /dev/null +++ b/features/config-persister/features4-config-persister/pom.xml @@ -0,0 +1,57 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-config-persister + 0.6.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 new file mode 100644 index 0000000000..528d874434 --- /dev/null +++ b/features/config-persister/odl-config-manager-facade-xml/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-manager-facade-xml + 0.6.0-SNAPSHOT + feature + + Opendaylight :: Config Persister:: Mapping for Config Subsystem + + + + ${project.groupId} + odl-config-core + ${project.version} + xml + features + + + ${project.groupId} + config-manager-facade-xml + ${project.version} + + + + \ No newline at end of file diff --git a/features/config-persister/odl-config-persister-all/pom.xml b/features/config-persister/odl-config-persister-all/pom.xml new file mode 100644 index 0000000000..32e311111c --- /dev/null +++ b/features/config-persister/odl-config-persister-all/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-persister-all + 0.6.0-SNAPSHOT + feature + + OpenDaylight :: Config Persister:: All + + + + ${project.groupId} + odl-config-persister + ${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-persister/pom.xml b/features/config-persister/odl-config-persister/pom.xml new file mode 100644 index 0000000000..4c3ae48df5 --- /dev/null +++ b/features/config-persister/odl-config-persister/pom.xml @@ -0,0 +1,127 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-persister + 0.6.0-SNAPSHOT + feature + + OpenDaylight :: Config Persister + + + + + org.opendaylight.mdsal + mdsal-artifacts + 2.2.0-SNAPSHOT + pom + import + + + ${project.groupId} + config-artifacts + ${project.version} + pom + import + + + + + + + ${project.groupId} + odl-config-api + xml + features + + + ${project.groupId} + odl-config-core + xml + features + + + ${project.groupId} + odl-config-manager + xml + features + + + org.opendaylight.mdsal + odl-mdsal-binding-runtime + xml + features + + + ${project.groupId} + yang-jmx-generator + + + ${project.groupId} + config-persister-api + + + ${project.groupId} + config-util + + + ${project.groupId} + config-manager-facade-xml + + + ${project.groupId} + config-persister-file-xml-adapter + + + ${project.groupId} + config-persister-impl + + + ${project.groupId} + config-persister-feature4-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 + + + org.apache.karaf + org.apache.karaf.util + ${karaf4.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 new file mode 100644 index 0000000000..e1054c8267 --- /dev/null +++ b/features/config-persister/odl-config-startup/pom.xml @@ -0,0 +1,38 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-startup + 0.6.0-SNAPSHOT + feature + + OpenDaylight :: Config Persister:: Config Startup + + + + ${project.groupId} + odl-config-persister + ${project.version} + xml + features + + + + \ No newline at end of file diff --git a/features/config-persister/pom.xml b/features/config-persister/pom.xml index b202e54053..79807c7a18 100644 --- a/features/config-persister/pom.xml +++ b/features/config-persister/pom.xml @@ -1,108 +1,39 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - + + + 4.0.0 + + org.opendaylight.odlparent + odlparent-lite + 1.8.0-SNAPSHOT + + - - 2.2.0-SNAPSHOT - 0.6.0-SNAPSHOT - features.xml - + org.opendaylight.controller + features-config-persister-aggregator + 0.6.0-SNAPSHOT + pom - - - - org.opendaylight.mdsal - mdsal-artifacts - ${mdsal.version} - import - pom - - - org.opendaylight.controller - config-artifacts - ${config.version} - import - pom - - - + + features-config-persister + features4-config-persister + odl-config-manager-facade-xml + odl-config-persister + odl-config-persister-all + odl-config-startup + - - - 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 - + + 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/pom.xml b/features/config/features-config/pom.xml new file mode 100644 index 0000000000..58abc7566d --- /dev/null +++ b/features/config/features-config/pom.xml @@ -0,0 +1,151 @@ + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-config + 0.6.0-SNAPSHOT + jar + + + 1.1.0-SNAPSHOT + 2.2.0-SNAPSHOT + 0.6.0-SNAPSHOT + 1.8.0-SNAPSHOT + features.xml + etc/opendaylight/karaf + + + + + + + org.opendaylight.odlparent + odlparent-artifacts + 1.8.0-SNAPSHOT + 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.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/src/main/features/features.xml b/features/config/features-config/src/main/features/features.xml similarity index 100% rename from features/config/src/main/features/features.xml rename to features/config/features-config/src/main/features/features.xml diff --git a/features/config/features4-config/pom.xml b/features/config/features4-config/pom.xml new file mode 100644 index 0000000000..1863ed6525 --- /dev/null +++ b/features/config/features4-config/pom.xml @@ -0,0 +1,64 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-config + 0.6.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 new file mode 100644 index 0000000000..ea391c11a6 --- /dev/null +++ b/features/config/odl-config-all/pom.xml @@ -0,0 +1,57 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-all + 0.6.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-config-api + ${project.version} + xml + features + + + ${project.groupId} + odl-config-netty-config-api + ${project.version} + xml + features + + + ${project.groupId} + odl-config-core + ${project.version} + xml + features + + + ${project.groupId} + odl-config-manager + ${project.version} + xml + features + + + + \ No newline at end of file diff --git a/features/config/odl-config-api/pom.xml b/features/config/odl-config-api/pom.xml new file mode 100644 index 0000000000..bf90a1668d --- /dev/null +++ b/features/config/odl-config-api/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-api + 0.6.0-SNAPSHOT + feature + + + + org.opendaylight.mdsal + odl-mdsal-binding-base + 2.2.0-SNAPSHOT + xml + features + + + ${project.groupId} + config-api + ${project.version} + + + + \ No newline at end of file diff --git a/features/config/odl-config-core/pom.xml b/features/config/odl-config-core/pom.xml new file mode 100644 index 0000000000..1150237285 --- /dev/null +++ b/features/config/odl-config-core/pom.xml @@ -0,0 +1,89 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-core + 0.6.0-SNAPSHOT + feature + + + + + org.opendaylight.yangtools + yangtools-artifacts + 1.1.0-SNAPSHOT + pom + import + + + org.opendaylight.mdsal + mdsal-artifacts + 2.2.0-SNAPSHOT + pom + import + + + org.opendaylight.controller + config-artifacts + ${project.version} + pom + import + + + + + + + org.opendaylight.yangtools + odl-yangtools-common + xml + features + + + org.opendaylight.mdsal + odl-mdsal-binding-runtime + xml + features + + + ${project.groupId} + odl-config-api + xml + features + + + ${project.groupId} + config-util + + + ${project.groupId} + yang-jmx-generator + + + ${project.groupId} + shutdown-api + + + ${project.groupId} + shutdown-impl + + + + \ No newline at end of file diff --git a/features/config/odl-config-manager/pom.xml b/features/config/odl-config-manager/pom.xml new file mode 100644 index 0000000000..e3f1691562 --- /dev/null +++ b/features/config/odl-config-manager/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-manager + 0.6.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-config-core + ${project.version} + xml + features + + + ${project.groupId} + config-manager + ${project.version} + + + + \ No newline at end of file diff --git a/features/config/odl-config-netty-config-api/pom.xml b/features/config/odl-config-netty-config-api/pom.xml new file mode 100644 index 0000000000..983cc9730f --- /dev/null +++ b/features/config/odl-config-netty-config-api/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-config-netty-config-api + 0.6.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-config-api + ${project.version} + xml + features + + + org.opendaylight.odlparent + odl4-netty-4 + 1.8.0-SNAPSHOT + xml + features + + + ${project.groupId} + netty-config-api + ${project.version} + + + + \ No newline at end of file diff --git a/features/config/pom.xml b/features/config/pom.xml index 58abc7566d..bb020dda18 100644 --- a/features/config/pom.xml +++ b/features/config/pom.xml @@ -1,151 +1,40 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - - - org.opendaylight.controller - features-config - 0.6.0-SNAPSHOT - jar - - - 1.1.0-SNAPSHOT - 2.2.0-SNAPSHOT - 0.6.0-SNAPSHOT - 1.8.0-SNAPSHOT - features.xml - etc/opendaylight/karaf - - - - - - + + + 4.0.0 + org.opendaylight.odlparent - odlparent-artifacts + odlparent-lite 1.8.0-SNAPSHOT - 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.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 - + + + + org.opendaylight.controller + features-config-aggregator + 0.6.0-SNAPSHOT + pom + + + features-config + features4-config + odl-config-all + odl-config-api + odl-config-core + odl-config-manager + odl-config-netty-config-api + + + + 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/extras/features-extras/pom.xml b/features/extras/features-extras/pom.xml new file mode 100644 index 0000000000..60d1caa909 --- /dev/null +++ b/features/extras/features-extras/pom.xml @@ -0,0 +1,45 @@ + + + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-extras + 1.8.0-SNAPSHOT + jar + + 0.5.0-SNAPSHOT + + + + + org.jolokia + jolokia-osgi + + + org.opendaylight.controller + odl-jolokia-osgi + ${odl-jolokia-osgi.version} + cfg + configuration + + + + + 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/src/main/features/features.xml b/features/extras/features-extras/src/main/features/features.xml similarity index 100% rename from features/extras/src/main/features/features.xml rename to features/extras/features-extras/src/main/features/features.xml diff --git a/features/extras/features4-extras/pom.xml b/features/extras/features4-extras/pom.xml new file mode 100644 index 0000000000..941260b391 --- /dev/null +++ b/features/extras/features4-extras/pom.xml @@ -0,0 +1,43 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-extras + 1.8.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-extras-all + ${project.version} + xml + features + + + ${project.groupId} + odl-jolokia + ${project.version} + xml + features + + + + \ No newline at end of file diff --git a/features/extras/odl-extras-all/pom.xml b/features/extras/odl-extras-all/pom.xml new file mode 100644 index 0000000000..603cf3f280 --- /dev/null +++ b/features/extras/odl-extras-all/pom.xml @@ -0,0 +1,38 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-extras-all + 1.8.0-SNAPSHOT + feature + + OpenDaylight :: Extras :: All + + + + ${project.groupId} + odl-jolokia + ${project.version} + xml + features + + + + \ No newline at end of file diff --git a/features/extras/odl-jolokia/pom.xml b/features/extras/odl-jolokia/pom.xml new file mode 100644 index 0000000000..a46697245c --- /dev/null +++ b/features/extras/odl-jolokia/pom.xml @@ -0,0 +1,39 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-jolokia + 1.8.0-SNAPSHOT + feature + + Jolokia JMX/HTTP bridge + + + 0.5.0-SNAPSHOT + + + + + org.jolokia + jolokia-osgi + + + + \ No newline at end of file diff --git a/features/extras/odl-jolokia/src/main/feature/feature.xml b/features/extras/odl-jolokia/src/main/feature/feature.xml new file mode 100644 index 0000000000..7885b0243a --- /dev/null +++ b/features/extras/odl-jolokia/src/main/feature/feature.xml @@ -0,0 +1,7 @@ + + + + mvn:org.opendaylight.controller/odl-jolokia-osgi/${odl-jolokia-osgi.version}/cfg/configuration + http + + diff --git a/features/extras/pom.xml b/features/extras/pom.xml index 60d1caa909..0c0936f63b 100644 --- a/features/extras/pom.xml +++ b/features/extras/pom.xml @@ -1,40 +1,32 @@ - - + --> + 4.0.0 org.opendaylight.odlparent - features-parent + odlparent-lite 1.8.0-SNAPSHOT org.opendaylight.controller - features-extras + features-extras-aggregator 1.8.0-SNAPSHOT - jar - - 0.5.0-SNAPSHOT - + pom - - - org.jolokia - jolokia-osgi - - - org.opendaylight.controller - odl-jolokia-osgi - ${odl-jolokia-osgi.version} - cfg - configuration - - + + features-extras + features4-extras + odl-extras-all + odl-jolokia + scm:git:http://git.opendaylight.org/gerrit/controller.git diff --git a/features/mdsal/features-mdsal/pom.xml b/features/mdsal/features-mdsal/pom.xml new file mode 100644 index 0000000000..26e1ce581f --- /dev/null +++ b/features/mdsal/features-mdsal/pom.xml @@ -0,0 +1,367 @@ + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-mdsal + 1.5.0-SNAPSHOT + + jar + + + 0.6.0-SNAPSHOT + 1.1.0-SNAPSHOT + 2.2.0-SNAPSHOT + 0.10.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.5.0-SNAPSHOT + 0.6.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.8.0-SNAPSHOT + features.xml + etc/opendaylight/karaf + 05-clustering.xml + 06-clustered-entity-ownership.xml + 00-netty.xml + 01-md-sal.xml + 04-xsql.xml + + + + + + org.opendaylight.odlparent + odlparent-artifacts + 1.8.0-SNAPSHOT + 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 + + + + + + + + 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-karaf-xsql + + + + 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-dom-xsql + + + org.opendaylight.controller + sal-dom-xsql-config + config + xml + + + + 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/src/main/features/features.xml b/features/mdsal/features-mdsal/src/main/features/features.xml similarity index 100% rename from features/mdsal/src/main/features/features.xml rename to features/mdsal/features-mdsal/src/main/features/features.xml diff --git a/features/mdsal/features4-mdsal/pom.xml b/features/mdsal/features4-mdsal/pom.xml new file mode 100644 index 0000000000..d126465ee4 --- /dev/null +++ b/features/mdsal/features4-mdsal/pom.xml @@ -0,0 +1,112 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-mdsal + 1.5.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-mdsal-xsql + ${project.version} + xml + features + + + ${project.groupId} + odl-message-bus-collector + ${project.version} + xml + features + + + ${project.groupId} + odl-toaster + ${project.version} + xml + features + + + \ No newline at end of file diff --git a/features/mdsal/odl-clustering-test-app/pom.xml b/features/mdsal/odl-clustering-test-app/pom.xml new file mode 100644 index 0000000000..b1f28e7250 --- /dev/null +++ b/features/mdsal/odl-clustering-test-app/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-clustering-test-app + 1.5.0-SNAPSHOT + feature + + + + org.opendaylight.mdsal.model + odl-mdsal-models + 0.10.0-SNAPSHOT + xml + features + + + ${project.groupId} + odl-mdsal-broker + ${project.version} + xml + features + + + org.opendaylight.controller.samples + clustering-it-model + ${project.version} + + + org.opendaylight.controller.samples + clustering-it-provider + ${project.version} + + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-all/pom.xml b/features/mdsal/odl-mdsal-all/pom.xml new file mode 100644 index 0000000000..371a4faa99 --- /dev/null +++ b/features/mdsal/odl-mdsal-all/pom.xml @@ -0,0 +1,64 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-all + 1.5.0-SNAPSHOT + feature + + + + + ${project.groupId} + mdsal-artifacts + ${project.version} + pom + import + + + + + + + ${project.groupId} + odl-mdsal-broker + xml + features + + + ${project.groupId} + odl-mdsal-broker-local + xml + features + + + ${project.groupId} + odl-mdsal-xsql + xml + features + + + ${project.groupId} + odl-toaster + xml + features + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-broker-local/pom.xml b/features/mdsal/odl-mdsal-broker-local/pom.xml new file mode 100644 index 0000000000..5f04cb16b5 --- /dev/null +++ b/features/mdsal/odl-mdsal-broker-local/pom.xml @@ -0,0 +1,216 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-broker-local + 1.5.0-SNAPSHOT + feature + + OpenDaylight :: MDSAL :: Broker + + + 0.6.0-SNAPSHOT + etc/opendaylight/karaf + 01-md-sal.xml + + + + + + org.opendaylight.odlparent + odlparent-artifacts + 1.8.0-SNAPSHOT + pom + import + + + org.opendaylight.yangtools + yangtools-artifacts + 1.1.0-SNAPSHOT + pom + import + + + org.opendaylight.mdsal + mdsal-artifacts + 2.2.0-SNAPSHOT + pom + import + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + 0.10.0-SNAPSHOT + pom + import + + + org.opendaylight.controller + config-artifacts + 0.6.0-SNAPSHOT + pom + import + + + org.opendaylight.controller + mdsal-artifacts + 1.5.0-SNAPSHOT + pom + import + + + + + + + org.opendaylight.yangtools + odl-yangtools-common + xml + features + + + org.opendaylight.mdsal + odl-mdsal-binding-dom-adapter + xml + features + + + org.opendaylight.mdsal.model + odl-mdsal-models + xml + features + + + org.opendaylight.controller + odl-mdsal-common + xml + features + + + org.opendaylight.controller + odl-config-startup + xml + features + + + org.opendaylight.controller + odl-config-netty + xml + features + + + org.opendaylight.odlparent + odl4-lmax-3 + xml + features + + + + + org.opendaylight.mdsal + odl-mdsal-dom + xml + features + + + org.opendaylight.mdsal + odl-mdsal-eos-dom + xml + features + + + org.opendaylight.mdsal + odl-mdsal-eos-binding + xml + features + + + org.opendaylight.mdsal + odl-mdsal-singleton-dom + xml + features + + + ${project.groupId} + sal-core-api + + + ${project.groupId} + sal-core-spi + + + + ${project.groupId} + sal-schema-service + + + ${project.groupId} + sal-broker-impl + + + ${project.groupId} + sal-binding-api + + + ${project.groupId} + sal-binding-broker-impl + + + ${project.groupId} + sal-binding-util + + + ${project.groupId} + sal-connector-api + + + ${project.groupId} + sal-dom-config + + + ${project.groupId} + sal-binding-config + + + ${project.groupId} + sal-inmemory-datastore + + + ${project.groupId} + sal-dom-broker-config + + + + ${project.groupId} + blueprint + 0.6.0-SNAPSHOT + + + + ${project.groupId} + md-sal-config + ${project.version} + xml + config + provided + + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml new file mode 100644 index 0000000000..ff4c8d4977 --- /dev/null +++ b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml @@ -0,0 +1,17 @@ + + + + + mvn:org.opendaylight.controller/sal-schema-service/${project.version} + mvn:org.opendaylight.controller/blueprint/${blueprint.version} + + mvn:org.opendaylight.controller/md-sal-config/${project.version}/xml/config + + + diff --git a/features/mdsal/odl-mdsal-broker/pom.xml b/features/mdsal/odl-mdsal-broker/pom.xml new file mode 100644 index 0000000000..d820b1b098 --- /dev/null +++ b/features/mdsal/odl-mdsal-broker/pom.xml @@ -0,0 +1,111 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-broker + 1.5.0-SNAPSHOT + feature + + + etc/opendaylight/karaf + 05-clustering.xml + 06-clustered-entity-ownership.xml + + + + + ${project.groupId} + odl-mdsal-remoterpc-connector + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-distributed-datastore + ${project.version} + xml + features + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + config + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + entityownershipconfig + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + akkaconf + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + factoryakkaconf + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + moduleshardconf + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + xml + moduleconf + provided + + + + ${project.groupId} + sal-clustering-config + ${project.version} + cfg + datastore + provided + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml new file mode 100644 index 0000000000..d3a77853d2 --- /dev/null +++ b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml @@ -0,0 +1,33 @@ + + + + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/config + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/entityownershipconfig + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/factoryakkaconf + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleshardconf + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/moduleconf + + + mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/cfg/datastore + + + diff --git a/features/mdsal/odl-mdsal-clustering-commons/pom.xml b/features/mdsal/odl-mdsal-clustering-commons/pom.xml new file mode 100644 index 0000000000..44476403cb --- /dev/null +++ b/features/mdsal/odl-mdsal-clustering-commons/pom.xml @@ -0,0 +1,80 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-clustering-commons + 1.5.0-SNAPSHOT + feature + + + + + org.opendaylight.odlparent + odlparent-artifacts + 1.8.0-SNAPSHOT + pom + import + + + + + + + ${project.groupId} + odl-mdsal-broker-local + ${project.version} + xml + features + + + org.opendaylight.odlparent + odl4-akka-system-2.4 + xml + features + + + org.opendaylight.odlparent + odl4-akka-persistence-2.4 + xml + features + + + org.opendaylight.odlparent + odl4-akka-clustering-2.4 + xml + features + + + ${project.groupId} + sal-clustering-commons + ${project.version} + + + ${project.groupId} + sal-akka-raft + ${project.version} + + + io.dropwizard.metrics + metrics-core + + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-clustering/pom.xml b/features/mdsal/odl-mdsal-clustering/pom.xml new file mode 100644 index 0000000000..2e0fd769e1 --- /dev/null +++ b/features/mdsal/odl-mdsal-clustering/pom.xml @@ -0,0 +1,36 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-clustering + 1.5.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-mdsal-broker + ${project.version} + xml + features + + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-common/pom.xml b/features/mdsal/odl-mdsal-common/pom.xml new file mode 100644 index 0000000000..11ae29d3c4 --- /dev/null +++ b/features/mdsal/odl-mdsal-common/pom.xml @@ -0,0 +1,71 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-common + 1.5.0-SNAPSHOT + feature + + OpenDaylight :: Config :: All + + + + org.opendaylight.yangtools + odl-yangtools-yang-data + 1.1.0-SNAPSHOT + xml + features + + + org.opendaylight.controller + odl-config-api + 0.6.0-SNAPSHOT + xml + features + + + org.opendaylight.mdsal + odl-mdsal-binding-runtime + 2.2.0-SNAPSHOT + xml + features + + + net.java.dev.stax-utils + stax-utils + + + ${project.groupId} + sal-common-api + ${project.version} + + + ${project.groupId} + sal-common-impl + ${project.version} + + + ${project.groupId} + sal-common-util + ${project.version} + + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml new file mode 100644 index 0000000000..9ff7adf043 --- /dev/null +++ b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml @@ -0,0 +1,72 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-distributed-datastore + 1.5.0-SNAPSHOT + feature + + + + + org.opendaylight.controller + mdsal-artifacts + 1.5.0-SNAPSHOT + pom + import + + + + + + + ${project.groupId} + odl-mdsal-broker-local + xml + features + + + ${project.groupId} + odl-mdsal-clustering-commons + xml + features + + + ${project.groupId} + cds-access-api + + + ${project.groupId} + cds-access-client + + + ${project.groupId} + sal-distributed-datastore + + + ${project.groupId} + sal-cluster-admin-api + + + ${project.groupId} + sal-cluster-admin-impl + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml new file mode 100644 index 0000000000..a04f5e8ba3 --- /dev/null +++ b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-remoterpc-connector + 1.5.0-SNAPSHOT + feature + + + + ${project.groupId} + odl-mdsal-broker-local + ${project.version} + xml + features + + + ${project.groupId} + odl-mdsal-clustering-commons + ${project.version} + xml + features + + + org.opendaylight.odlparent + odl4-akka-leveldb-0.7 + 1.8.0-SNAPSHOT + xml + features + + + ${project.groupId} + sal-remoterpc-connector + ${project.version} + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-xsql/pom.xml b/features/mdsal/odl-mdsal-xsql/pom.xml new file mode 100644 index 0000000000..11525a683d --- /dev/null +++ b/features/mdsal/odl-mdsal-xsql/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-mdsal-xsql + 1.5.0-SNAPSHOT + feature + + + etc/opendaylight/karaf + 04-xsql.xml + + + + + ${project.groupId} + odl-mdsal-broker + ${project.version} + xml + features + + + ${project.groupId} + sal-dom-xsql + ${project.version} + + + ${project.groupId} + sal-karaf4-xsql + ${project.version} + + + + ${project.groupId} + sal-dom-xsql-config + ${project.version} + xml + config + provided + + + \ No newline at end of file diff --git a/features/mdsal/odl-mdsal-xsql/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-xsql/src/main/feature/feature.xml new file mode 100644 index 0000000000..c8c3887dab --- /dev/null +++ b/features/mdsal/odl-mdsal-xsql/src/main/feature/feature.xml @@ -0,0 +1,15 @@ + + + + + + mvn:org.opendaylight.controller/sal-dom-xsql-config/${project.version}/xml/config + + + diff --git a/features/mdsal/odl-message-bus-collector/pom.xml b/features/mdsal/odl-message-bus-collector/pom.xml new file mode 100644 index 0000000000..2d0413ec79 --- /dev/null +++ b/features/mdsal/odl-message-bus-collector/pom.xml @@ -0,0 +1,82 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-message-bus-collector + 1.5.0-SNAPSHOT + feature + + + etc/opendaylight/karaf + + + + + + org.opendaylight.controller + mdsal-artifacts + ${project.version} + pom + import + + + + + + + + org.opendaylight.controller.model + model-inventory + 1.5.0-SNAPSHOT + + + org.opendaylight.controller + odl-mdsal-broker + ${project.version} + xml + features + + + org.opendaylight.controller + messagebus-api + + + org.opendaylight.controller + messagebus-spi + + + org.opendaylight.controller + messagebus-util + + + org.opendaylight.controller + messagebus-impl + + + + org.opendaylight.controller + messagebus-config + ${project.version} + xml + config + provided + + + \ No newline at end of file diff --git a/features/mdsal/odl-message-bus-collector/src/main/feature/feature.xml b/features/mdsal/odl-message-bus-collector/src/main/feature/feature.xml new file mode 100644 index 0000000000..3e4bb62915 --- /dev/null +++ b/features/mdsal/odl-message-bus-collector/src/main/feature/feature.xml @@ -0,0 +1,15 @@ + + + + + + mvn:org.opendaylight.controller/messagebus-config/${project.version}/xml/config + + + diff --git a/features/mdsal/odl-toaster/pom.xml b/features/mdsal/odl-toaster/pom.xml new file mode 100644 index 0000000000..17d81ff373 --- /dev/null +++ b/features/mdsal/odl-toaster/pom.xml @@ -0,0 +1,66 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-toaster + 1.5.0-SNAPSHOT + feature + + OpenDaylight :: Toaster + + + + org.opendaylight.yangtools + odl-yangtools-common + 1.1.0-SNAPSHOT + xml + features + + + org.opendaylight.mdsal + odl-mdsal-binding-runtime + 2.2.0-SNAPSHOT + xml + features + + + ${project.groupId} + odl-mdsal-broker + ${project.version} + xml + features + + + org.opendaylight.controller.samples + sample-toaster + ${project.version} + + + org.opendaylight.controller.samples + sample-toaster-consumer + ${project.version} + + + org.opendaylight.controller.samples + sample-toaster-provider + ${project.version} + + + \ No newline at end of file diff --git a/features/mdsal/pom.xml b/features/mdsal/pom.xml index 26e1ce581f..c4e5eb0b8e 100644 --- a/features/mdsal/pom.xml +++ b/features/mdsal/pom.xml @@ -1,367 +1,48 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - - - org.opendaylight.controller - features-mdsal - 1.5.0-SNAPSHOT - - jar - - - 0.6.0-SNAPSHOT - 1.1.0-SNAPSHOT - 2.2.0-SNAPSHOT - 0.10.0-SNAPSHOT - 1.8.0-SNAPSHOT - 1.5.0-SNAPSHOT - 0.6.0-SNAPSHOT - 1.8.0-SNAPSHOT - 1.8.0-SNAPSHOT - features.xml - etc/opendaylight/karaf - 05-clustering.xml - 06-clustered-entity-ownership.xml - 00-netty.xml - 01-md-sal.xml - 04-xsql.xml - - - - - + + + 4.0.0 + org.opendaylight.odlparent - odlparent-artifacts + odlparent-lite 1.8.0-SNAPSHOT - 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 - - - - - - - - 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-karaf-xsql - - - - 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-dom-xsql - - - org.opendaylight.controller - sal-dom-xsql-config - config - xml - - - - 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 - + + + + org.opendaylight.controller + features-mdsal-aggregator + 1.5.0-SNAPSHOT + + pom + + + features-mdsal + features4-mdsal + odl-clustering-test-app + odl-mdsal-all + odl-mdsal-broker + odl-mdsal-broker-local + odl-mdsal-clustering + odl-mdsal-clustering-commons + odl-mdsal-common + odl-mdsal-distributed-datastore + odl-mdsal-remoterpc-connector + odl-mdsal-xsql + odl-message-bus-collector + odl-toaster + + + + 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/pom.xml b/features/protocol-framework/features-protocol-framework/pom.xml new file mode 100644 index 0000000000..0f2b32e9d1 --- /dev/null +++ b/features/protocol-framework/features-protocol-framework/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + org.opendaylight.odlparent + features-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features-protocol-framework + 0.9.0-SNAPSHOT + jar + + + 0.6.0-SNAPSHOT + + + + + 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/src/main/features/features.xml b/features/protocol-framework/features-protocol-framework/src/main/features/features.xml similarity index 100% rename from features/protocol-framework/src/main/features/features.xml rename to features/protocol-framework/features-protocol-framework/src/main/features/features.xml diff --git a/features/protocol-framework/features4-protocol-framework/pom.xml b/features/protocol-framework/features4-protocol-framework/pom.xml new file mode 100644 index 0000000000..bec91cab52 --- /dev/null +++ b/features/protocol-framework/features4-protocol-framework/pom.xml @@ -0,0 +1,36 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + feature-repo-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + features4-protocol-framework + 0.9.0-SNAPSHOT + feature + + + + org.opendaylight.controller + odl-protocol-framework + 0.9.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 new file mode 100644 index 0000000000..b068713302 --- /dev/null +++ b/features/protocol-framework/odl-protocol-framework/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + + org.opendaylight.odlparent + single-feature-parent + 1.8.0-SNAPSHOT + + + + org.opendaylight.controller + odl-protocol-framework + 0.9.0-SNAPSHOT + feature + + OpenDaylight :: Protocol Framework + + + + org.opendaylight.controller + odl-config-api + 0.6.0-SNAPSHOT + xml + features + + + org.opendaylight.controller + odl-config-netty-config-api + 0.6.0-SNAPSHOT + xml + features + + + org.opendaylight.controller + protocol-framework + ${project.version} + + + + \ No newline at end of file diff --git a/features/protocol-framework/pom.xml b/features/protocol-framework/pom.xml index 0f2b32e9d1..e86b79aab7 100644 --- a/features/protocol-framework/pom.xml +++ b/features/protocol-framework/pom.xml @@ -1,47 +1,36 @@ - - 4.0.0 - - org.opendaylight.odlparent - features-parent - 1.8.0-SNAPSHOT - - + + + 4.0.0 + + org.opendaylight.odlparent + odlparent-lite + 1.8.0-SNAPSHOT + + - - 0.6.0-SNAPSHOT - + org.opendaylight.controller + features-protocol-framework-aggregator + 0.9.0-SNAPSHOT + pom - - - 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 - + + features-protocol-framework + features4-protocol-framework + odl-protocol-framework + + + + 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/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index df30471e30..95fdeac5da 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -49,6 +49,7 @@ org.apache.aries.blueprint org.apache.aries.blueprint.core + 1.7.1 org.opendaylight.controller @@ -82,6 +83,11 @@ org.slf4j slf4j-api + + org.osgi + org.osgi.service.event + 1.3.1 + junit junit diff --git a/opendaylight/config/config-artifacts/pom.xml b/opendaylight/config/config-artifacts/pom.xml index ea61fc7e52..d0bd6dd728 100644 --- a/opendaylight/config/config-artifacts/pom.xml +++ b/opendaylight/config/config-artifacts/pom.xml @@ -71,6 +71,11 @@ config-persister-feature-adapter ${project.version} + + ${project.groupId} + config-persister-feature4-adapter + ${project.version} + ${project.groupId} config-persister-file-adapter @@ -223,6 +228,70 @@ xml runtime + + + ${project.groupId} + odl-config-api + ${project.version} + features + xml + + + ${project.groupId} + odl-config-core + ${project.version} + features + xml + + + ${project.groupId} + odl-config-manager + ${project.version} + features + xml + + + ${project.groupId} + odl-config-manager-facade-xml + ${project.version} + features + xml + + + ${project.groupId} + odl-config-netty + ${project.version} + features + xml + + + ${project.groupId} + odl-config-netty-config-api + ${project.version} + features + xml + + + ${project.groupId} + odl-config-persister + ${project.version} + features + xml + + + ${project.groupId} + odl-config-persister-all + ${project.version} + features + xml + + + ${project.groupId} + odl-config-startup + ${project.version} + features + xml + diff --git a/opendaylight/config/config-persister-feature4-adapter/pom.xml b/opendaylight/config/config-persister-feature4-adapter/pom.xml new file mode 100644 index 0000000000..5f83453fdd --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/pom.xml @@ -0,0 +1,74 @@ + + + + 4.0.0 + + + org.opendaylight.controller + config-subsystem + 0.6.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 new file mode 100644 index 0000000000..0b4f6f7781 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java @@ -0,0 +1,40 @@ +/* + * 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(BundleContext context) throws Exception { + bc = context; + cpc = new ConfigPusherCustomizer(); + cpst = new ServiceTracker<>(bc, ConfigPusher.class.getName(), cpc); + cpst.open(); + } + + public void stop(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 new file mode 100644 index 0000000000..fcc5313efb --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/AbstractFeatureWrapper.java @@ -0,0 +1,268 @@ +/* + * 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(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 (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 new file mode 100644 index 0000000000..a9d06853a2 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java @@ -0,0 +1,108 @@ +/* + * 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(Feature f) { + // Don't use without a feature service + } + + /* + * @param f Feature to wrap + * @param s FeaturesService to look up dependencies + */ + ChildAwareFeatureWrapper(Feature f, 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(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 new file mode 100644 index 0000000000..3297ba4939 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java @@ -0,0 +1,48 @@ +/* + * 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(ConfigPusher p, FeaturesService f) { + pushingThread = new Thread(new ConfigPushingRunnable(p, f, queue), "ConfigFeatureListener - ConfigPusher"); + pushingThread.start(); + } + + @Override + public void featureEvent(FeatureEvent event) { + queue.offer(event); + } + + @Override + public void repositoryEvent(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 new file mode 100644 index 0000000000..420e8d7a35 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java @@ -0,0 +1,61 @@ +/* + * 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(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(ServiceReference configPusherServiceReference, ConfigPusher configPusher) { + // we don't care if the properties change + } + + @Override + public void removedService(ServiceReference configPusherServiceReference, 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 new file mode 100644 index 0000000000..cfdad56094 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java @@ -0,0 +1,77 @@ +/* + * 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(ConfigPusher p, FeaturesService f,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 (InterruptedException e) { + LOG.error("ConfigPushingRunnable - interupted"); + interuppted = true; + } catch (Exception e) { + LOG.error("Exception while processing features {} event {}", toInstall, event, e); + } + } + } + + protected void processFeatureEvent(FeatureEvent event, 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(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 new file mode 100644 index 0000000000..50757fb7b9 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java @@ -0,0 +1,138 @@ +/* + * 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.LinkedHashSet; +import java.util.List; +import java.util.Set; +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; + +/* + * 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). + */ + Set pushedConfigs = new LinkedHashSet<>(); + /* + * LinkedHashMultimap to track which configs we pushed for each Feature installation + * For future use + */ + 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 { + 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); + } + } + } + return configs; + } + + private boolean isInstalled(final Feature feature) { + 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()); + } + } catch (Exception e) { + LOG.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}", retries, e); + } + try { + Thread.sleep(RETRY_PAUSE_MILLIS); + } catch (InterruptedException e1) { + throw new IllegalStateException(e1); + } + } + 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 new file mode 100644 index 0000000000..70f7366895 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java @@ -0,0 +1,173 @@ +/* + * 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(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 new file mode 100644 index 0000000000..0b3493c7d3 --- /dev/null +++ b/opendaylight/config/config-persister-feature4-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureServiceCustomizer.java @@ -0,0 +1,84 @@ +/* + * 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.FeatureListProvider; +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(ConfigPusher c) { + configPusher = c; + } + + @Override + public FeaturesService addingService(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 (Exception e) { + LOG.error("Error listing installed features", e); + } + + currentPersister.get().setFeaturesService(new FeatureListProvider() { + @Override + public Set listFeatures() { + return installedFeatureIds; + } + }); + } + ConfigFeaturesListener configFeaturesListener = new ConfigFeaturesListener(configPusher, featureService); + registration = bc.registerService(FeaturesListener.class.getCanonicalName(), configFeaturesListener, null); + return featureService; + } + + @Override + public void modifiedService(ServiceReference reference, + FeaturesService service) { + // we don't care if the properties change + } + + @Override + public void removedService(ServiceReference reference, + 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 9bbfa4d4d7..0970996c9a 100644 --- a/opendaylight/config/pom.xml +++ b/opendaylight/config/pom.xml @@ -23,6 +23,7 @@ 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/mdsal-artifacts/pom.xml b/opendaylight/md-sal/mdsal-artifacts/pom.xml index 8a7a7115f1..a2b6a9c89f 100644 --- a/opendaylight/md-sal/mdsal-artifacts/pom.xml +++ b/opendaylight/md-sal/mdsal-artifacts/pom.xml @@ -319,6 +319,78 @@ ${project.version} + + + ${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-mdsal-xsql + ${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/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index 0137360e17..dc504ad720 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -93,6 +93,7 @@ sal-dom-xsql sal-karaf-xsql + sal-karaf4-xsql sal-dom-xsql-config diff --git a/opendaylight/md-sal/sal-karaf4-xsql/pom.xml b/opendaylight/md-sal/sal-karaf4-xsql/pom.xml new file mode 100644 index 0000000000..a760a3c64c --- /dev/null +++ b/opendaylight/md-sal/sal-karaf4-xsql/pom.xml @@ -0,0 +1,103 @@ + + + + + + 4.0.0 + + + sal-parent + org.opendaylight.controller + 1.5.0-SNAPSHOT + + + org.opendaylight.controller + sal-karaf4-xsql + bundle + Apache Karaf :: Shell odl/xsql Commands + + Provides the OSGi odl commands + + + + org.apache.karaf.shell + org.apache.karaf.shell.console + ${karaf4.version} + + + + org.osgi + org.osgi.core + 5.0.0 + provided + + + + org.osgi + org.osgi.compendium + 5.0.0 + provided + + + + junit + junit + 4.11 + test + + + org.opendaylight.controller + sal-dom-xsql + 1.5.0-SNAPSHOT + + + + + + + maven-compiler-plugin + true + 2.3.2 + + 1.5 + 1.5 + + + + org.apache.felix + maven-bundle-plugin + 2.4.0 + true + + + ${project.artifactId} + org.opendaylight.controller.xsql*;version=${project.version} + !org.opendaylight.controller.xsql*, + org.apache.aries.blueprint, + org.osgi.service.blueprint.container, + org.osgi.service.blueprint.reflect, + org.apache.karaf.shell.commands, + org.apache.karaf.shell.console, + * + + + + + + + diff --git a/opendaylight/md-sal/sal-karaf4-xsql/src/main/java/org/opendaylight/controller/xsql/xsql.java b/opendaylight/md-sal/sal-karaf4-xsql/src/main/java/org/opendaylight/controller/xsql/xsql.java new file mode 100644 index 0000000000..fc171e5c60 --- /dev/null +++ b/opendaylight/md-sal/sal-karaf4-xsql/src/main/java/org/opendaylight/controller/xsql/xsql.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014, 2015 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.xsql; + +import org.apache.karaf.shell.commands.Argument; +import org.apache.karaf.shell.commands.Command; +import org.apache.karaf.shell.commands.Option; +import org.apache.karaf.shell.console.OsgiCommandSupport; +import org.opendaylight.controller.md.sal.dom.xsql.XSQLAdapter; + +/** + * To be removed in Nitrogen + */ +@Deprecated +@Command(scope = "odl", name = "xsql", description = "XSQL Karaf Command") +public class xsql extends OsgiCommandSupport { + + @Option(name = "-o", aliases = { "--option" }, description = "An option to the command", required = false, multiValued = false) + private String option; + + @Argument(name = "argument", description = "Argument to the command", required = false, multiValued = false) + private String argument; + + protected Object doExecute() throws Exception { + if(argument==null){ + System.out.println("Nothing to do..., please specify a command."); + return null; + } + XSQLAdapter.getInstance().processCommand(new StringBuffer(argument), + System.out); + return null; + } +} diff --git a/opendaylight/md-sal/sal-karaf4-xsql/src/main/resources/OSGI-INF/blueprint/shell-log.xml b/opendaylight/md-sal/sal-karaf4-xsql/src/main/resources/OSGI-INF/blueprint/shell-log.xml new file mode 100644 index 0000000000..e9a4a233d3 --- /dev/null +++ b/opendaylight/md-sal/sal-karaf4-xsql/src/main/resources/OSGI-INF/blueprint/shell-log.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + -- 2.36.6