diff --git a/.circleci/config.yml b/.circleci/config.yml
index 202dfaa374ad..31a905a548a6 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -15,7 +15,7 @@ executors:
- image: opennms/antora:2.3.4-b6293
integration-test-executor:
machine:
- image: ubuntu-2004:202010-01
+ image: ubuntu-2004:202010-01
smoke-test-executor:
machine:
image: ubuntu-2004:202010-01
@@ -31,27 +31,27 @@ defaults: &defaults
previous_branch:
description: the previous branch, if any
type: string
- default: foundation-2021
+ default: release-29.x
previous_branch_label:
description: the previous branch, if any (escaped, no slashes)
type: string
- default: foundation-2021
+ default: release-29.x
main_branch:
description: the auto-merge main branch
type: string
- default: release-28.x
+ default: master-29
main_branch_label:
description: the auto-merge main branch (escaped, no slashes)
type: string
- default: release-28.x
+ default: master-29
next_branch:
description: the auto-merge target branch
type: string
- default: develop
+ default: ""
next_branch_label:
description: the auto-merge target branch (escaped, no slashes)
type: string
- default: develop
+ default: ""
aliases:
- &setup_dct_env
@@ -147,12 +147,12 @@ commands:
keys:
- maven-dependencies-v3-{{ checksum "pom-version-cache.key" }}-{{ checksum "maven-dependency-pom-cache.key" }}
- maven-dependencies-v3-{{ checksum "pom-version-cache.key" }}-
- update-maven-cache:
- description: "Maven: Refresh local repository from POM files"
- steps:
- run:
name: Remove old artifacts to keep workspace size down
command: .circleci/scripts/clean-m2.sh
+ update-maven-cache:
+ description: "Maven: Refresh local repository from POM files"
+ steps:
- run:
name: Collect Maven Dependencies
command: |
@@ -315,6 +315,7 @@ commands:
.circleci/scripts/configure-signing.sh
./clean.pl
<< parameters.node-memory >>
+ export MAVEN_OPTS="$MAVEN_OPTS -Xmx8g -XX:ReservedCodeCacheSize=1g"
./compile.pl -DskipTests=true -Dbuild.skip.tarball=false \
-DupdatePolicy=never \
-Daether.connector.resumeDownloads=false \
@@ -359,7 +360,6 @@ commands:
default: true
type: boolean
steps:
- - update-maven-cache
- run:
name: Monitor JVM processes
background: true
diff --git a/.circleci/scripts/itest.sh b/.circleci/scripts/itest.sh
index 7f1179d61ca7..53ff485fc78d 100755
--- a/.circleci/scripts/itest.sh
+++ b/.circleci/scripts/itest.sh
@@ -50,7 +50,7 @@ echo "#### Installing other dependencies"
# limit the sources we need to update
sudo rm -f /etc/apt/sources.list.d/*
-# kill other apt-gets first to avoid problems locking /var/lib/apt/lists/lock - see https://discuss.circleci.com/t/could-not-get-lock-var-lib-apt-lists-lock/28337/6
+# kill other apt commands first to avoid problems locking /var/lib/apt/lists/lock - see https://discuss.circleci.com/t/could-not-get-lock-var-lib-apt-lists-lock/28337/6
sudo killall -9 apt || true && \
sudo apt update && \
sudo env DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
@@ -71,7 +71,7 @@ sudo add-apt-repository 'deb http://debian.opennms.org stable main'
# add the R repository
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
-sudo apt-get update && \
+sudo apt update && \
RRDTOOL_VERSION=$(apt-cache show rrdtool | grep Version: | grep -v opennms | awk '{ print $2 }') && \
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections && \
sudo env DEBIAN_FRONTEND=noninteractive apt -f --no-install-recommends install \
diff --git a/.circleci/scripts/smoke.sh b/.circleci/scripts/smoke.sh
index e76c76e10511..b8874d51be73 100755
--- a/.circleci/scripts/smoke.sh
+++ b/.circleci/scripts/smoke.sh
@@ -53,20 +53,21 @@ export MAVEN_OPTS="-Xmx1g -Xms1g"
cd ~/project/smoke-test
if [ $SUITE = "minimal" ]; then
echo "#### Executing minimal set smoke/system tests"
- # Run a set of known tests
- for TEST_CLASS in "MenuHeaderIT" "SinglePortFlowsIT"
- do
- echo "###### Testing: ${TEST_CLASS}"
- ../compile.pl -N -DskipTests=false -DskipITs=false -Dtest.fork.count=0 -Dit.test=$TEST_CLASS install verify
- done
+ IT_TESTS="MenuHeaderIT,SinglePortFlowsIT"
else
- echo "#### Executing complete suite of smoke/system tests"
find_tests
- # Iterate through the tests and stop after the first failure
- while read -r TEST_CLASS
- do
- echo "###### Testing: ${TEST_CLASS}"
- ../compile.pl -N -DskipTests=false -DskipITs=false -DfailIfNoTests=false -Dtest.fork.count=0 -Dit.test="$TEST_CLASS" '-P!smoke.all' "-Psmoke.$SUITE" install verify
- done < /tmp/this_node_it_tests
+ echo "#### Executing complete suite of smoke/system tests"
+ IT_TESTS="$(< /tmp/this_node_it_tests paste -s -d, -)"
fi
+../compile.pl \
+ -DskipTests=false \
+ -DskipITs=false \
+ -DfailIfNoTests=false \
+ -Dtest.fork.count=0 \
+ -Dit.test="$IT_TESTS" \
+ --fail-fast \
+ -N \
+ '-P!smoke.all' \
+ "-Psmoke.$SUITE" \
+ install verify
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 42b186479c46..9d80d292c4d4 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,29 +1,32 @@
### All Contributors
-* [ ] Have you read and followed our [Contribution Guidelines](https://github.com/OpenNMS/opennms/blob/develop/CONTRIBUTING.md)?
+* [ ] Have you read our [Contribution Guidelines](https://github.com/OpenNMS/opennms/blob/develop/CONTRIBUTING.md)?
* [ ] Have you (electronically) signed the [OpenNMS Contributor Agreement](https://cla-assistant.io/OpenNMS/opennms)?
-* [ ] Have you [made an issue in the OpenNMS issue tracker](https://issues.opennms.org)? If so, you should:
- 1. update the title of this PR to be of the format: `${JIRA-ISSUE-NUMBER}: subject of pull request`
+
+### Contribution Checklist
+
+* Please [make an issue in the OpenNMS issue tracker](https://issues.opennms.org) if there isn't one already. Once there is an issue, please:
+ 1. update the title of this PR to be in the format: `${JIRA-ISSUE-NUMBER}: subject of pull request`
2. update the JIRA link at the bottom of this comment to refer to the real issue number
3. prefix your commit messages with the issue number, if possible
- If you're not sure how to do this, we can help you get things set up properly.
-* [ ] Have you made a comment in that issue which points back to this PR?
-* [ ] Have you updated the JIRA link at the bottom of this comment to link to your issue?
-* [ ] If this is a new or updated feature, is there documentation for the new behavior?
-* [ ] If this is new code, are there unit and/or integration tests?
-* [ ] If this PR targets a `foundation-*` branch, does it avoid changing files in `$OPENNMS_HOME/etc/`?
+ 4. once you've created this PR, please link to it in a comment in the JIRA issue
+ Don't worry if this sounds like a lot, we can help you get things set up properly.
+* If this is a new or updated feature, is there documentation for the new behavior?
+* If this is new code, are there unit and/or integration tests?
+* If this PR targets a `foundation-*` branch, does it try to avoid changing files in `$OPENNMS_HOME/etc/`?
-### Pull Request Process
+### What's Next?
-One or more reviewers should be assigned to each PR.
+A PR should be assigned at least 2 reviewers. If you know that someone would be a good person to review your code, feel free to add them.
-If you know that a particular person is subject matter expert in the area your PR affects, feel free to assign one or more reviewers when you create this PR, otherwise reviewers will be assigned for you.
+If you need help making additions or changes to the documentation related to your changes, please let us know.
-If you have made additions or changes to the documentation, or if you _need_ documentation for these code changes, please make sure a technical writer has looked it over.
+In any case, if anything is unclear or you want help getting your PR ready for merge, please don't hesitate to say something in the comments here,
+or in [the #opennms-development chat channel](https://chat.opennms.com/opennms/channels/opennms-development).
-Once the reviewer(s) accept the PR and the branch passes continuous integration, the PR is eligible for merge.
+Once reviewer(s) accept the PR and the branch passes continuous integration, the PR is eligible for merge.
-At that time, if you have commit access (are an OpenNMS Group employee or a member of the Order of the Green Polo) you are welcome to merge the PR.
+At that time, if you have commit access (are an OpenNMS Group employee or a member of the OGP) you are welcome to merge the PR when you're ready.
Otherwise, a reviewer can merge it for you.
Thanks for taking time to contribute!
diff --git a/.github/label-pr.yml b/.github/label-pr.yml
new file mode 100644
index 000000000000..8d34b7335c5d
--- /dev/null
+++ b/.github/label-pr.yml
@@ -0,0 +1,6 @@
+- regExp: "^docs/.*$"
+ labels: ["docs"]
+- regExp: "^opennms-doc/.*$"
+ labels: ["docs"]
+- regExp: "^.*\\.adoc$"
+ labels: ["docs"]
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index 000000000000..47e6a38558af
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,16 @@
+# Workflow to associate labels automatically
+name: PR-Labeler
+# Trigger the workflow on pull request events
+on: [pull_request]
+jobs:
+ label:
+ runs-on: ubuntu-18.04
+ steps:
+ # We need to checkout the repository to access the configured file (.github/label-pr.yml)
+ - uses: actions/checkout@v2
+ - name: Labeler
+ uses: docker://decathlon/pull-request-labeler-action:2.0.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml`
+ CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml
diff --git a/.nightly b/.nightly
index 403e6d41b5e2..ce6a7bbe2e7a 100644
--- a/.nightly
+++ b/.nightly
@@ -1,2 +1,2 @@
repo: develop
-parent_branch: release-28.x
+parent_branch: develop
diff --git a/LICENSE.md b/LICENSE.md
index 58207820cdf8..5df63663ff04 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -91,32 +91,4 @@ view the header in each file:
* opennms-services/src/main/java/org/opennms/netmgt/xmlrpcd/TimeoutSecureXmlRpcTransport.java
* opennms-services/src/main/java/org/opennms/netmgt/xmlrpcd/TimeoutSecureXmlRpcTransportFactory.java
* opennms-services/src/test/java/org/opennms/netmgt/syslogd/SyslogClient.java
-* opennms-tools/m2eclipse-integration/org.opennms.m2e.castor/src/org/opennms/m2e/castor/internal/CastorBuildParticipant.java
-* opennms-tools/m2eclipse-integration/org.opennms.m2e.castor/src/org/opennms/m2e/castor/internal/CastorProjectConfigurator.java
-* opennms-tools/m2eclipse-integration/org.opennms.m2e.castor.feature/feature.properties
-* opennms-tools/opennms-qosdaemon/src/main/java/org/openoss/opennms/spring/qosd/ejb/AlarmListJ2eeConnectionManagerThread.java
-* opennms-tools/OpenNMSXMLClient/src/main/java/com/bt/bcos/adapter/AdapterIf.java
-* opennms-tools/OpenNMSXMLClient/src/main/java/org/opennms/xmlclient/BasicHttpMethods.java
-* opennms-tools/OpenNMSXMLClient/src/main/java/org/opennms/xmlclient/ClientPropertiesLoader.java
-* opennms-tools/OpenNMSXMLClient/src/main/java/org/opennms/xmlclient/OpenNmsXmlClient.java
-* opennms-tools/OpenNMSXMLClient/src/main/java/org/opennms/xmlclient/bcos/OpenNmsBcosAdapter.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xml/model/client/GetNodesTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xml/model/client/GetRrdDataTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/InterfaceAddTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/InterfaceRemoveTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/NodeAddTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/NodeRemoveTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/RequisitionAddTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/RequisitionImportTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/RequisitionListTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/RequisitionRemoveDeployedTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/RequisitionRemoveTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/XMLMarshalTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/BcosAddTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/BcosCommitTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/BcosRemoveTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/catalyst/CatalystAddTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/catalyst/CatalystCommitTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/catalyst/CatalystRemoveTest.java
-* opennms-tools/OpenNMSXMLClient/src/test/java/org/opennms/xmlclient/bcos/catalyst/RepeatingAddRemoveTest.java
diff --git a/checkstyle/pom.xml b/checkstyle/pom.xml
index bf2a928717d2..76a5bfa0eaf6 100644
--- a/checkstyle/pom.xml
+++ b/checkstyle/pom.xml
@@ -3,7 +3,7 @@
4.0.0org.opennmsorg.opennms.checkstyle
- 28.1.1
+ 29.0.0-SNAPSHOTOpenNMS :: Checkstyle
diff --git a/container/branding/pom.xml b/container/branding/pom.xml
index 42c6961e4114..91dfc192ab97 100644
--- a/container/branding/pom.xml
+++ b/container/branding/pom.xml
@@ -6,7 +6,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container
diff --git a/container/bridge/api/pom.xml b/container/bridge/api/pom.xml
index bc5d0e725d12..519043403b74 100644
--- a/container/bridge/api/pom.xml
+++ b/container/bridge/api/pom.xml
@@ -4,7 +4,7 @@
org.opennms.containerorg.opennms.container.bridge
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container.bridgeorg.opennms.container.bridge.api
diff --git a/container/bridge/pom.xml b/container/bridge/pom.xml
index 90fe621efbb0..32ce17feae53 100644
--- a/container/bridge/pom.xml
+++ b/container/bridge/pom.xml
@@ -6,7 +6,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.containerorg.opennms.container.bridge
diff --git a/container/bridge/proxy/pom.xml b/container/bridge/proxy/pom.xml
index 639e8ef79e58..4e77522789d5 100644
--- a/container/bridge/proxy/pom.xml
+++ b/container/bridge/proxy/pom.xml
@@ -4,7 +4,7 @@
org.opennms.containerorg.opennms.container.bridge
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container.bridgeorg.opennms.container.bridge.proxy
@@ -30,7 +30,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/container/bridge/rest/pom.xml b/container/bridge/rest/pom.xml
index f3db9308773d..0f27e3e6d92c 100644
--- a/container/bridge/rest/pom.xml
+++ b/container/bridge/rest/pom.xml
@@ -4,7 +4,7 @@
org.opennms.containerorg.opennms.container.bridge
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container.bridgeorg.opennms.container.bridge.rest
@@ -27,7 +27,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpn${osgiCompendiumVersion}provided
@@ -42,18 +42,14 @@
- false
- true
- opennms-repo
- OpenNMS Maven Repository
- http://maven.opennms.org/content/groups/opennms.org-release
-
-
- true
- false
- opennms-snapshots
- OpenNMS Snapshot Maven Repository
- http://maven.opennms.org/content/groups/opennms.org-snapshot
+ opennms-maven-3rdparty
+ https://packages.opennms.com/public/3rdparty/maven/
+
+ true
+
+
+ true
+
diff --git a/container/extender/pom.xml b/container/extender/pom.xml
index e002e6acc677..a1f38a65e862 100644
--- a/container/extender/pom.xml
+++ b/container/extender/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.container
@@ -30,7 +30,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnorg.slf4j
diff --git a/container/features/pom.xml b/container/features/pom.xml
index e6d783ceae0f..f38df5833042 100644
--- a/container/features/pom.xml
+++ b/container/features/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.karaf
@@ -66,17 +66,12 @@
karaf-extensions
- ${project.build.outputDirectory}/karaf/standard.xml
- xml
- standard
-
-
- ${project.build.outputDirectory}/karaf/spring.xml
+ ${project.build.outputDirectory}/spring.xmlxmlspring
- ${project.build.outputDirectory}/karaf/spring-legacy.xml
+ ${project.build.outputDirectory}/spring-legacy.xmlxmlspring-legacy
@@ -412,6 +407,13 @@
pomprovided
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.shell
+ ${project.version}
+ pom
+ provided
+ org.opennms.features.telemetry.distributedorg.opennms.features.telemetry.distributed.common
@@ -523,23 +525,19 @@
- false
- true
- opennms-repo
- OpenNMS Maven Repository
- http://maven.opennms.org/content/groups/opennms.org-release
-
-
- true
- false
- opennms-snapshots
- OpenNMS Snapshot Maven Repository
- http://maven.opennms.org/content/groups/opennms.org-snapshot
+ opennms-maven-3rdparty
+ https://packages.opennms.com/public/3rdparty/maven/
+
+ true
+
+
+ true
+ sonatype.org-snapshotSonatype OSS Snapshots Repository
- http://maven.opennms.org/content/groups/sonatype.org-snapshot/
+ https://maven.opennms.org/content/groups/sonatype.org-snapshot/falsetrue
diff --git a/container/features/src/main/resources/features-minion.xml b/container/features/src/main/resources/features-minion.xml
index 391f07466181..43baf2fa476d 100644
--- a/container/features/src/main/resources/features-minion.xml
+++ b/container/features/src/main/resources/features-minion.xml
@@ -159,8 +159,19 @@
mvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}mvn:org.opennms.core.ipc.grpc/org.opennms.core.ipc.grpc.common/${project.version}mvn:org.opennms.core.ipc.grpc/org.opennms.core.ipc.grpc.client/${project.version}
+ opennms-core-ipc-twin-grpc-subscriber
-
+
+
+ mvn:org.opennms.core.grpc/org.opennms.core.grpc.common/${project.version}
+ mvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}
+ mvn:org.opennms.core.ipc.twin/org.opennms.core.ipc.twin.api/${project.version}
+ mvn:org.opennms.core.ipc.twin/org.opennms.core.ipc.twin.common/${project.version}
+ mvn:org.opennms.core.ipc.twin.grpc/org.opennms.core.ipc.twin.grpc.common/${project.version}
+ mvn:org.opennms.core.ipc.twin.grpc/org.opennms.core.ipc.twin.grpc.subscriber/${project.version}
+ json-patch
+
+
minion-core-apimvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}
@@ -173,16 +184,6 @@
mvn:org.opennms.features.scv/org.opennms.features.scv.dominion-grpc-impl/${project.version}
-
- opennms-health
- scv-api
-
- mvn:org.apache.httpcomponents/httpcore-osgi/${httpcoreVersion}
- mvn:org.apache.httpcomponents/httpclient-osgi/${httpclientVersion}
- mvn:com.google.code.gson/gson/${gsonVersion}
- mvn:org.opennms.features.minion/minion-rest-client/${project.version}
-
-
opennms-health-restcxf-core
diff --git a/container/features/src/main/resources/features.xml b/container/features/src/main/resources/features.xml
index d5da8dc291a5..f45f55f9371a 100644
--- a/container/features/src/main/resources/features.xml
+++ b/container/features/src/main/resources/features.xml
@@ -1,5 +1,5 @@
-
+mvn:org.apache.camel.karaf/apache-camel/${camelVersion}/xml/featuresmvn:org.apache.cxf.karaf/apache-cxf/${cxfVersion}/xml/featuresmvn:org.apache.activemq/activemq-karaf/${activemqVersion}/xml/features
@@ -171,8 +171,8 @@
mvn:net.java.dev.jna/jna/${jnaVersion}mvn:net.java.dev.jna/jna-platform/${jnaVersion}
-
- mvn:javax.mail/mail/1.4.5
+
+ mvn:com.sun.mail/jakarta.mail/1.6.7mvn:javax.servlet/javax.servlet-api/${servletApiVersion}
@@ -305,15 +305,21 @@
mvn:org.opennms.features.distributed/org.opennms.features.distributed.opennms-identity/${project.version}
+
+ owasp-encoder
+ owasp-html-sanitizer
+ commons-jexl
+ mvn:org.opennms.core/org.opennms.core.api/${project.version}
+ mvn:org.opennms/opennms-util/${project.version}
+
+
springspring-ormcommons-iodnsjavajaxb
- owasp-encoder
- owasp-html-sanitizer
- commons-jexl
+ opennms-utilwrap:mvn:javax.inject/javax.inject/1mvn:org.codehaus.jackson/jackson-core-asl/${jacksonVersion}mvn:org.codehaus.jackson/jackson-mapper-asl/${jacksonVersion}
@@ -326,7 +332,6 @@
mvn:org.opennms.core/org.opennms.core.spring/${project.version}mvn:org.opennms.core/org.opennms.core.sysprops/${project.version}mvn:org.opennms.core/org.opennms.core.xml/${project.version}
- mvn:org.opennms/opennms-util/${project.version}camel-core
@@ -451,14 +456,6 @@
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka-clients/${kafkaBundleVersion}mvn:com.github.luben/zstd-jni/${zstdJniVersion}
-
- wrap:mvn:com.amazonaws/aws-java-sdk-core/${awsSdkVersion}
- wrap:mvn:com.amazonaws/aws-java-sdk-sqs/${awsSdkVersion}
- wrap:mvn:com.amazonaws/amazon-sqs-java-messaging-lib/${awsSqsMessagingVersion}
- mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2Version}
- mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2Version}
- mvn:com.fasterxml.jackson.core/jackson-core/${jackson2Version}
- dropwizard-metricsguava
@@ -512,14 +509,6 @@
opennms-core-ipc-sink-kafka-commonmvn:org.opennms.core.ipc.sink.kafka/org.opennms.core.ipc.sink.kafka.server/${project.version}
-
- guava
- opennms-core-ipc-sink-api
- opennms-aws-sqs
- mvn:org.opennms.core.ipc.common/org.opennms.core.ipc.common.aws-sqs/${project.version}
- mvn:org.opennms.core.ipc.sink.aws.sqs/org.opennms.core.ipc.sink.aws.sqs.common/${project.version}
- mvn:org.opennms.core.ipc.sink.aws.sqs/org.opennms.core.ipc.sink.aws.sqs.client/${project.version}
- camel-blueprintcamel-jms
@@ -541,12 +530,6 @@
opennms-dao-apimvn:org.opennms.core.ipc.rpc/org.opennms.core.ipc.rpc.jms-impl/${project.version}
-
- opennms-aws-sqs
- opennms-core-ipc-rpc-api
- mvn:org.opennms.core.ipc.common/org.opennms.core.ipc.common.aws-sqs/${project.version}
- mvn:org.opennms.core.ipc.rpc/org.opennms.core.ipc.rpc.aws-sqs-impl/${project.version}
- opennms-kafkaopennms-core-ipc-rpc-api
@@ -837,6 +820,7 @@
wrap:mvn:com.jcraft/jsch/0.1.51wrap:mvn:org.jsoup/jsoup/${jsoupVersion}mvn:org.opennms.protocols/org.opennms.protocols.xml/${project.version}
+ mvn:org.opennms.features.distributed/org.opennms.features.distributed.kv-store.api/${project.version}bsf
@@ -1077,7 +1061,11 @@
mvn:org.opennms.features/org.opennms.features.karaf-health/${project.version}
+ commons-io
+ commons-lang3dropwizard-metrics
+ opennms-util
+ mvn:io.vavr/vavr/0.10.0mvn:org.opennms.core.health/org.opennms.core.health.api/${project.version}mvn:org.opennms.core.health/org.opennms.core.health.impl/${project.version}mvn:org.opennms.core.health/org.opennms.core.health.shell/${project.version}
@@ -1322,7 +1310,6 @@
The Vaadin web application framework including some addons and osgi related packages.
- http-whiteboardwrap:mvn:com.google.gwt/gwt-elemental/${gwtVersion}wrap:mvn:com.google.gwt/gwt-user/${gwtVersion}/$Export-Package=com.google.*mvn:com.vaadin.external/gentyref/1.2.0.vaadin1
@@ -1666,6 +1653,14 @@
mvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}mvn:org.opennms.core.ipc.grpc/org.opennms.core.ipc.grpc.common/${project.version}mvn:org.opennms.core.ipc.grpc/org.opennms.core.ipc.grpc.server/${project.version}
+ opennms-core-ipc-twin-grpc-publisher
+
+
+
+ opennms-core-ipc-twin-common
+ mvn:org.opennms.core.grpc/org.opennms.core.grpc.osgi/${project.version}
+ mvn:org.opennms.core.ipc.twin.grpc/org.opennms.core.ipc.twin.grpc.common/${project.version}
+ mvn:org.opennms.core.ipc.twin.grpc/org.opennms.core.ipc.twin.grpc.publisher/${project.version}
@@ -1766,4 +1761,76 @@
mvn:org.opennms.features/org.opennms.features.perspectivepoller/${project.version}
+
+ mvn:org.opennms.features/org.opennms.features.timeseries.shell/${project.version}
+
+
+
+ opennms-bridge-http-service
+
+
+
+ mvn:javax.servlet/javax.servlet-api/3.1.0
+ mvn:org.apache.felix/org.apache.felix.http.bridge/${felixBridgeVersion}
+ http-service;provider:=pax-http
+
+ webconsole
+ mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/${karafVersion}
+
+
+
+
+ camel-blueprint
+ camel-jms
+ opennms-core-camel
+ opennms-core-ipc-twin-common
+ mvn:org.opennms.core.ipc.twin.jms/org.opennms.core.ipc.twin.jms.subscriber/${project.version}
+
+
+
+ guava
+ json-patch
+ mvn:com.google.protobuf/protobuf-java/${protobufVersion}
+ mvn:org.opennms.core.ipc.twin/org.opennms.core.ipc.twin.api/${project.version}
+ mvn:org.opennms.core.ipc.twin/org.opennms.core.ipc.twin.common/${project.version}
+
+
+
+ mvn:com.fasterxml.jackson.core/jackson-core/2.11.0
+ mvn:com.fasterxml.jackson.core/jackson-annotations/2.11.0
+ mvn:com.fasterxml.jackson.core/jackson-databind/2.11.0
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/3.0.2_1
+ wrap:mvn:com.github.java-json-tools/btf/1.3
+ wrap:mvn:com.github.java-json-tools/msg-simple/1.2
+ wrap:mvn:com.github.java-json-tools/jackson-coreutils/2.0$overwrite=merge&Import-Package=*;
+ wrap:mvn:com.github.java-json-tools/json-patch/1.13$overwrite=merge&Import-Package=*;resolution:=optional&Export-Package=com.github.fge.jsonpatch.diff,com.github.fge.jsonpatch
+
+
+
+ opennms-core-ipc-sink-camel
+ opennms-core-ipc-rpc-jms
+ opennms-core-ipc-twin-jms
+
+
+ opennms-core-ipc-sink-kafka
+ opennms-core-ipc-rpc-kafka
+ opennms-core-ipc-twin-kafka
+
+
+
+ opennms-kafka
+ opennms-core-ipc-twin-common
+ mvn:org.opennms.core.ipc.common/org.opennms.core.ipc.common.kafka/${project.version}
+ mvn:org.opennms.core.ipc.twin.kafka/org.opennms.core.ipc.twin.kafka.common/${project.version}
+ mvn:org.opennms.core/org.opennms.core.sysprops/${project.version}
+ mvn:com.google.protobuf/protobuf-java/${protobufVersion}
+
+
+ opennms-core-ipc-twin-kafka-common
+ mvn:org.opennms.core.ipc.twin.kafka/org.opennms.core.ipc.twin.kafka.subscriber/${project.version}
+
+
+
+ mvn:org.opennms.core.ipc.twin/org.opennms.core.ipc.twin.shell/${project.version}
+
diff --git a/container/features/src/main/resources/karaf/spring-legacy.xml b/container/features/src/main/resources/karaf/spring-legacy.xml
deleted file mode 100644
index c9fad267265d..000000000000
--- a/container/features/src/main/resources/karaf/spring-legacy.xml
+++ /dev/null
@@ -1,781 +0,0 @@
-
-
-
-
-
-
- mvn:org.ops4j.pax.web/pax-web-features/${paxWebVersion}/xml/features
-
-
- mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/standard
-
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.9_1
- mvn:org.springframework.osgi/spring-osgi-io/1.2.1
- mvn:org.springframework.osgi/spring-osgi-core/1.2.1
- mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
- mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
-
- deployer
- mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/4.2.11
-
-
- bundle
- mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/4.2.11
-
-
-
-
- spring-dm
- spring-web
- http
- mvn:org.springframework.osgi/spring-osgi-web/1.2.1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.springframework/spring-core/3.1.4.RELEASE
- mvn:org.springframework/spring-asm/3.1.4.RELEASE
- mvn:org.springframework/spring-expression/3.1.4.RELEASE
- mvn:org.springframework/spring-beans/3.1.4.RELEASE
- mvn:org.springframework/spring-aop/3.1.4.RELEASE
- mvn:org.springframework/spring-context/3.1.4.RELEASE
- mvn:org.springframework/spring-context-support/3.1.4.RELEASE
-
-
-
- spring
- mvn:org.springframework/spring-aspects/3.1.4.RELEASE
-
-
-
- spring
- mvn:org.springframework/spring-instrument/3.1.4.RELEASE
-
-
-
- spring-tx
- mvn:org.springframework/spring-jdbc/3.1.4.RELEASE
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.springframework/spring-jms/3.1.4.RELEASE
-
-
-
- spring-web
- war
- mvn:commons-collections/commons-collections/3.2.2
- mvn:commons-beanutils/commons-beanutils/1.9.4
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.struts/1.3.10_1
- mvn:org.springframework/spring-struts/3.1.4.RELEASE
-
-
-
- spring
- mvn:org.springframework/spring-test/3.1.4.RELEASE
-
-
-
- spring-jdbc
- mvn:org.springframework/spring-orm/3.1.4.RELEASE
-
-
-
- spring
- mvn:org.springframework/spring-oxm/3.1.4.RELEASE
-
-
-
- spring
- mvn:org.springframework/spring-tx/3.1.4.RELEASE
-
-
-
- spring
- http
- mvn:org.springframework/spring-web/3.1.4.RELEASE
- mvn:org.springframework/spring-webmvc/3.1.4.RELEASE
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.springframework/spring-webmvc-portlet/3.1.4.RELEASE
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/3.2.18.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/3.2.18.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/3.2.18.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/3.2.18.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/3.2.18.RELEASE_1
-
-
-
- spring-web
- war
- mvn:commons-collections/commons-collections/3.2.2
- mvn:commons-beanutils/commons-beanutils/1.9.4
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.struts/1.3.10_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-struts/3.2.18.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/3.2.18.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/3.2.18.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/3.2.18.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/3.2.18.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/3.2.18.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/3.2.18.RELEASE_1
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/3.2.18.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.0.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.0.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.0.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.0.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.0.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.0.9.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.0.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.0.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.0.9.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.0.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.0.9.RELEASE_1
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.0.9.RELEASE_1
-
-
-
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.0.9.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.1.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.1.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.1.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.1.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.1.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.1.9.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.1.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.1.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.1.9.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.1.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.1.9.RELEASE_1
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.1.9.RELEASE_1
-
-
-
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.1.9.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.2.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.2.9.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.2.9.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.2.9.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.2.9.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.2.9.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.2.9.RELEASE_1
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.2.9.RELEASE_1
-
-
-
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.2.9.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.3.30.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.3.30.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:javax.websocket/javax.websocket-api/1.1
- mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
- mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.3.30.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.3.30.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.3.30.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.3.30.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.3.30.RELEASE_1
-
-
-
- wrap
- spring-web
- wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.3.30.RELEASE_1
-
-
-
- mvn:javax.websocket/javax.websocket-api/1.1
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.3.30.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/5.0.20.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/5.0.20.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:javax.websocket/javax.websocket-api/1.1
- mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
- mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/5.0.20.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/5.0.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/5.0.20.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/5.0.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/5.0.20.RELEASE_1
-
-
-
- mvn:javax.websocket/javax.websocket-api/1.1
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/5.0.20.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/5.1.20.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/5.1.20.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:javax.websocket/javax.websocket-api/1.1
- mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
- mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/5.1.20.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/5.1.20.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/5.1.20.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/5.1.20.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/5.1.20.RELEASE_1
-
-
-
- mvn:javax.websocket/javax.websocket-api/1.1
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/5.1.20.RELEASE_1
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/5.2.13.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/5.2.13.RELEASE_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:javax.websocket/javax.websocket-api/1.1
- mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
- mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/5.2.13.RELEASE_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/5.2.13.RELEASE_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/5.2.13.RELEASE_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/5.2.13.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/5.2.13.RELEASE_1
-
-
-
- mvn:javax.websocket/javax.websocket-api/1.1
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/5.2.13.RELEASE_1
-
-
-
-
-
- war
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
- mvn:org.springframework.security/spring-security-core/3.1.4.RELEASE
- mvn:org.springframework.security/spring-security-config/3.1.4.RELEASE
- mvn:org.springframework.security/spring-security-web/3.1.4.RELEASE
- mvn:org.springframework.security/spring-security-acl/3.1.4.RELEASE
- mvn:org.springframework.security/spring-security-taglibs/3.1.4.RELEASE
-
-
-
- war
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/4.2.4.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/4.2.4.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/4.2.4.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/4.2.4.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/4.2.4.RELEASE_1
-
-
-
- war
- spring-jdbc
- spring-tx
- spring-web
- mvn:javax.annotation/javax.annotation-api/1.3
- mvn:com.fasterxml.jackson.core/jackson-core/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-databind/2.10.5
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/5.3.1.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/5.3.1.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/5.3.1.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/5.3.1.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/5.3.1.RELEASE_1
-
-
-
diff --git a/container/features/src/main/resources/karaf/spring.xml b/container/features/src/main/resources/karaf/spring.xml
deleted file mode 100755
index de6d346fa228..000000000000
--- a/container/features/src/main/resources/karaf/spring.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
-
-
-
-
-
- mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/standard
-
-
-
-
-
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/5.3.4_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/5.3.4_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/5.3.4_1
-
-
-
- spring-tx
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/5.3.4_1
-
-
-
- spring-tx
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/5.3.4_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/5.3.4_1
-
-
-
- spring
- mvn:javax.websocket/javax.websocket-api/1.1
- mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
- mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/5.3.4_1
-
-
-
- spring-jdbc
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/5.3.4_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/5.3.4_1
-
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/5.3.4_1
-
-
-
- spring
- http
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/5.3.4_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/5.3.4_1
-
-
-
- mvn:javax.websocket/javax.websocket-api/1.1
- spring-web
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/5.3.4_1
-
-
-
-
-
- war
- spring-jdbc
- spring-tx
- spring-web
- mvn:javax.annotation/javax.annotation-api/1.3
- mvn:com.fasterxml.jackson.core/jackson-core/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-databind/2.10.5
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/5.4.2_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/5.4.2_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/5.4.2_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/5.4.2_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/5.4.2_1
-
-
-
- war
- spring-jdbc
- spring-tx
- spring-web
- mvn:com.fasterxml.jackson.core/jackson-core/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-annotations/2.10.5
- mvn:com.fasterxml.jackson.core/jackson-databind/2.10.5
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/5.1.5.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/5.1.5.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/5.1.5.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/5.1.5.RELEASE_1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/5.1.5.RELEASE_1
-
-
-
-
-
- aries-blueprint
- spring
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.spring/0.6.0
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.spring.extender/0.4.0
-
-
-
diff --git a/container/features/src/main/resources/karaf/standard.xml b/container/features/src/main/resources/karaf/standard.xml
deleted file mode 100644
index 8a9d0de0da45..000000000000
--- a/container/features/src/main/resources/karaf/standard.xml
+++ /dev/null
@@ -1,1770 +0,0 @@
-
-
-
-
-
-
- mvn:org.ops4j.pax.web/pax-web-features/${paxWebVersion}/xml/features
-
-
-
- mvn:org.apache.felix/org.apache.felix.framework.security/2.6.1
-
-
-
- jaas-boot
- aries-proxy
- mvn:org.apache.karaf.service/org.apache.karaf.service.guard/4.2.11
-
-
-
-
- mvn:org.ow2.asm/asm/9.1
- mvn:org.ow2.asm/asm-util/9.1
- mvn:org.ow2.asm/asm-tree/9.1
- mvn:org.ow2.asm/asm-analysis/9.1
- mvn:org.ow2.asm/asm-commons/9.1
- mvn:org.apache.aries.proxy/org.apache.aries.proxy/1.1.9
-
-
-
- aries-proxy
- mvn:org.apache.aries/org.apache.aries.util/1.1.3
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.3.2
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.10.3
-
- bundle
- mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.2.11
-
-
- osgi.service;effective:=active;objectClass=org.apache.aries.blueprint.services.ParserService,
- osgi.extender; osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"
-
-
-
-
- mvn:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.11
- mvn:org.apache.karaf.features/org.apache.karaf.features.core/4.2.11
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This file describes the features repository URL
-# It could be directly installed using feature:repo-add command
-#
-enterprise=mvn:org.apache.karaf.features/enterprise/${karaf.version}/xml/features
-enterprise-legacy=mvn:org.apache.karaf.features/enterprise-legacy/${karaf.version}/xml/features
-spring=mvn:org.apache.karaf.features/spring/${karaf.version}/xml/features
-spring-legacy=mvn:org.apache.karaf.features/spring-legacy/${karaf.version}/xml/features
-cellar=mvn:org.apache.karaf.cellar/apache-karaf-cellar/RELEASE/xml/features
-cave=mvn:org.apache.karaf.cave/apache-karaf-cave/RELEASE/xml/features
-camel=mvn:org.apache.camel.karaf/apache-camel/RELEASE/xml/features
-camel-extras=mvn:org.apache-extras.camel-extra.karaf/camel-extra/RELEASE/xml/features
-cxf=mvn:org.apache.cxf.karaf/apache-cxf/RELEASE/xml/features
-cxf-dosgi=mvn:org.apache.cxf.dosgi/cxf-dosgi/RELEASE/xml/features
-cxf-dosgi-samples=mvn:org.apache.cxf.dosgi/cxf-dosgi-samples/RELEASE/xml/features
-cxf-xkms=mvn:org.apache.cxf.services.xkms/cxf-services-xkms-features/RELEASE/xml
-activemq=mvn:org.apache.activemq/activemq-karaf/RELEASE/xml/features
-jclouds=mvn:org.apache.jclouds.karaf/jclouds-karaf/RELEASE/xml/features
-openejb=mvn:org.apache.openejb/openejb-feature/RELEASE/xml/features
-wicket=mvn:org.ops4j.pax.wicket/features/RELEASE/xml/features
-hawtio=mvn:io.hawt/hawtio-karaf/RELEASE/xml/features
-pax-cdi=mvn:org.ops4j.pax.cdi/pax-cdi-features/RELEASE/xml/features
-pax-jdbc=mvn:org.ops4j.pax.jdbc/pax-jdbc-features/RELEASE/xml/features
-pax-jms=mvn:org.ops4j.pax.jms/pax-jms-features/RELEASE/xml/features
-pax-jpa=mvn:org.ops4j.pax.jpa/pax-jpa-features/RELEASE/xml/features
-pax-transx=mvn:org.ops4j.pax.transx/pax-transx-features/RELEASE/xml/features
-pax-keycloak=mvn:org.ops4j.pax.keycloak/pax-keycloak-features/RELEASE/xml/features
-pax-web=mvn:org.ops4j.pax.web/pax-web-features/RELEASE/xml/features
-pax-wicket=mvn:org.ops4j.pax.wicket/pax-wicket-features/RELEASE/xml/features
-ecf=http://download.eclipse.org/rt/ecf/RELEASE/site.p2/karaf-features.xml
-decanter=mvn:org.apache.karaf.decanter/apache-karaf-decanter/RELEASE/xml/features
-eclipsesource-jaxrs=mvn:com.eclipsesource.jaxrs/features/RELEASE/xml/features
-aries-jpa=mvn:org.apache.aries.jpa/jpa-features/RELEASE/xml/features
-aries-rsa=mvn:org.apache.aries.rsa/rsa-features/RELEASE/xml/features
-hibernate=mvn:org.hibernate/hibernate-osgi/RELEASE/xml/karaf
-ignite=mvn:org.apache.ignite/ignite-osgi-karaf/RELEASE/xml/features
-openjpa=mvn:org.apache.openjpa/openjpa-features/RELEASE/xml/features
-artemis=mvn:org.apache.activemq/artemis-features/RELEASE/xml/features
-brave=mvn:io.zipkin.brave.karaf/brave-features/RELEASE/xml/features
-sling=mvn:org.apache.sling/org.apache.sling.karaf-features/RELEASE/xml/features
-
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the feature subshell
-#
-install = admin
-uninstall = admin
-start = admin
-stop = admin
-
- mvn:org.apache.karaf.features/org.apache.karaf.features.command/4.2.11
-
-
-
-
-
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.boot/4.2.11
-
-
-
-
- jaas-boot
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the shell subshell
-#
-nano = admin
-exec = admin
-new = admin
-java = admin
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for scope bundles
-#
-features=org.apache.karaf.features.command
-jaas=org.apache.karaf.jaas.command
-admin=org.apache.karaf.admin.command
-osgi=org.apache.karaf.shell.osgi
-log=org.apache.karaf.shell.log
-packages=org.apache.karaf.shell.packages
-config=org.apache.karaf.shell.config
-ssh=org.apache.karaf.shell.ssh
-shell=org.apache.karaf.shell.commands
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# These properties are used to configure Karaf's ssh shell.
-#
-
-#
-# Via sshPort and sshHost you define the address you can login into Karaf.
-#
-sshPort = ${env:ORG_APACHE_KARAF_SSH_SSHPORT:-8101}
-sshHost = ${env:ORG_APACHE_KARAF_SSH_SSHHOST:-0.0.0.0}
-
-#
-# The sshIdleTimeout defines the inactivity timeout to logout the SSH session.
-# The sshIdleTimeout is in milliseconds, and the default is set to 30 minutes.
-#
-sshIdleTimeout = ${env:ORG_APACHE_KARAF_SSH_SSHIDLETIMEOUT:-1800000}
-
-#
-# Define the number of the NIO workers for the sshd server. Default is 2.
-#
-#nio-workers = 2
-
-#
-# Define the maximum number of SSH sessions. Default is unlimited.
-#
-#max-concurrent-sessions = -1
-
-#
-# sshRealm defines which JAAS domain to use for password authentication.
-#
-sshRealm = ${env:ORG_APACHE_KARAF_SSH_SSHREALM:-karaf}
-
-#
-# sshRole defines the role required to access the console through ssh
-#
-sshRole = ${env:ORG_APACHE_KARAF_SSH_SSHROLE:-ssh}
-
-#
-# Defines if the SFTP system is enabled or not in the SSH server
-#
-sftpEnabled = ${env:ORG_APACHE_KARAF_SSH_SFTPENABLED:-true}
-
-#
-# The location of the hostKey file defines where the private key of the server
-# is located. If no file is at the defined location it will be ignored.
-#
-hostKey = ${karaf.etc}/host.key
-
-#
-# The location of the hostKeyPub file defines where the public key of the server
-# is located. If no file is at the defined location it will be ignored.
-#
-#hostKeyPub = ${karaf.etc}/host.key.pub
-
-#
-# Self defined key size in 1024, 2048, 3072, or 4096
-# If not set, this defaults to 2048.
-#
-# keySize = 2048
-
-#
-# Specify host key algorithm, defaults to RSA
-#
-# algorithm = RSA
-
-#
-# Specify the client log level (default is WARN)
-# 0: ERROR
-# 1: WARN
-# 2: INFO
-# 3: DEBUG
-# 4: TRACE
-#
-#logLevel = 1
-
-#
-# Specify an additional welcome banner to be displayed when a user logs into the server.
-#
-# welcomeBanner =
-
-#
-# Defines the completion mode on the Karaf shell console. The possible values are:
-# - GLOBAL: it's the same behavior as in previous Karaf releases. The completion displays all commands and all aliases
-# ignoring if you are in a subshell or not.
-# - FIRST: the completion displays all commands and all aliases only when you are not in a subshell. When you are
-# in a subshell, the completion displays only the commands local to the subshell.
-# - SUBSHELL: the completion displays only the subshells on the root level. When you are in a subshell, the completion
-# displays only the commands local to the subshell.
-# This property define the default value when you use the Karaf shell console.
-# You can change the completion mode directly in the shell console, using shell:completion command.
-#
-completionMode = ${env:ORG_APACHE_KARAF_SHELL_COMPLETIONMODE:-GLOBAL}
-
-#
-# Override allowed SSH cipher algorithms.
-# Default: aes256-ctr,aes192-ctr,aes128-ctr
-#
-# ciphers = aes256-ctr,aes192-ctr,aes128-ctr
-
-#
-# Override allowed SSH HMAC algorithms.
-# Default: hmac-sha2-512,hmac-sha2-256
-#
-# macs = hmac-sha2-512,hmac-sha2-256
-
-#
-# Override allowed SSH key exchange algorithms.
-# Default: ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
-#
-# kexAlgorithms = ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
-
-#
-# Override moduli-url.
-# Default: moduli-url not specified to use the internal one from SSHD
-#
-# moduli-url = external moduli-url users wanna use
-
-
- jline
- mvn:org.apache.karaf.shell/org.apache.karaf.shell.core/4.2.11
- mvn:org.apache.karaf.shell/org.apache.karaf.shell.commands/4.2.11
-
-
-
- mvn:org.fusesource.jansi/jansi/1.18
- mvn:org.jline/jline-terminal/3.19.0
- mvn:org.jline/jline-terminal-jansi/3.19.0
- mvn:org.jline/jline-reader/3.19.0
- mvn:org.jline/jline-builtins/3.19.0
-
-
-
- aries-blueprint
- shell
- mvn:org.apache.karaf.shell/org.apache.karaf.shell.console/4.2.11
- mvn:org.apache.karaf.shell/org.apache.karaf.shell.table/4.2.11
-
-
-
- mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.features/4.2.11
-
- wrap
- mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.wrap/4.2.11
-
-
- req:osgi.extender;filter:="(&(osgi.extender=osgi.blueprint)(version>=1.0))"
- mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.blueprint/4.2.11
-
-
- kar
- mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/4.2.11
-
-
-
-
- mvn:org.apache.karaf.wrapper/org.apache.karaf.wrapper.core/4.2.11
-
-
- wrapper
-
-
-
- mvn:org.apache.felix/org.osgi.service.obr/1.0.2
- mvn:org.apache.felix/org.apache.felix.bundlerepository/2.0.10
- mvn:org.apache.karaf.obr/org.apache.karaf.obr.core/4.2.11
- mvn:org.ops4j.pax.url/pax-url-obr/2.6.7/jar/uber
-
-
-
- jaas-boot
- mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.core/4.2.11
-
- management
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# JMX ACL specific to the org.apache.karaf:type=bundle,name=* MBean which maps to the Karaf MBean
-# to control OSGi bundles.
-#
-install = manager
-refresh = manager
-resolve = manager
-restart = manager
-setStartLevel(java.lang.String, int)[/([1-4])?[0-9]/,/.*/] = admin
-setStartLevel = manager
-start(java.lang.String)[/([1-4])?[0-9]/] = admin
-start = manager
-stop(java.lang.String)[/([1-4])?[0-9]/] = admin
-stop = manager
-uninstall(java.lang.String)["0"] = #this is a comment, no roles can perform this operation
-uninstall = admin
-update(java.lang.String)[/([1-4])?[0-9]/] = admin
-update(java.lang.String,java.lang.String)[/([1-4])?[0-9]/,/.*/] = admin
-update = manager
-
-
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the bundle subshell
-#
-# For an explanation of the syntax of this file, see the file:
-# org.apache.karaf.command.acl.system.cfg
-#
-# This configuration relies on the fact that 'system' bundles need to be managed
-# with the
-# -f (--force)
-# flag. Operations with -f need admin permission. Most of these operations without
-# the 'force' option can be done by a manager.
-install = admin
-refresh[/.*[-][f].*/] = admin
-refresh = manager
-restart[/.*[-][f].*/] = admin
-restart = manager
-start[/.*[-][f].*/] = admin
-start = manager
-stop[/.*[-][f].*/] = admin
-stop = manager
-uninstall[/.*[-][f].*/] = admin
-uninstall = manager
-update[/.*[-][f].*/] = admin
-update = manager
-watch = admin
-
-
-
-
-
- mvn:org.apache.karaf.config/org.apache.karaf.config.core/4.2.11
-
- management
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# JMX ACL specific to the org.apache.karaf:type=config,name=* MBean which maps to the Karaf MBean to interact with the
-# OSGi Config Admin service.
-#
-# For a description of the format of this file, see jmx.acl.cfg
-#
-# By default, only an admin can make changes to the JMX ACL and shell command rules, but managers can make
-# changes to other PIDs.
-#
-appendProperty(java.lang.String,java.lang.String,java.lang.String)[/jmx[.]acl.*/,/.*/,/.*/] = admin
-appendProperty(java.lang.String,java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl.+/,/.*/,/.*/] = admin
-appendProperty(java.lang.String,java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl.+/,/.*/,/.*/] = admin
-appendProperty(java.lang.String,java.lang.String,java.lang.String) = manager
-create(java.lang.String)[/jmx[.]acl.*/] = admin
-create(java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl.+/] = admin
-create(java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl.+/] = admin
-create(java.lang.String) = manager
-delete(java.lang.String)[/jmx[.]acl.*/] = admin
-delete(java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl.+/] = admin
-delete(java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl.+/] = admin
-delete(java.lang.String) = manager
-deleteProperty(java.lang.String,java.lang.String)[/jmx[.]acl.*/,/.*/] = admin
-deleteProperty(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl.+/,/.*/] = admin
-deleteProperty(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl.+/,/.*/] = admin
-deleteProperty(java.lang.String,java.lang.String) = manager
-setProperty(java.lang.String,java.lang.String,java.lang.String)[/jmx[.]acl.*/,/.*/,/.*/] = admin
-setProperty(java.lang.String,java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl.+/,/.*/,/.*/] = admin
-setProperty(java.lang.String,java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl.+/,/.*/,/.*/] = admin
-setProperty(java.lang.String,java.lang.String,java.lang.String) = manager
-update(java.lang.String,java.util.Map)[/jmx[.]acl.*/,/.*/] = admin
-update(java.lang.String,java.util.Map)[/org[.]apache[.]karaf[.]command[.]acl.+/,/.*/] = admin
-update(java.lang.String,java.util.Map)[/org[.]apache[.]karaf[.]service[.]acl.+/,/.*/] = admin
-update(java.lang.String,java.util.Map) = manager
-
-
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for various commands in the config subshell
-#
-# For an explanation of the syntax of this file, see the file:
-# org.apache.karaf.command.acl.system.cfg
-#
-cancel = manager
-delete = admin
-edit = manager
-edit[/.*jmx[.]acl.*/] = admin
-edit[/.*org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-edit[/.*org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-property-append = manager
-property-append[/.*jmx[.]acl.*/] = admin
-property-append[/.*org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-property-append[/.*org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-property-delete = manager
-property-delete[/.*jmx[.]acl.*/] = admin
-property-delete[/.*org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-property-delete[/.*org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-property-set = manager
-property-set[/.*jmx[.]acl.*/] = admin
-property-set[/.*org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-property-set[/.*org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-update = manager
-
-
-
-
-
- mvn:org.apache.karaf.diagnostic/org.apache.karaf.diagnostic.core/4.2.11
-
- mvn:org.apache.karaf.diagnostic/org.apache.karaf.diagnostic.boot/4.2.11
-
-
-
-
- mvn:org.apache.karaf.instance/org.apache.karaf.instance.core/4.2.11
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# Boolean enabling / disabling encrypted passwords
-#
-encryption.enabled = ${env:ORG_APACHE_KARAF_JAAS_ENCRYPTION_ENABLED:-false}
-
-#
-# Encryption Service name
-# the default one is 'basic'
-# a more powerful one named 'jasypt' is available
-# when installing the encryption feature
-#
-encryption.name = ${env:ORG_APACHE_KARAF_JAAS_ENCRYPTION_NAME:-basic}
-
-#
-# Encryption prefix
-#
-encryption.prefix = {CRYPT}
-
-#
-# Encryption suffix
-#
-encryption.suffix = {CRYPT}
-
-#
-# Set the encryption algorithm to use in Karaf JAAS login module
-# Supported encryption algorithms follow:
-# MD2
-# MD5
-# SHA-1
-# SHA-256
-# SHA-384
-# SHA-512
-#
-encryption.algorithm = ${env:ORG_APACHE_KARAF_JAAS_ENCRYPTION_ALGORITHM:-MD5}
-
-#
-# Encoding of the encrypted password.
-# Can be:
-# hexadecimal
-# base64
-#
-encryption.encoding = ${env:ORG_APACHE_KARAF_JAAS_ENCRYPTION_ENCODING:-hexadecimal}
-
- jaas-boot
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.config/4.2.11
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/4.2.11
-
- aries-blueprint
- mvn:org.apache.karaf.jaas.blueprint/org.apache.karaf.jaas.blueprint.config/4.2.11
-
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the jaas subshell
-# Jaas commands commands have no effect until update is called.
-update = admin
-
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.command/4.2.11
-
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file is used to configure the default values for the log:display
-# and log:exception-display commands.
-#
-
-#
-# The number of log statements to be displayed using log:display. It also defines the number
-# of lines searched for exceptions using log:exception-display. You can override this value
-# at runtime using -n in log:display.
-#
-size = "500"
-
-#
-# The pattern used to format the log statement when using log:display. This pattern is according
-# to the log4j layout. You can override this parameter at runtime using log:display with -p.
-#
-color.fatal = "bright red"
-color.error = "bright red"
-color.warn = "bright yellow"
-color.info = "bright green"
-color.debug = "cyan"
-color.trace = "cyan"
-pattern = "\u001b[90m%d{HH:mm:ss.SSS}\u001b[0m %h{%p}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %m%n"
-
- mvn:org.apache.karaf.log/org.apache.karaf.log.core/4.2.11
-
-
-
- mvn:org.apache.karaf.package/org.apache.karaf.package.core/4.2.11
-
-
-
- mvn:org.apache.karaf.service/org.apache.karaf.service.core/4.2.11
-
-
-
- mvn:org.apache.karaf.system/org.apache.karaf.system.core/4.2.11
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the system subshell
-#
-property = admin
-shutdown = admin
-start-level[/.*[1-9][0-9][0-9]+.*/] = manager # manager can set startlevels above 100
-start-level[/[^0-9]*/] = viewer # viewer can obtain the current start level
-start-level = admin # admin can set any start level, including < 100
-
-
-
-
-
-
-
- opennms-bridge-http-service
- http-service
-
-
-
- mvn:org.apache.felix/org.apache.felix.httplite.complete/0.1.6
- http-service;provider:=felix-httplite
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-org.osgi.service.http.port=${env:ORG_APACHE_FELIX_HTTP_ORG_OSGI_SERVICE_HTTP_PORT:-8181}
-
- mvn:org.apache.felix/org.apache.felix.http.servlet-api/1.1.2
- mvn:org.apache.felix/org.apache.felix.http.jetty/4.1.4
- mvn:org.apache.felix/org.apache.felix.http.whiteboard/4.0.0
- http-service;provider:=felix-http
-
- webconsole
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.2.11
-
-
-
-
-
-
-
- mvn:javax.servlet/javax.servlet-api/3.1.0
- mvn:org.apache.felix/org.apache.felix.http.bridge/${felixBridgeVersion}
-
- http-service;provider:=pax-http
-
- webconsole
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.http/4.2.11
-
-
-
-
- http
-
- opennms-http-whiteboard
-
-
-
- http
- pax-war
- mvn:org.apache.karaf.web/org.apache.karaf.web.core/4.2.11
-
-
-
- opennms-bridge-http-service
-
-
-
-
-
-
- org.ops4j.pax.url.war.importPaxLoggingPackages=true
-
-
- opennms-http-whiteboard
- mvn:javax.el/javax.el-api/3.0.0
-
- mvn:org.ops4j.pax.web/pax-web-extender-war/7.2.19
- mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/7.2.19
- mvn:org.ops4j.pax.web/pax-web-deployer/7.2.19
- mvn:org.ops4j.pax.url/pax-url-war/2.6.1/jar/uber
-
-
-
- mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.9.0
- mvn:javax.servlet/javax.servlet-api/3.1.0
- mvn:javax.mail/mail/1.4.7
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:javax.annotation/javax.annotation-api/1.3
- mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1
- mvn:org.ow2.asm/asm/9.1
- mvn:org.ow2.asm/asm-util/9.1
- mvn:org.ow2.asm/asm-commons/9.1
- mvn:org.ow2.asm/asm-tree/9.1
- mvn:org.ow2.asm/asm-analysis/9.1
- mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.3.2
- mvn:org.eclipse.jetty/jetty-continuation/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-http/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-io/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-jaspi/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-plus/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-jndi/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-rewrite/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-security/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-server/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-servlet/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-servlets/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-util/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-util-ajax/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-webapp/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-jaas/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-xml/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-client/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-deploy/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-jmx/9.4.38.v20210224
- mvn:org.eclipse.jetty/jetty-proxy/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/websocket-server/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/websocket-client/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/websocket-common/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/websocket-servlet/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/websocket-api/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/javax-websocket-server-impl/9.4.38.v20210224
- mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.4.38.v20210224
- mvn:javax.websocket/javax.websocket-api/1.1
-
-
-
-
-
- mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.9.0
- mvn:javax.servlet/javax.servlet-api/3.1.0
- mvn:javax.mail/mail/1.4.7
- mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
- mvn:org.apache.geronimo.specs/geronimo-annotation_1.1_spec/1.0.1
- mvn:org.apache.geronimo.specs/geronimo-jaspic_1.0_spec/1.1
- mvn:org.eclipse.jetty.aggregate/jetty-all-server/8.1.14.v20131031
-
-
-
- mvn:org.apache.karaf.kar/org.apache.karaf.kar.core/4.2.11
-
- shell
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for commands in the kar subshell
-#
-# For an explanation of the syntax of this file, see the file:
-# org.apache.karaf.command.acl.system.cfg
-#
-install = admin
-uninstall = admin
-
-
-
-
-
- jaas-boot
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-# The JAAS realm name to use for authentication
-realm=${env:ORG_APACHE_KARAF_WEBCONSOLE_REALM:-karaf}
-
-# The role required to access the WebConsole
-role=${env:ORG_APACHE_KARAF_WEBCONSOLE_ROLE:-admin}
-
- http
- mvn:org.apache.felix/org.apache.felix.metatype/1.2.4
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/4.2.11
- mvn:org.apache.felix/org.apache.felix.webconsole.plugins.memoryusage/1.0.10
-
- instance
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.instance/4.2.11
-
-
- shell
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/4.2.11
-
-
- feature
- mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/4.2.11
-
-
-
-
- shell
- jaas
- mvn:org.apache.sshd/sshd-osgi/2.5.1
- mvn:org.apache.sshd/sshd-scp/2.5.1
- mvn:org.apache.sshd/sshd-sftp/2.5.1
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.not-yet-commons-ssl/0.3.11_1
- mvn:org.bouncycastle/bcprov-jdk15on/1.66
- mvn:org.bouncycastle/bcpkix-jdk15on/1.66
- mvn:org.apache.karaf.shell/org.apache.karaf.shell.ssh/4.2.11
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# Generic JMX ACL
-#
-# This file defines the roles required for MBean operations for MBeans that
-# do not have this defined explicitly.
-#
-# The definition of ACLs for JMX operations works as follows:
-#
-# The required roles for JMX operations are defined in configuration files
-# read via OSGi ConfigAdmin.
-#
-# JMX RBAC-related configuration is prefixed with jmx.acl and based on the
-# JMX ObjectName that it applies to. For example specific configuration for
-# an MBean with the following objectName: foo.bar:type=Test can be placed in
-# a configuration file called jmx.acl.foo.bar.Test.cfg. More generic
-# configuration can be placed in the domain (e.g. jmx.acl.foo.bar.cfg) or
-# at the top level (jmx.acl.cfg). A simple configuration file looks like
-# this:
-# test : admin
-# getVal : manager, viewer
-#
-# The system looks for required roles using the following process:
-# The most specific configuration file/pid is tried first. E.g. in the
-# above example the jmx.acl.foo.bar.Test.cfg is looked at first. In this
-# configuration, the system looks for a:
-# 1. Specific match for the current invocation, e.g. test(int)["17"] : role1
-# 2. Reg exp match for the current invocation, e.g. test(int)[/[0-9]/] : role2
-# In both cases the passed argument is converted to a String for the
-# comparison.
-# If any of the above match all the roles with matching definitions
-# are collected and allowed. If no matches are found the following is tried:
-# 3. Signature match for the invocation, e.g. test(int) : role3. If
-# matched the associated roles are used.
-# 4. Method name match for the invocation, e.g. test : role4. If matched
-# the associated roles are used.
-# 5. A method name wildcard match, e.g. te* : role5. For all the
-# wildcard matches found in the current configuration file, the roles
-# associated with the longest match are used. So if you have te* and * and
-# the method invoked is 'test', then the roles defined with te* are used,
-# not the ones defined with *.
-# If no matching definition is found in the current configuration file, a
-# more general configuration file is looked for. So jmx.acl.foo.bar.cfg is
-# tried next, this matches the domain of the MBean. If there is no match
-# found in the domain the most generic configuration file is consulted
-# (jmx.acl.cfg).
-# If a matching definition is found, this is used and the process will not
-# look for any other matching definitions. So the most specific definition
-# always takes precedence.
-#
-list* = viewer
-get* = viewer
-is* = viewer
-set* = admin
-* = admin
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# JMX ACL specific to the org.apache.karaf:type=security,area=jmx MBean which
-# can be used to find out whether the currently logged in JMX user can invoke
-# the requested JMX operations.
-#
-# For a description of the format of this file, see jmx.acl.cfg
-#
-canInvoke = viewer
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# JMX ACL specific to the java.lang.Memory MBean
-#
-# For a description of the format of this file, see jmx.acl.cfg
-#
-gc = manager
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# JMX ACL specific to osgi.compendium.cm MBean
-#
-# For a description of the format of this file, see jmx.acl.cfg
-#
-# This configuration file configures the management of ConfigAdmin via the standard ConfigAdmin MBean
-# Such that only an admin can make changes to the JMX ACL rules, but managers can make
-# changes to other PIDs.
-#
-createFactoryConfiguration(java.lang.String)[/jmx[.]acl.*/] = admin
-createFactoryConfiguration(java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-createFactoryConfiguration(java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-createFactoryConfiguration(java.lang.String) = manager
-createFactoryConfigurationForLocation(java.lang.String,java.lang.String)[/jmx[.]acl.*/,/.*/] = admin
-createFactoryConfigurationForLocation(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl[.].+/,/.*/] = admin
-createFactoryConfigurationForLocation(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl[.].+/,/.*/] = admin
-createFactoryConfigurationForLocation(java.lang.String,java.lang.String) = manager
-delete(java.lang.String)[/jmx[.]acl.*/] = admin
-delete(java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl[.].+/] = admin
-delete(java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl[.].+/] = admin
-delete(java.lang.String) = manager
-deleteConfigurations = admin
-deleteForLocation(java.lang.String,java.lang.String)[/jmx[.]acl.*/,/.*/] = admin
-deleteForLocation(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]command[.]acl[.].+/,/.*/] = admin
-deleteForLocation(java.lang.String,java.lang.String)[/org[.]apache[.]karaf[.]service[.]acl[.].+/,/.*/] = admin
-deleteForLocation(java.lang.String,java.lang.String) = manager
-update(java.lang.String,javax.management.openmbean.TabularData)[/jmx[.]acl.*/,/.*/] = admin
-update(java.lang.String,javax.management.openmbean.TabularData)[/org[.]apache[.]karaf[.]command[.]acl[.].+/,/.*/] = admin
-update(java.lang.String,javax.management.openmbean.TabularData)[/org[.]apache[.]karaf[.]service[.]acl[.].+/,/.*/] = admin
-update(java.lang.String,javax.management.openmbean.TabularData) = manager
-updateForLocation(java.lang.String,java.lang.String,javax.management.openmbean.TabularData)[/jmx[.]acl.*/,/.*/,/.*/] = admin
-updateForLocation(java.lang.String,java.lang.String,javax.management.openmbean.TabularData)[/org[.]apache[.]karaf[.]command[.]acl[.].+/,/.*/,/.*/] = admin
-updateForLocation(java.lang.String,java.lang.String,javax.management.openmbean.TabularData)[/org[.]apache[.]karaf[.]service[.]acl[.].+/,/.*/,/.*/] = admin
-updateForLocation(java.lang.String,java.lang.String,javax.management.openmbean.TabularData) = manager
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# The properties in this file define the configuration of Apache Karaf's JMX Management
-#
-
-#
-# Port number for RMI registry connection
-#
-rmiRegistryPort = ${env:ORG_APACHE_KARAF_MANAGEMENT_RMIREGISTRYPORT:-1099}
-
-#
-# Host for RMI registry
-#
-rmiRegistryHost = ${env:ORG_APACHE_KARAF_MANAGEMENT_RMIREGISTRYHOST:-127.0.0.1}
-
-#
-# Port number for RMI connector server connection
-#
-rmiServerPort = ${env:ORG_APACHE_KARAF_MANAGEMENT_RMISERVERPORT:-44444}
-
-#
-# Host for RMI connector server
-#
-rmiServerHost = ${env:ORG_APACHE_KARAF_MANAGEMENT_RMISERVERHOST:-127.0.0.1}
-
-#
-# Name of the JAAS realm used for authentication
-#
-jmxRealm = ${env:ORG_APACHE_KARAF_MANAGEMENT_JMXREALM:-karaf}
-
-#
-# The service URL for the JMX RMI connector
-#
-serviceUrl = service:jmx:rmi://${rmiServerHost}:${rmiServerPort}/jndi/rmi://${rmiRegistryHost}:${rmiRegistryPort}/karaf-${karaf.name}
-
-#
-# JMXMP connector enabled
-#
-jmxmpEnabled = ${env:ORG_APACHE_KARAF_MANAGEMENT_JMXMPENABLED:-false}
-
-#
-# JMXMP connector host name
-#
-jmxmpHost = ${env:ORG_APACHE_KARAF_MANAGEMENT_JMXMPHOST:-127.0.0.1}
-
-#
-# JMXMP connector port number
-#
-jmxmpPort = ${env:ORG_APACHE_KARAF_MANAGEMENT_JMXMPPORT:-9999}
-
-#
-# JMXMP connector service URL
-#
-jmxmpServiceUrl = service:jmx:jmxmp://${jmxmpHost}:${jmxmpPort}
-
-#
-# Whether any threads started for the JMXConnectorServer should be started as daemon threads
-#
-daemon = ${env:ORG_APACHE_KARAF_MANAGEMENT_DAEMON:-true}
-
-#
-# Whether the JMXConnectorServer should be started in a separate thread
-#
-threaded = ${env:ORG_APACHE_KARAF_MANAGEMENT_THREADED:-true}
-
-#
-# The ObjectName used to register the JMX RMI connector
-#
-objectName = connector:name=rmi
-
-#
-# The ObjectName used to register the JMXMP connector
-#
-jmxmpObjectName = connector:name=jmxmp
-
-#
-# Timeout to lookup for the keystore in case of SSL authentication usage
-#
-#keyStoreAvailabilityTimeout = 5000
-
-#
-# The type of authentication
-#
-#authenticatorType = password
-
-#
-# Enable or not SSL/TLS
-#
-#secured = false
-
-#
-# Secure algorithm to use
-#
-#secureAlgorithm = default
-
-#
-# Secure protocol to use
-#
-#secureProtocol = TLS
-
-#
-# Keystore to use for secure mode
-#
-#keyStore = karaf.ks
-
-#
-# Alias of the key to use in the keystore
-#
-#keyAlias = karaf
-
-#
-# Truststore to use for secure mode
-#
-#trustStore = karaf.ts
-
-#
-# Create the JMX RMI registry
-#
-#createRmiRegistry = true
-
-#
-# Locate the JMX RMI registry
-#
-#locateRmiRegistry = true
-
-#
-# Locate an existing MBean server if possible (usefull when Karaf is embedded)
-#
-#locateExistingMBeanServerIfPossible = true
-
- jaas
- mvn:org.apache.aries/org.apache.aries.util/1.1.3
- mvn:org.apache.karaf.management/org.apache.karaf.management.server/4.2.11
- mvn:org.apache.aries.jmx/org.apache.aries.jmx.api/1.1.5
- mvn:org.apache.aries.jmx/org.apache.aries.jmx.core/1.1.8
- mvn:org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/1.2.0
-
- aries-blueprint
- mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.api/1.2.0
- mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.core/1.2.0
-
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#============================================================================
-# Configure Karaf Scheduler Properties
-#============================================================================
-org.quartz.scheduler.instanceName=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_SCHEDULER_INSTANCENAME:-Karaf}
-org.quartz.scheduler.instanceId=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_SCHEDULER_INSTANCEID:-AUTO}
-
-#============================================================================
-# Configure ThreadPool
-#============================================================================
-org.quartz.threadPool.class=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_THREADPOOL_CLASS:-org.quartz.simpl.SimpleThreadPool}
-org.quartz.threadPool.threadCount=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_THREADPOOL_THREADCOUNT:-30}
-org.quartz.threadPool.threadPriority=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_THREADPOOL_THREADPRIORITY:-5}
-
-#============================================================================
-# Configure JobStore
-#============================================================================
-org.quartz.jobStore.class=${env:ORG_APACHE_KARAF_SCHEDULER_QUARTZ_ORG_QUARTZ_JOBSTORE_CLASS:-org.quartz.simpl.RAMJobStore}
-
- mvn:org.apache.karaf.scheduler/org.apache.karaf.scheduler.core/4.2.11
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-org.apache.felix.eventadmin.AddTimestamp=${env:ORG_APACHE_FELIX_EVENTADMIN_IMPL_EVENTADMIN_ORG_APACHE_FELIX_EVENTADMIN_ADDTIMESTAMP:-true}
-org.apache.felix.eventadmin.AddSubject=${env:ORG_APACHE_FELIX_EVENTADMIN_IMPL_EVENTADMIN_ORG_APACHE_FELIX_EVENTADMIN_ADDSUBJECT:-true}
-
- mvn:org.apache.felix/org.apache.felix.metatype/1.2.4
- mvn:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.2.11
-
- shell
- mvn:org.apache.karaf/org.apache.karaf.event/4.2.11
-
-
- webconsole
- mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.1.8
-
-
-
-
- jaas
- mvn:commons-codec/commons-codec/1.15
- mvn:commons-lang/commons-lang/2.6
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.9.3_1
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.jasypt/4.2.11
-
- aries-blueprint
- mvn:org.apache.karaf.jaas.blueprint/org.apache.karaf.jaas.blueprint.jasypt/4.2.11
-
-
- spring
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt-spring31/1.9.3_1
-
-
-
-
- jaas
- mvn:org.bouncycastle/bcprov-jdk15on/1.66
- mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-crypto/5.3.1.RELEASE_1
- mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.spring-security-crypto/4.2.11
-
-
-
- mvn:org.osgi/org.osgi.util.function/1.1.0
- mvn:org.osgi/org.osgi.util.promise/1.1.1
- mvn:org.apache.felix/org.apache.felix.metatype/1.2.4
- mvn:org.apache.felix/org.apache.felix.scr/2.1.26
-
- management
- mvn:org.apache.karaf.scr/org.apache.karaf.scr.management/4.2.11
-
-
- webconsole
- mvn:org.apache.felix/org.apache.felix.inventory/1.0.6
- mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/2.1.0
-
-
- bundle
- mvn:org.apache.karaf.scr/org.apache.karaf.scr.state/4.2.11
-
-
- osgi.service;effective:=active;objectClass=org.apache.felix.scr.ScrService,
- osgi.extender;osgi.extender="osgi.component";uses:="org.osgi.service.component";version:Version="1.2.1"
-
-
-
-
- war
- aries-blueprint
- mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.webosgi/1.0.1
-
-
-
- mvn:org.ops4j.pax.url/pax-url-wrap/2.6.7/jar/uber
-
-
-
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-profilesDirectory = ${karaf.home}/profiles
-
- mvn:org.apache.karaf.profile/org.apache.karaf.profile.core/4.2.11
- mvn:org.apache.karaf.tooling/org.apache.karaf.tools.utils/4.2.11
- mvn:commons-io/commons-io/${commonsIoVersion}
-
-
-
- http
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-org.jolokia.user=${env:ORG_JOLOKIA_OSGI_ORG_JOLOKIA_USER:-karaf}
-org.jolokia.realm=${env:ORG_JOLOKIA_OSGI_ORG_JOLOKIA_REALM:-karaf}
-org.jolokia.authMode=${env:ORG_JOLOKIA_OSGI_ORG_JOLOKIA_AUTHMODE:-jaas}
-
- mvn:org.jolokia/jolokia-osgi/1.6.2
-
-
-
- shell
- mvn:org.apache.karaf.maven/org.apache.karaf.maven.core/4.2.11
- mvn:org.apache.commons/commons-lang3/3.11
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-#
-# This configuration file defines the ACLs for maven configuration commands
-#
-summary[/.*[-][x].*/] = admin
-summary = viewer
-http-proxy-list[/.*[-][x].*/] = admin
-http-proxy-list = viewer
-repository-list[/.*[-][x].*/] = admin
-repository-list = viewer
-http-proxy = admin
-password = admin
-repository-add = admin
-repository-change = admin
-repository-remove = admin
-
-
-
-
- eventadmin
- mvn:org.apache.karaf.audit/org.apache.karaf.audit.core/4.2.11
-
-################################################################################
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-
-# Security audit configuration
-# Only the above 4 loggers are supported
-# Supported layouts include: simple, gelf, rfc3164, rfc5424
-
-# Queue type
-queue.class = java.util.concurrent.ArrayBlockingQueue
-# Queue size
-queue.size = 256
-# Idle timeout
-runner.idle-timeout = 60000
-# Flush timeout
-runner.flush-timeout = 100
-# Event filter
-# filter = (!(type=log))
-
-# File logger
-file.enabled = true
-file.target = ${karaf.log}/audit.txt
-file.encoding = UTF-8
-file.layout.type = simple
-# rotating policy: can be 'daily', 'size([0-9]+(kb|mb|gb)?\)'
-file.policy = daily
-file.files = 32
-file.compress = false
-
-# Tcp logger
-# tcp.enabled = true
-# tcp.host = localhost
-# tcp.port = 8125
-# tcp.encoding = UTF-8
-# tcp.layout.type = gelf
-
-# Udp logger
-# udp.enabled = true
-# udp.host = localhost
-# udp.port = 514
-# udp.encoding = UTF-8
-# udp.layout.type = rfc3164
-
-# JUL logger
-jul.enabled = false
-jul.logger = audit
-jul.level = info
-jul.layout.type = simple
-
-
-
-
- war
- mvn:org.apache.karaf/manual/4.2.11
-
-
-
- wrap
- aries-blueprint
- shell
- shell-compat
- feature
- jaas
- ssh
- management
- bundle
- config
- deployer
- diagnostic
- feature
- instance
- kar
- log
- package
- service
- system
-
-
-
- jaas
- shell
- feature
- ssh
- management
- bundle
- config
- deployer
- diagnostic
- instance
- kar
- log
- package
- service
- system
-
-
-
diff --git a/container/features/src/main/resources/spring-legacy.xml b/container/features/src/main/resources/spring-legacy.xml
new file mode 100644
index 000000000000..ee7bb6d2e788
--- /dev/null
+++ b/container/features/src/main/resources/spring-legacy.xml
@@ -0,0 +1,540 @@
+
+
+ mvn:org.ops4j.pax.web/pax-web-features/${paxWebVersion}/xml/features
+ mvn:org.apache.karaf.features/standard/${karafVersion}/xml/features
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/3.2.9_1
+
+ mvn:org.springframework.osgi/spring-osgi-io/1.2.1
+ mvn:org.springframework.osgi/spring-osgi-core/1.2.1
+ mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
+ mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
+
+ deployer
+ mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/4.3.2
+
+
+ bundle
+ mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.springstate/4.3.2
+
+
+
+
+ spring-dm
+ spring-web
+ mvn:org.springframework.osgi/spring-osgi-web/1.2.1
+ osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"
+
+
+
+
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
+
+ mvn:org.springframework/spring-core/3.1.4.RELEASE
+ mvn:org.springframework/spring-asm/3.1.4.RELEASE
+ mvn:org.springframework/spring-expression/3.1.4.RELEASE
+ mvn:org.springframework/spring-beans/3.1.4.RELEASE
+ mvn:org.springframework/spring-aop/3.1.4.RELEASE
+ mvn:org.springframework/spring-context/3.1.4.RELEASE
+ mvn:org.springframework/spring-context-support/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:org.springframework/spring-aspects/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:org.springframework/spring-instrument/3.1.4.RELEASE
+
+
+
+ spring-tx
+ mvn:org.springframework/spring-jdbc/3.1.4.RELEASE
+
+
+
+ spring-tx
+ mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
+ mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
+ mvn:org.springframework/spring-jms/3.1.4.RELEASE
+
+
+
+ spring-web
+ pax-web-war
+ mvn:commons-collections/commons-collections/3.2.2
+ mvn:commons-beanutils/commons-beanutils/1.9.4
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.struts/1.3.10_1
+
+ mvn:org.springframework/spring-struts/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:org.springframework/spring-test/3.1.4.RELEASE
+
+
+
+ spring-jdbc
+ mvn:org.springframework/spring-orm/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:org.springframework/spring-oxm/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:org.springframework/spring-tx/3.1.4.RELEASE
+
+
+
+ spring
+ mvn:javax.servlet/javax.servlet-api/3.1.0
+ mvn:org.springframework/spring-web/3.1.4.RELEASE
+ mvn:org.springframework/spring-webmvc/3.1.4.RELEASE
+ osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"
+
+
+
+ pax-url-wrap
+ spring-web
+
+ wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
+
+ mvn:org.springframework/spring-webmvc-portlet/3.1.4.RELEASE
+
+
+
+
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.2.9.RELEASE_1
+
+
+
+
+ spring-tx
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.2.9.RELEASE_1
+
+
+
+
+ spring-tx
+ mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
+ mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.2.9.RELEASE_1
+
+
+
+
+ spring-jdbc
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.2.9.RELEASE_1
+
+
+
+
+ spring
+ http
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.2.9.RELEASE_1
+
+
+
+
+ wrap
+ spring-web
+
+ wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.2.9.RELEASE_1
+
+
+
+
+ spring-web
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.2.9.RELEASE_1
+
+
+
+
+
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.3.30.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.3.30.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.3.30.RELEASE_1
+
+
+
+
+ spring-tx
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.3.30.RELEASE_1
+
+
+
+
+ spring-tx
+ mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
+ mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.3.30.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/4.3.30.RELEASE_1
+
+
+
+
+ spring
+ mvn:javax.websocket/javax.websocket-api/1.1
+ mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
+ mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.3.30.RELEASE_1
+
+
+
+
+ spring-jdbc
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.3.30.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.3.30.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.3.30.RELEASE_1
+
+
+
+
+ spring
+ mvn:javax.servlet/javax.servlet-api/3.1.0
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.3.30.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.3.30.RELEASE_1
+
+ osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"
+
+
+
+ pax-url-wrap
+ spring-web
+
+ wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.3.30.RELEASE_1
+
+
+
+
+ mvn:javax.websocket/javax.websocket-api/1.1
+ spring-web
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.3.30.RELEASE_1
+
+
+
+
+
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/5.2.13.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/5.2.13.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/5.2.13.RELEASE_1
+
+
+
+
+ spring-tx
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/5.2.13.RELEASE_1
+
+
+
+
+ spring-tx
+ mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
+ mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/5.2.13.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/5.2.13.RELEASE_1
+
+
+
+
+ spring
+ mvn:javax.websocket/javax.websocket-api/1.1
+ mvn:org.apache.httpcomponents/httpcore-osgi/4.4.6
+ mvn:org.apache.httpcomponents/httpclient-osgi/4.5.2
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/5.2.13.RELEASE_1
+
+
+
+
+ spring-jdbc
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/5.2.13.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/5.2.13.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/5.2.13.RELEASE_1
+
+
+
+
+ spring
+ mvn:javax.servlet/javax.servlet-api/3.1.0
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/5.2.13.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/5.2.13.RELEASE_1
+
+ osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1"
+
+
+
+ mvn:javax.websocket/javax.websocket-api/1.1
+ spring-web
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/5.2.13.RELEASE_1
+
+
+
+
+
+
+ pax-web-war
+ spring-web
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
+
+ mvn:org.springframework.security/spring-security-core/3.1.4.RELEASE
+ mvn:org.springframework.security/spring-security-config/3.1.4.RELEASE
+ mvn:org.springframework.security/spring-security-web/3.1.4.RELEASE
+ mvn:org.springframework.security/spring-security-acl/3.1.4.RELEASE
+ mvn:org.springframework.security/spring-security-taglibs/3.1.4.RELEASE
+
+
+
+ pax-web-war
+ spring-web
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/4.2.4.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/4.2.4.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/4.2.4.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/4.2.4.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/4.2.4.RELEASE_1
+
+
+
+
+ pax-web-war
+ spring-jdbc
+ spring-tx
+ spring-web
+ mvn:javax.annotation/javax.annotation-api/1.3
+ mvn:com.fasterxml.jackson.core/jackson-core/2.11.4
+ mvn:com.fasterxml.jackson.core/jackson-annotations/2.11.4
+ mvn:com.fasterxml.jackson.core/jackson-databind/2.11.4
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/1.9.5_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-core/5.3.3.RELEASE_2
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-config/5.3.3.RELEASE_2
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-web/5.3.3.RELEASE_2
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-acl/5.3.3.RELEASE_2
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-security-taglibs/5.3.3.RELEASE_2
+
+
+
\ No newline at end of file
diff --git a/container/features/src/main/resources/spring.xml b/container/features/src/main/resources/spring.xml
new file mode 100644
index 000000000000..c326385c0540
--- /dev/null
+++ b/container/features/src/main/resources/spring.xml
@@ -0,0 +1,121 @@
+
+
+ mvn:org.apache.karaf.features/standard/${karafVersion}/xml/features
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-core/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-expression/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-beans/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-context-support/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aspects/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-instrument/4.2.9.RELEASE_1
+
+
+
+
+ spring-tx
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jdbc/4.2.9.RELEASE_1
+
+
+
+
+ spring-tx
+ mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
+ mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-jms/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-messaging/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test/4.2.9.RELEASE_1
+
+
+
+
+ spring-jdbc
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-orm/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-oxm/4.2.9.RELEASE_1
+
+
+
+
+ spring
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-tx/4.2.9.RELEASE_1
+
+
+
+
+ spring
+ http
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-web/4.2.9.RELEASE_1
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc/4.2.9.RELEASE_1
+
+
+
+
+ wrap
+ spring-web
+
+ wrap:mvn:javax.portlet/portlet-api/2.0$Export-Package=javax.portlet.*;version=2.0
+
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-webmvc-portlet/4.2.9.RELEASE_1
+
+
+
+
+ spring-web
+
+ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-websocket/4.2.9.RELEASE_1
+
+
+
\ No newline at end of file
diff --git a/container/jaas-login-module/pom.xml b/container/jaas-login-module/pom.xml
index e6c4fda92e78..f97b23e54a42 100644
--- a/container/jaas-login-module/pom.xml
+++ b/container/jaas-login-module/pom.xml
@@ -7,7 +7,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container
@@ -53,7 +53,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/container/karaf/README.markdown b/container/karaf/README.markdown
index 5bb16bcbcbcf..cf5cca603de4 100644
--- a/container/karaf/README.markdown
+++ b/container/karaf/README.markdown
@@ -3,33 +3,19 @@
To upgrade our container to use a new base Karaf version, follow these steps.
1. Download and unpack the new Karaf tar.gz file.
-1. Run these commands to see the differences in the Karaf etc files:
+2. Run these commands to see the differences in the Karaf etc files:
diff -r $KARAF_DIR/etc $SRC_DIR/container/karaf/src/main/filtered-resources/etc
diff -r $KARAF_DIR/etc $SRC_DIR/features/container/minion/src/main/filtered-resources/etc
diff -r $KARAF_DIR/etc $SRC_DIR/features/container/sentinel/src/main/filtered-resources/etc
-1. Apply any relevant changes to the files inside each etc file.
-1. Copy the new Karaf "standard" features.xml file into the features project:
+3. Apply any relevant changes to the files inside each etc file.
- cp $KARAF_DIR/system/org/apache/karaf/features/standard/$KARAF_VERSION/standard-$KARAF_VERSION-features.xml $SRC_DIR/container/features/src/main/resources/karaf/standard.xml
-
-1. Restore the HTTP bridge changes to the features.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
-1. Copy the new Karaf "spring" features.xml file into the features project:
-
- cp $KARAF_DIR/system/org/apache/karaf/features/spring/$KARAF_VERSION/spring-$KARAF_VERSION-features.xml $SRC_DIR/container/features/src/main/resources/karaf/spring.xml
-
-1. Remove the unmodified standard features repo from the spring.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
-1. Copy the new Karaf "spring-legacy" features.xml file into the features project:
-
- cp $KARAF_DIR/system/org/apache/karaf/features/spring-legacy/$KARAF_VERSION/spring-legacy-$KARAF_VERSION-features.xml $SRC_DIR/container/features/src/main/resources/karaf/spring-legacy.xml
-
-1. Remove the unmodified standard features repo from the spring-legacy.xml file by making all of the changes between the OPENNMS CUSTOMIZATION comment blocks.
-1. Update the ```karaf-maven-plugin``` configuration inside ```$SRC_DIR/container/karaf/pom.xml``` so that it matches the default Karaf assembly from with our additions.
-1. Update the ```karaf-maven-plugin``` configuration inside ```$SRC_DIR/features/minion/container/karaf/pom.xml``` so that it matches the default Karaf assembly from with our additions.
-1. Update the list of repo features inside ```$SRC_DIR/container/features/pom.xml```, ```$SRC_DIR/core/test-api/karaf/pom.xml```, and ```$SRC_DIR/opennms-full-assembly/pom.xml```.
-1. Update the Karaf version inside ```$SRC_DIR/core/test-api/karaf/src/main/java/org/opennms/core/test/karaf/KarafTestCase.java```.
-1. Update ```$SRC_DIR/pom.xml``` with new value for `````` property.
-1. Update ```$SRC_DIR/smoke-test/pom.xml``` with new value for `````` property.
+4. Update the ```karaf-maven-plugin``` configuration inside ```$SRC_DIR/container/karaf/pom.xml``` so that it matches the default Karaf assembly from with our additions.
+5. Update the ```karaf-maven-plugin``` configuration inside ```$SRC_DIR/features/minion/container/karaf/pom.xml``` so that it matches the default Karaf assembly from with our additions.
+6. Update the list of repo features inside ```$SRC_DIR/container/features/pom.xml```, ```$SRC_DIR/core/test-api/karaf/pom.xml```, and ```$SRC_DIR/opennms-full-assembly/pom.xml```.
+7. Update the Karaf version inside ```$SRC_DIR/core/test-api/karaf/src/main/java/org/opennms/core/test/karaf/KarafTestCase.java```.
+8. Update ```$SRC_DIR/pom.xml``` with new value for `````` property.
+9. Update ```$SRC_DIR/smoke-test/pom.xml``` with new value for `````` property.
See commit dea910701c3f48e367636b507fc575b59e70b843 for an example of an upgrade.
diff --git a/container/karaf/pom.xml b/container/karaf/pom.xml
index 1b6648741d8b..64cf7896ed76 100644
--- a/container/karaf/pom.xml
+++ b/container/karaf/pom.xml
@@ -6,7 +6,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.container
@@ -36,8 +36,9 @@
true
-
- mvn:org.opennms.karaf/opennms/${project.version}/xml/standard
+
+ mvn:org.apache.karaf.features/standard/${karafVersion}/xml/features
+
mvn:org.opennms.karaf/opennms/${project.version}/xml/springmvn:org.opennms.karaf/opennms/${project.version}/xml/spring-legacy
@@ -73,8 +74,7 @@
system
- http
- http-whiteboard
+ opennms-http-whiteboardmvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/2.11.0_1;type:=endorsed;export:=true;delegate:=true
@@ -195,13 +195,6 @@
-
- org.opennms.karaf
- opennms
- ${project.version}
- standard
- xml
- org.opennms.karafopennms
@@ -286,7 +279,7 @@
truecentralMaven Central
- http://maven.opennms.org/content/repositories/central/
+ https://maven.opennms.org/content/repositories/central/
diff --git a/container/karaf/src/main/filtered-resources/etc/config.properties b/container/karaf/src/main/filtered-resources/etc/config.properties
index 91ccd325b496..a9385b6dbc3a 100644
--- a/container/karaf/src/main/filtered-resources/etc/config.properties
+++ b/container/karaf/src/main/filtered-resources/etc/config.properties
@@ -50,18 +50,18 @@ karaf.framework=felix
#
# Location of the OSGi frameworks
#
-karaf.framework.equinox=mvn\:org.eclipse.platform/org.eclipse.osgi/3.12.100
-karaf.framework.felix=mvn\:org.apache.felix/org.apache.felix.framework/5.6.12
+karaf.framework.equinox=mvn\:org.eclipse.platform/org.eclipse.osgi/3.16.200
+karaf.framework.felix=mvn\:org.apache.felix/org.apache.felix.framework/6.0.4
#
# Framework config properties.
#
org.osgi.framework.system.packages= \
- org.osgi.dto;version="1.0",\
+ org.osgi.dto;version="1.1",\
org.osgi.resource;version="1.0",\
org.osgi.resource.dto;version="1.0";uses:="org.osgi.dto",\
- org.osgi.framework;version="1.8",\
- org.osgi.framework.dto;version="1.8";uses:="org.osgi.dto",\
+ org.osgi.framework;version="1.9",\
+ org.osgi.framework.dto;version="1.9";uses:="org.osgi.dto",\
org.osgi.framework.hooks.bundle;version="1.1";uses:="org.osgi.framework",\
org.osgi.framework.hooks.resolver;version="1.0";uses:="org.osgi.framework.wiring",\
org.osgi.framework.hooks.service;version="1.1";uses:="org.osgi.framework",\
@@ -71,17 +71,17 @@ org.osgi.framework.system.packages= \
org.osgi.framework.startlevel;version="1.0";uses:="org.osgi.framework",\
org.osgi.framework.startlevel.dto;version="1.0";uses:="org.osgi.dto",\
org.osgi.framework.wiring;version="1.2";uses:="org.osgi.framework,org.osgi.resource",\
- org.osgi.framework.wiring.dto;version="1.2";uses:="org.osgi.dto,org.osgi.resource.dto",\
+ org.osgi.framework.wiring.dto;version="1.3";uses:="org.osgi.dto,org.osgi.resource.dto",\
org.osgi.service.condpermadmin;version="1.1.1";uses:="org.osgi.framework,org.osgi.service.permissionadmin",\
org.osgi.service.packageadmin;version="1.2";uses:="org.osgi.framework",org.osgi.service.permissionadmin;version="1.2",\
- org.osgi.service.resolver;version="1.0";uses:="org.osgi.resource",\
+ org.osgi.service.resolver;version="1.1";uses:="org.osgi.resource",\
org.osgi.service.startlevel;version="1.1";uses:="org.osgi.framework",\
org.osgi.service.url;version="1.0",\
- org.osgi.util.tracker;version="1.5.1";uses:="org.osgi.framework",\
- org.apache.karaf.version;version="4.2.10",\
- org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.2.10",\
- org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.2.10",\
- org.apache.karaf.info;version="4.2.10",\
+ org.osgi.util.tracker;version="1.5.2";uses:="org.osgi.framework",\
+ org.apache.karaf.version;version="4.3.2",\
+ org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version="4.3.2",\
+ org.apache.karaf.jaas.boot;uses:="javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework";version="4.3.2",\
+ org.apache.karaf.info;version="4.3.2",\
${jre-${java.specification.version}}
#
@@ -92,10 +92,10 @@ org.osgi.framework.system.packages.extra = \
sun.misc, \
com.sun.jmx.remote.protocol, \
com.sun.jmx.remote.protocol.jmxmp, \
- org.apache.karaf.jaas.boot;uses:=\"javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework\";version=4.2.10, \
- org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.2.10, \
- org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.2.10, \
- org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.2.10
+ org.apache.karaf.diagnostic.core;uses:=org.osgi.framework;version=4.3.2, \
+ org.apache.karaf.diagnostic.core.common;uses:=org.apache.karaf.diagnostic.core;version=4.3.2, \
+ org.apache.karaf.jaas.boot.principal;uses:=javax.security.auth;version=4.3.2, \
+ org.apache.karaf.jaas.boot;uses:=\"javax.security.auth,javax.security.auth.callback,javax.security.auth.login,javax.security.auth.spi,org.osgi.framework\";version=4.3.2
org.osgi.framework.system.capabilities= \
${eecap-${java.specification.version}}, \
@@ -129,6 +129,12 @@ equinox-capabilities= \
osgi.service;objectClass:List=org.eclipse.osgi.service.security.TrustEngine;osgi.signedcontent.trust.engine=org.eclipse.osgi, \
osgi.service;objectClass:List=org.eclipse.osgi.service.urlconversion.URLConverter;protocol:List="bundleentry,bundleresource"
+eecap-16 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \
+ osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0", \
+ osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \
+ osgi.ee; osgi.ee="JavaSE/compact1"; version:List="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0", \
+ osgi.ee; osgi.ee="JavaSE/compact2"; version:List="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0", \
+ osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8,9.0,10.0,11.0,13.0,14.0,15.0,16.0"
eecap-15 = osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2", \
osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9.0,10.0,11.0,13.0,14.0,15.0", \
osgi.ee; osgi.ee="JRE"; version:List="1.0,1.1", \
@@ -173,20 +179,25 @@ eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum"; version:List="1.0,1.1,1.2",
osgi.ee; osgi.ee="JavaSE/compact3"; version:List="1.8"
#
-# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
+# javax.transaction is needed ONLY for com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException().
+# JDK8 and earlier provide only 3 exception classes in this package, so full JTA API bundles should always try the
+# bootdelegation first - even if they also package (and export) javax.transaction package
+#
+# boot delegation of javax.transaction.xa is needed to avoid class loader constraint violation when using javax.sql
+# and this package is always complete in all JDKs
#
org.osgi.framework.bootdelegation = \
com.sun.*, \
javax.transaction, \
- javax.transaction.*, \
+ javax.transaction.xa, \
javax.xml.crypto, \
javax.xml.crypto.*, \
jdk.nashorn.*, \
sun.*, \
jdk.internal.reflect, \
jdk.internal.reflect.*, \
- org.apache.karaf.jaas.boot, \
- org.apache.karaf.jaas.boot.principal
+ org.apache.karaf.jaas.boot.principal, \
+ org.apache.karaf.jaas.boot
# jVisualVM support
# in order to use Karaf with jvisualvm, the org.osgi.framework.bootdelegation property has to contain the org.netbeans.lib.profiler.server package
@@ -220,14 +231,19 @@ karaf.shutdown.port.file=${karaf.data}/port
#
# The location of the Karaf pid file
#
-karaf.pid.file=${karaf.log}/karaf.pid
+karaf.pid.file=${karaf.base}/karaf.pid
+
+#
+# Configuration secrets file location
+#
+org.apache.felix.configadmin.plugin.interpolation.secretsdir=${karaf.etc}
#
# Configuration FileMonitor properties
#
felix.fileinstall.enableConfigSave = true
felix.fileinstall.dir = ${karaf.etc}
-felix.fileinstall.filter = .*\\.(cfg|config)
+felix.fileinstall.filter = .*\\.(cfg|config|json)
felix.fileinstall.poll = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3
diff --git a/container/karaf/src/main/filtered-resources/etc/custom.properties b/container/karaf/src/main/filtered-resources/etc/custom.properties
index 21e3e97f6989..25aae387bdde 100644
--- a/container/karaf/src/main/filtered-resources/etc/custom.properties
+++ b/container/karaf/src/main/filtered-resources/etc/custom.properties
@@ -639,6 +639,8 @@ org.osgi.framework.system.packages.extra=org.apache.karaf.branding,\
org.opennms.netmgt.telemetry.protocols.bmp.persistence.api;version=${opennms.osgi.version},\
org.opennms.netmgt.threshd;version=${opennms.osgi.version},\
org.opennms.netmgt.threshd.api;version=${opennms.osgi.version},\
+ org.opennms.netmgt.timeseries;version=${opennms.osgi.version},\
+ org.opennms.netmgt.timeseries.stats;version=${opennms.osgi.version},\
org.opennms.api.integration.ticketing;version=${opennms.osgi.version},\
org.opennms.api.reporting;version=${opennms.osgi.version},\
org.opennms.api.reporting.parameter;version=${opennms.osgi.version},\
@@ -663,6 +665,8 @@ org.osgi.framework.system.packages.extra=org.apache.karaf.branding,\
org.opennms.core.resource;version=${opennms.osgi.version},\
org.opennms.core.resource.db;version=${opennms.osgi.version},\
org.opennms.core.ipc.sink.api;version=${opennms.osgi.version},\
+ org.opennms.core.ipc.twin.api;version=${opennms.osgi.version},\
+ org.opennms.core.ipc.twin.common;version=${opennms.osgi.version},\
org.opennms.core.rpc.api;version=${opennms.osgi.version},\
org.opennms.core.rpc.echo;version=${opennms.osgi.version},\
org.opennms.core.rpc.utils;version=${opennms.osgi.version},\
diff --git a/container/karaf/src/main/filtered-resources/etc/org.apache.karaf.features.cfg b/container/karaf/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
index bbb9247ac307..a3671ce3e455 100644
--- a/container/karaf/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
+++ b/container/karaf/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
@@ -22,7 +22,6 @@
# that point to the modified standard features.
# OPENNMS: Include the main product features file generated by the mvn:org.opennms.karaf/opennms project
featuresRepositories = \
- mvn:org.opennms.karaf/opennms/${project.version}/xml/standard, \
mvn:org.opennms.karaf/opennms/${project.version}/xml/spring, \
mvn:org.opennms.karaf/opennms/${project.version}/xml/spring-legacy, \
mvn:org.apache.karaf.features/framework/${karafVersion}/xml/features, \
@@ -42,7 +41,7 @@ featuresBoot = ( \
shell/${karafVersion}, \
management/${karafVersion}, \
service/${karafVersion}, \
- jaas/${karafVersion}, \
+ jaas-deployer/${karafVersion}, \
shell-compat,/${karafVersion} \
deployer/${karafVersion}, \
diagnostic/${karafVersion}, \
@@ -51,8 +50,7 @@ featuresBoot = ( \
config/${karafVersion}, \
kar/${karafVersion} \
), \
- http,\
- http-whiteboard,\
+ opennms-http-whiteboard,\
opennms-jaas-login-module,\
karaf-extender, \
opennms-osgi-core-rest, \
@@ -62,6 +60,7 @@ featuresBoot = ( \
opennms-collection-commands, \
opennms-core-ipc-rpc-commands, \
opennms-core-ipc-kafka-shell, \
+ opennms-core-ipc-twin-shell, \
opennms-dhcpd, \
opennms-events-commands, \
opennms-send-event-command, \
diff --git a/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg b/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg
index 9dc01f8bee65..5f160e44e16a 100644
--- a/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg
+++ b/container/karaf/src/main/filtered-resources/etc/org.ops4j.pax.logging.cfg
@@ -26,7 +26,7 @@ color.debug = cyan
color.trace = cyan
# Common pattern layout for appenders
-log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %encode{%.-500m}{CRLF}%n
log4j2.out.pattern = \u001b[90m%d{HH:mm:ss\.SSS}\u001b[0m %highlight{%-5level}{FATAL=${color.fatal}, ERROR=${color.error}, WARN=${color.warn}, INFO=${color.info}, DEBUG=${color.debug}, TRACE=${color.trace}} \u001b[90m[%t]\u001b[0m %msg%n%throwable
@@ -66,9 +66,9 @@ log4j2.logger.kafkaAdminClientConfig.level = ERROR
log4j2.logger.opennmsTopology.name = org.opennms.features.topology
log4j2.logger.opennmsTopology.level = WARN
-# OPENNMS: Display all WARN logs for our code
+# OPENNMS: Display all DEBUG logs for our code
log4j2.logger.opennms.name = org.opennms
-log4j2.logger.opennms.level = WARN
+log4j2.logger.opennms.level = DEBUG
# Appenders configuration
@@ -113,7 +113,7 @@ log4j2.appender.osgi.filter = *
#log4j2.logger.aether.name = shaded.org.eclipse.aether
#log4j2.logger.aether.level = TRACE
#log4j2.logger.http-headers.name = shaded.org.apache.http.headers
-#log4j2.logger.http-headers.level = WARN
+#log4j2.logger.http-headers.level = DEBUG
#log4j2.logger.maven.name = org.ops4j.pax.url.mvn
#log4j2.logger.maven.level = TRACE
diff --git a/container/karaf/src/main/filtered-resources/etc/startup.properties b/container/karaf/src/main/filtered-resources/etc/startup.properties
index 832ee03beb21..fb490127c611 100644
--- a/container/karaf/src/main/filtered-resources/etc/startup.properties
+++ b/container/karaf/src/main/filtered-resources/etc/startup.properties
@@ -1,17 +1,22 @@
# Bundles to be started on startup, with startlevel
-mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.11 = 1
-mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.2.11 = 5
+mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.3.2 = 1
+mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.3.2 = 5
mvn\:org.apache.felix/org.apache.felix.metatype/1.2.4 = 5
mvn\:org.ops4j.pax.url/pax-url-aether/2.6.7 = 5
-mvn\:org.ops4j.pax.logging/pax-logging-api/1.11.9 = 8
-mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.11.9 = 8
+mvn\:org.ops4j.pax.logging/pax-logging-api/2.0.9 = 8
+mvn\:org.ops4j.pax.logging/pax-logging-log4j2/2.0.9 = 8
mvn\:org.fusesource.jansi/jansi/1.18 = 8
mvn\:org.osgi/org.osgi.util.promise/1.1.1 = 9
mvn\:org.apache.felix/org.apache.felix.coordinator/1.0.2 = 9
+mvn\:org.apache.felix/org.apache.felix.converter/1.0.14 = 9
mvn\:org.osgi/org.osgi.util.function/1.1.0 = 9
-mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.20 = 10
-mvn\:org.apache.felix/org.apache.felix.fileinstall/3.6.8 = 11
-mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.2.11 = 15
+mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.22 = 10
+mvn\:org.apache.felix/org.apache.felix.configadmin.plugin.interpolation/1.1.2 = 11
+mvn\:org.apache.felix/org.apache.felix.configurator/1.0.14 = 11
+mvn\:org.apache.sling/org.apache.sling.commons.johnzon/1.2.6 = 11
+mvn\:org.apache.felix/org.apache.felix.cm.json/1.0.6 = 11
+mvn\:org.apache.felix/org.apache.felix.fileinstall/3.6.8 = 12
+mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.3.2 = 15
# OPENNMS: Add JNA bundles to prevent jline from refreshing (KARAF-5251)
mvn\:net.java.dev.jna/jna/${jnaVersion} = 5
diff --git a/container/pom.xml b/container/pom.xml
index ac1573b677e2..039a51f45a8c 100644
--- a/container/pom.xml
+++ b/container/pom.xml
@@ -3,7 +3,7 @@
org.opennmsopennms
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.container
diff --git a/container/servlet/pom.xml b/container/servlet/pom.xml
index 8683dd4aa11c..2bf78b9d0e07 100644
--- a/container/servlet/pom.xml
+++ b/container/servlet/pom.xml
@@ -6,7 +6,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container
@@ -22,12 +22,12 @@
org.osgi
- org.osgi.core
+ osgi.coreprovidedorg.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
diff --git a/container/shared/pom.xml b/container/shared/pom.xml
index 901e28b91552..f10266060f65 100644
--- a/container/shared/pom.xml
+++ b/container/shared/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.container
@@ -173,10 +173,10 @@
- org.apache.karaf.features
- spring
- ${karafVersion}
- features
+ org.opennms.karaf
+ opennms
+ ${project.version}
+ springxmlruntime
@@ -194,10 +194,10 @@
- org.apache.karaf.features
- spring-legacy
- ${karafVersion}
- features
+ org.opennms.karaf
+ opennms
+ ${project.version}
+ spring-legacyxmlruntime
diff --git a/container/shared/src/main/filtered-resources/etc/org.apache.karaf.features.cfg b/container/shared/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
index b256e024436b..1fbf8a0da68d 100644
--- a/container/shared/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
+++ b/container/shared/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
@@ -22,10 +22,10 @@
#
featuresRepositories = \
mvn:org.apache.karaf.features/framework/${karafVersion}/xml/features, \
- mvn:org.apache.karaf.features/spring/${karafVersion}/xml/features, \
mvn:org.opennms.karaf/opennms/${project.version}/xml/karaf-extensions, \
+ mvn:org.opennms.karaf/opennms/${project.version}/xml/spring, \
+ mvn:org.opennms.karaf/opennms/${project.version}/xml/spring-legacy
mvn:org.apache.karaf.features/standard/${karafVersion}/xml/features, \
- mvn:org.apache.karaf.features/spring-legacy/${karafVersion}/xml/features, \
mvn:io.hawt/hawtio-karaf/2.0.0/xml/features
#
@@ -56,6 +56,7 @@ featuresBoot = \
scv-shell/${project.version}, \
karaf-extender/${project.version}, \
hawtio-offline/2.0.0, \
+ http, \
jolokia/1.6.2
#
diff --git a/container/shared/src/main/filtered-resources/etc/startup.properties b/container/shared/src/main/filtered-resources/etc/startup.properties
index 832ee03beb21..fb490127c611 100644
--- a/container/shared/src/main/filtered-resources/etc/startup.properties
+++ b/container/shared/src/main/filtered-resources/etc/startup.properties
@@ -1,17 +1,22 @@
# Bundles to be started on startup, with startlevel
-mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.2.11 = 1
-mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.2.11 = 5
+mvn\:org.apache.karaf.features/org.apache.karaf.features.extension/4.3.2 = 1
+mvn\:org.apache.karaf.services/org.apache.karaf.services.eventadmin/4.3.2 = 5
mvn\:org.apache.felix/org.apache.felix.metatype/1.2.4 = 5
mvn\:org.ops4j.pax.url/pax-url-aether/2.6.7 = 5
-mvn\:org.ops4j.pax.logging/pax-logging-api/1.11.9 = 8
-mvn\:org.ops4j.pax.logging/pax-logging-log4j2/1.11.9 = 8
+mvn\:org.ops4j.pax.logging/pax-logging-api/2.0.9 = 8
+mvn\:org.ops4j.pax.logging/pax-logging-log4j2/2.0.9 = 8
mvn\:org.fusesource.jansi/jansi/1.18 = 8
mvn\:org.osgi/org.osgi.util.promise/1.1.1 = 9
mvn\:org.apache.felix/org.apache.felix.coordinator/1.0.2 = 9
+mvn\:org.apache.felix/org.apache.felix.converter/1.0.14 = 9
mvn\:org.osgi/org.osgi.util.function/1.1.0 = 9
-mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.20 = 10
-mvn\:org.apache.felix/org.apache.felix.fileinstall/3.6.8 = 11
-mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.2.11 = 15
+mvn\:org.apache.felix/org.apache.felix.configadmin/1.9.22 = 10
+mvn\:org.apache.felix/org.apache.felix.configadmin.plugin.interpolation/1.1.2 = 11
+mvn\:org.apache.felix/org.apache.felix.configurator/1.0.14 = 11
+mvn\:org.apache.sling/org.apache.sling.commons.johnzon/1.2.6 = 11
+mvn\:org.apache.felix/org.apache.felix.cm.json/1.0.6 = 11
+mvn\:org.apache.felix/org.apache.felix.fileinstall/3.6.8 = 12
+mvn\:org.apache.karaf.features/org.apache.karaf.features.core/4.3.2 = 15
# OPENNMS: Add JNA bundles to prevent jline from refreshing (KARAF-5251)
mvn\:net.java.dev.jna/jna/${jnaVersion} = 5
diff --git a/container/shared/src/main/resources/etc/org.ops4j.pax.url.mvn.cfg b/container/shared/src/main/resources/etc/org.ops4j.pax.url.mvn.cfg
index 50f9d4a6d4ff..aaa49dfdd09b 100644
--- a/container/shared/src/main/resources/etc/org.ops4j.pax.url.mvn.cfg
+++ b/container/shared/src/main/resources/etc/org.ops4j.pax.url.mvn.cfg
@@ -55,7 +55,7 @@ org.ops4j.pax.url.mvn.certificateCheck=true
# OPENNMS: Use a Maven repository relative to ${karaf.home} since
# the unprivileged users running the services may not have a "user.home"
# directory
-org.ops4j.pax.url.mvn.localRepository=${karaf.home}/.m2
+org.ops4j.pax.url.mvn.localRepository=${karaf.home}/.m2/repository
#
# Default this to false. It's just weird to use undocumented repos
diff --git a/container/spring-extender/pom.xml b/container/spring-extender/pom.xml
index 1896a6cfac83..8cd6663cf73d 100644
--- a/container/spring-extender/pom.xml
+++ b/container/spring-extender/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.container
@@ -33,7 +33,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/container/web/pom.xml b/container/web/pom.xml
index 7b0b0fefbb80..eaa3a2d382f4 100644
--- a/container/web/pom.xml
+++ b/container/web/pom.xml
@@ -7,7 +7,7 @@
org.opennmsorg.opennms.container
- 28.1.1
+ 29.0.0-SNAPSHOTorg.opennms.container
diff --git a/core/api/pom.xml b/core/api/pom.xml
index 667c131ae6af..e1d1971297da 100644
--- a/core/api/pom.xml
+++ b/core/api/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -41,7 +41,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/build/keystore/pom.xml b/core/build/keystore/pom.xml
index 49d96f19ad7d..51ad6ecbc4e1 100644
--- a/core/build/keystore/pom.xml
+++ b/core/build/keystore/pom.xml
@@ -3,7 +3,7 @@
org.opennms.coreorg.opennms.core.build
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.build
diff --git a/core/build/pom.xml b/core/build/pom.xml
index 4b8760896db0..30590b343560 100644
--- a/core/build/pom.xml
+++ b/core/build/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/cache/pom.xml b/core/cache/pom.xml
index cd020be255c5..f7073eb14eba 100644
--- a/core/cache/pom.xml
+++ b/core/cache/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -29,12 +29,12 @@
org.osgi
- org.osgi.core
+ osgi.coreprovidedorg.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
diff --git a/core/camel/pom.xml b/core/camel/pom.xml
index 7db787284757..aff1d6b2aa2d 100644
--- a/core/camel/pom.xml
+++ b/core/camel/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -52,7 +52,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/cli/pom.xml b/core/cli/pom.xml
index d28457c3afec..5f0cc77bf1eb 100644
--- a/core/cli/pom.xml
+++ b/core/cli/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/commands/pom.xml b/core/commands/pom.xml
index 7e54bbc3daf9..188339f9616c 100644
--- a/core/commands/pom.xml
+++ b/core/commands/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/config/pom.xml b/core/config/pom.xml
index e9356e0d7d12..d5ad8d534dae 100644
--- a/core/config/pom.xml
+++ b/core/config/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/criteria/pom.xml b/core/criteria/pom.xml
index 189c6433ff73..c13802a35595 100644
--- a/core/criteria/pom.xml
+++ b/core/criteria/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/daemon/pom.xml b/core/daemon/pom.xml
index 985c5ae4f238..0a8d4beda726 100644
--- a/core/daemon/pom.xml
+++ b/core/daemon/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/db-install/pom.xml b/core/db-install/pom.xml
index 9e438d607a6a..8f75f166209b 100644
--- a/core/db-install/pom.xml
+++ b/core/db-install/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/db/pom.xml b/core/db/pom.xml
index 2540fa843f89..202000feabfe 100644
--- a/core/db/pom.xml
+++ b/core/db/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -86,7 +86,7 @@
trueopennms-repoOpenNMS Repository
- http://maven.opennms.org/content/groups/opennms.org-release
+ https://maven.opennms.org/content/groups/opennms.org-release
diff --git a/core/grpc/common/pom.xml b/core/grpc/common/pom.xml
index 567bde497f31..5e3d2fcf0200 100644
--- a/core/grpc/common/pom.xml
+++ b/core/grpc/common/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.grpcorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
@@ -32,6 +32,11 @@
+
+ org.osgi
+ osgi.cmpn
+ provided
+ org.opennms.coreorg.opennms.core.lib
diff --git a/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServer.java b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServer.java
new file mode 100644
index 000000000000..7291609e8959
--- /dev/null
+++ b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServer.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.grpc.common;
+
+import io.grpc.BindableService;
+
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * This Interface allows us to have a common Grpc Server for all IPC Services.
+ */
+public interface GrpcIpcServer {
+
+ /**
+ * Starts server, this will not immediately start server but schedules server start after certain delay.
+ *
+ * @param bindableService The service that needs to be added */
+ void startServer(BindableService bindableService) throws IOException;
+
+ /**
+ * Stops the Server.
+ **/
+ void stopServer();
+
+ /**
+ * Get properties with which the service has started.
+ **/
+ Properties getProperties();
+}
diff --git a/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServerBuilder.java b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServerBuilder.java
new file mode 100644
index 000000000000..404b705db815
--- /dev/null
+++ b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcServerBuilder.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.grpc.common;
+
+import io.grpc.BindableService;
+import io.grpc.Server;
+import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
+import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
+import org.opennms.core.utils.PropertiesUtils;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLException;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.time.Duration;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+public class GrpcIpcServerBuilder implements GrpcIpcServer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(GrpcIpcServerBuilder.class);
+
+ private final ConfigurationAdmin configAdmin;
+ private Properties properties;
+ private NettyServerBuilder serverBuilder;
+ private Server server;
+ private final int port;
+ private final Duration delay;
+ private boolean serverStartScheduled = false;
+ private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+
+ private Set services = new HashSet<>();
+
+ public GrpcIpcServerBuilder(ConfigurationAdmin configAdmin, int port, String delay) {
+ this.configAdmin = configAdmin;
+ this.port = port;
+ this.delay = Duration.parse(delay);
+ this.properties = GrpcIpcUtils.getPropertiesFromConfig(configAdmin, GrpcIpcUtils.GRPC_SERVER_PID);
+ }
+
+ @Override
+ public synchronized void startServer(BindableService bindableService) throws IOException {
+ initializeServerFromConfig();
+ if (!services.contains(bindableService)) {
+ serverBuilder.addService(bindableService);
+ services.add(bindableService);
+ }
+ if (!serverStartScheduled) {
+ startServerWithDelay(delay.toMillis());
+ serverStartScheduled = true;
+ }
+ }
+
+ @Override
+ public synchronized void stopServer() {
+ if (server != null && !server.isShutdown()) {
+ server.shutdownNow();
+ }
+ services.clear();
+ serverStartScheduled = false;
+ }
+
+ private void initializeServerFromConfig() {
+ if (serverBuilder == null) {
+ int maxInboundMessageSize = PropertiesUtils.getProperty(properties, GrpcIpcUtils.GRPC_MAX_INBOUND_SIZE, GrpcIpcUtils.DEFAULT_MESSAGE_SIZE);
+ boolean tlsEnabled = PropertiesUtils.getProperty(properties, GrpcIpcUtils.TLS_ENABLED, false);
+ serverBuilder = NettyServerBuilder.forAddress(new InetSocketAddress(this.port))
+ .maxInboundMessageSize(maxInboundMessageSize);
+ if (tlsEnabled) {
+ SslContextBuilder sslContextBuilder = GrpcIpcUtils.getSslContextBuilder(properties);
+ if (sslContextBuilder != null) {
+ try {
+ serverBuilder.sslContext(sslContextBuilder.build());
+ LOG.info("TLS enabled for Grpc IPC Server");
+ } catch (SSLException e) {
+ LOG.error("Couldn't initialize ssl context from {}", properties, e);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public Properties getProperties() {
+ return properties;
+ }
+
+ private void startServerWithDelay(long delay) {
+ executor.schedule(this::startServerNow, delay, TimeUnit.MILLISECONDS);
+ }
+
+ private void startServerNow() {
+ server = serverBuilder.build();
+ try {
+ server.start();
+ LOG.info("OpenNMS IPC gRPC server started with {} services", services.size());
+ } catch (IOException e) {
+ LOG.error("Exception while starting IPC Grpc Server", e);
+ }
+ }
+}
diff --git a/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcUtils.java b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcUtils.java
new file mode 100644
index 000000000000..a66d7ee0b92b
--- /dev/null
+++ b/core/grpc/common/src/main/java/org/opennms/core/grpc/common/GrpcIpcUtils.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.grpc.common;
+
+import com.google.common.base.Strings;
+import io.grpc.ManagedChannel;
+import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts;
+import io.grpc.netty.shaded.io.grpc.netty.NegotiationType;
+import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder;
+import io.grpc.netty.shaded.io.netty.handler.ssl.ClientAuth;
+import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
+import io.grpc.netty.shaded.io.netty.handler.ssl.SslProvider;
+import org.opennms.core.utils.PropertiesUtils;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLException;
+import java.io.File;
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.Properties;
+
+public class GrpcIpcUtils {
+
+ private static final Logger LOG = LoggerFactory.getLogger(GrpcClientBuilder.class);
+ public static final String GRPC_CLIENT_PID = "org.opennms.core.ipc.grpc.client";
+ public static final String GRPC_SERVER_PID = "org.opennms.core.ipc.grpc.server";
+ public static final String LOG_PREFIX = "ipc";
+ public static final String GRPC_HOST = "host";
+ public static final String DEFAULT_GRPC_HOST = "localhost";
+ public static final String GRPC_PORT = "port";
+ public static final int DEFAULT_TWIN_GRPC_PORT = 8991;
+ public static final String TLS_ENABLED = "tls.enabled";
+ public static final String GRPC_MAX_INBOUND_SIZE = "max.message.size";
+ public static final int DEFAULT_MESSAGE_SIZE = 10485760;
+
+ public static final String CLIENT_CERTIFICATE_FILE_PATH = "client.cert.filepath";
+ public static final String CLIENT_PRIVATE_KEY_FILE_PATH = "client.private.key.filepath";
+ public static final String TRUST_CERTIFICATE_FILE_PATH = "trust.cert.filepath";
+
+ public static final String SERVER_CERTIFICATE_FILE_PATH = "server.cert.filepath";
+ public static final String PRIVATE_KEY_FILE_PATH = "server.private.key.filepath";
+
+ public static SslContextBuilder buildSslContext(Properties properties) throws SSLException {
+ SslContextBuilder builder = GrpcSslContexts.forClient();
+ String clientCertChainFilePath = properties.getProperty(CLIENT_CERTIFICATE_FILE_PATH);
+ String clientPrivateKeyFilePath = properties.getProperty(CLIENT_PRIVATE_KEY_FILE_PATH);
+ String trustCertCollectionFilePath = properties.getProperty(TRUST_CERTIFICATE_FILE_PATH);
+
+ if (!Strings.isNullOrEmpty(trustCertCollectionFilePath)) {
+ builder.trustManager(new File(trustCertCollectionFilePath));
+ }
+ if (!Strings.isNullOrEmpty(clientCertChainFilePath) && !Strings.isNullOrEmpty(clientPrivateKeyFilePath)) {
+ builder.keyManager(new File(clientCertChainFilePath), new File(clientPrivateKeyFilePath));
+ } else if (!Strings.isNullOrEmpty(clientCertChainFilePath) || !Strings.isNullOrEmpty(clientPrivateKeyFilePath)) {
+ LOG.error("Only one of the required file paths were provided, need both client cert and client private key");
+ }
+ return builder;
+ }
+
+ public static ManagedChannel getChannel(Properties properties, int port) throws IOException {
+ String host = PropertiesUtils.getProperty(properties, GRPC_HOST, GrpcIpcUtils.DEFAULT_GRPC_HOST);
+ int maxInboundMessageSize = PropertiesUtils.getProperty(properties, GrpcIpcUtils.GRPC_MAX_INBOUND_SIZE, GrpcIpcUtils.DEFAULT_MESSAGE_SIZE);
+ NettyChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(host, port)
+ .maxInboundMessageSize(maxInboundMessageSize)
+ .keepAliveWithoutCalls(true);
+ boolean tlsEnabled = Boolean.parseBoolean(properties.getProperty(TLS_ENABLED));
+ if (tlsEnabled) {
+ return channelBuilder
+ .negotiationType(NegotiationType.TLS)
+ .sslContext(buildSslContext(properties).build())
+ .build();
+ } else {
+ return channelBuilder.usePlaintext().build();
+ }
+ }
+
+ public static SslContextBuilder getSslContextBuilder(Properties properties) {
+ String certChainFilePath = properties.getProperty(GrpcIpcUtils.SERVER_CERTIFICATE_FILE_PATH);
+ String privateKeyFilePath = properties.getProperty(GrpcIpcUtils.PRIVATE_KEY_FILE_PATH);
+ String trustCertCollectionFilePath = properties.getProperty(GrpcIpcUtils.TRUST_CERTIFICATE_FILE_PATH);
+ if (Strings.isNullOrEmpty(certChainFilePath) || Strings.isNullOrEmpty(privateKeyFilePath)) {
+ return null;
+ }
+ SslContextBuilder sslClientContextBuilder = SslContextBuilder.forServer(new File(certChainFilePath),
+ new File(privateKeyFilePath));
+ if (!Strings.isNullOrEmpty(trustCertCollectionFilePath)) {
+ sslClientContextBuilder.trustManager(new File(trustCertCollectionFilePath));
+ sslClientContextBuilder.clientAuth(ClientAuth.REQUIRE);
+ }
+ return GrpcSslContexts.configure(sslClientContextBuilder,
+ SslProvider.OPENSSL);
+ }
+
+ public static Properties getPropertiesFromConfig(ConfigurationAdmin configAdmin, String pid) {
+ Properties properties = new Properties();
+ try {
+ final Dictionary config = configAdmin.getConfiguration(pid).getProperties();
+ if (config != null) {
+ final Enumeration keys = config.keys();
+ while (keys.hasMoreElements()) {
+ final String key = keys.nextElement();
+ properties.put(key, config.get(key));
+ }
+ }
+ } catch (IOException e) {
+ throw new RuntimeException("Cannot load config", e);
+ }
+ return properties;
+ }
+}
diff --git a/core/grpc/common/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/core/grpc/common/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 000000000000..bedb955c1186
--- /dev/null
+++ b/core/grpc/common/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/grpc/osgi/pom.xml b/core/grpc/osgi/pom.xml
index 3c13e6e08c1f..c3851b560c3a 100644
--- a/core/grpc/osgi/pom.xml
+++ b/core/grpc/osgi/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.grpcorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/grpc/pom.xml b/core/grpc/pom.xml
index bc35d8f83095..f84f364c1c0d 100644
--- a/core/grpc/pom.xml
+++ b/core/grpc/pom.xml
@@ -5,7 +5,7 @@
org.opennms.coreorg.opennms
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/health/api/pom.xml b/core/health/api/pom.xml
index 665bce1e670f..a273e90a6eef 100644
--- a/core/health/api/pom.xml
+++ b/core/health/api/pom.xml
@@ -4,7 +4,7 @@
org.opennms.coreorg.opennms.core.health
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.health
@@ -20,5 +20,19 @@
org.apache.commonscommons-lang3
+
+ io.vavr
+ vavr
+ 0.10.0
+ compile
+
+
+ junit
+ junit
+
+
+ org.hamcrest
+ hamcrest-library
+
diff --git a/core/health/api/src/main/java/org/opennms/core/health/api/Health.java b/core/health/api/src/main/java/org/opennms/core/health/api/Health.java
index d7221ca4424e..b4e2a752de9c 100644
--- a/core/health/api/src/main/java/org/opennms/core/health/api/Health.java
+++ b/core/health/api/src/main/java/org/opennms/core/health/api/Health.java
@@ -36,15 +36,22 @@
import org.apache.commons.lang3.tuple.Pair;
/**
- * Represents the "Health", by holding a list of {@link Response}s.
+ * Represents the "Health", by holding a list of {@link HealthCheck}s and their {@link Response}s.
* It allows accessing the responses and also provides some helper methods (e.g. to get the worst response).
*
* @author mvrueden
*/
public class Health {
- private List> responses = new ArrayList<>();
- private String errorMessage;
+ private final List> responses;
+
+ public Health() {
+ responses = new ArrayList<>();
+ }
+
+ public Health(List> responses) {
+ this.responses = responses;
+ }
public Health withResponse(HealthCheck healthCheck, Response response) {
add(healthCheck, response);
@@ -52,30 +59,17 @@ public Health withResponse(HealthCheck healthCheck, Response response) {
}
public boolean isSuccess() {
- if (responses.isEmpty() && errorMessage != null) {
- return false;
- }
return responses.stream().allMatch(r -> r.getRight().getStatus() == Status.Success);
}
public Optional> getWorst() {
- return responses.stream()
- .sorted(Comparator.comparingInt(pair -> -1 * pair.getRight().getStatus().ordinal()))
- .findFirst();
+ return responses.stream().max(Comparator.comparing(p -> p.getRight().getStatus()));
}
public void add(HealthCheck healthCheck, Response response) {
this.responses.add(Pair.of(healthCheck, response));
}
- public void setError(String errorMessage) {
- this.errorMessage = errorMessage;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-
public List> getResponses() {
return new ArrayList<>(responses);
}
diff --git a/core/health/api/src/main/java/org/opennms/core/health/api/HealthCheckService.java b/core/health/api/src/main/java/org/opennms/core/health/api/HealthCheckService.java
index 1d9d6558587e..e9a0210b3e43 100644
--- a/core/health/api/src/main/java/org/opennms/core/health/api/HealthCheckService.java
+++ b/core/health/api/src/main/java/org/opennms/core/health/api/HealthCheckService.java
@@ -30,8 +30,9 @@
import java.util.List;
import java.util.concurrent.CompletableFuture;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
+import java.util.concurrent.CompletionStage;
+
+import io.vavr.control.Either;
/**
* The {@link HealthCheckService} performs various {@link HealthCheck}s and returns
@@ -45,7 +46,7 @@ public interface HealthCheckService {
* Performs various {@link HealthCheck}s asynchronously and returns a {@link CompletableFuture} which
* contains the {@link Health} representing each {@link HealthCheck}s {@link Response}.
*
- * It is up to the implementator to respect timeouts and handle exceptions accordingly, when
+ * It is up to the implementation to respect timeouts and handle exceptions accordingly, when
* these situations arise when calling {@link HealthCheck#perform(Context)}.
*
* Callback methods can be provided to print information before and after a {@link HealthCheck} is invoked.
@@ -54,9 +55,18 @@ public interface HealthCheckService {
* represent the value when calling {@link HealthCheck#perform(Context)} directly.
*
* @param context The context object
- * @param onStartConsumer Callback method which is invoked before the {@link HealthCheck#perform(Context)} method is invoked. May be null.
- * @param onFinishConsumer Callback method which is invoked after the {@link HealthCheck#perform(Context)} method is invoked. May be null.
- * @return The {@link CompletableFuture} to retrieve the {@link Health} from.
+ * @param listener gets informed about health check progress. May be null. In case the {@code Either} contains an
+ * error no listener callbacks are called at all. If the {@code Either} contains a {@CompletionStage}
+ * all listener callbacks are guaranteed to be called before that completion stage completes.
+ * @param tags selects the single health checks that are included in the overall check; every health check that has any of the given tags is included.
+ * @return Either an error message if no matching health checks could be determined or a {@link CompletableFuture} to retrieve the {@link Health} from.
*/
- CompletableFuture performAsyncHealthCheck(Context context, Consumer onStartConsumer, BiConsumer onFinishConsumer, List tags);
+ Either> performAsyncHealthCheck(Context context, ProgressListener listener, List tags);
+
+ interface ProgressListener {
+ default void onHealthChecksFound(List checks) {};
+ default void onPerform(HealthCheck check) {};
+ default void onResponse(HealthCheck check, Response response) {};
+ default void onAllHealthChecksCompleted(Health health) {};
+ }
}
diff --git a/core/health/api/src/main/java/org/opennms/core/health/api/Response.java b/core/health/api/src/main/java/org/opennms/core/health/api/Response.java
index c5311044850f..2684a6c5c063 100644
--- a/core/health/api/src/main/java/org/opennms/core/health/api/Response.java
+++ b/core/health/api/src/main/java/org/opennms/core/health/api/Response.java
@@ -33,6 +33,7 @@
*/
public class Response {
+ public static Response UNKNOWN = new Response(Status.Unknown);
public static Response SUCCESS = new Response(Status.Success);
// The status
diff --git a/core/health/api/src/test/java/org/opennms/core/health/api/HealthTest.java b/core/health/api/src/test/java/org/opennms/core/health/api/HealthTest.java
new file mode 100644
index 000000000000..f16673cb8e2e
--- /dev/null
+++ b/core/health/api/src/test/java/org/opennms/core/health/api/HealthTest.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2018-2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.health.api;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Collections;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.hamcrest.Matchers;
+import org.junit.Test;
+
+public class HealthTest {
+
+ @Test
+ public void findsWorst() {
+ var pairs = Stream.of(Status.values()).map(s -> Pair.of(null, new Response(s))).collect(Collectors.toList());
+ var h1 = new Health(pairs).getWorst();
+ assertThat(h1.get().getRight().getStatus(), Matchers.is(Status.values()[Status.values().length - 1]));
+ Collections.reverse(pairs);
+ var h2 = new Health(pairs).getWorst();
+ assertThat(h2.get().getRight().getStatus(), Matchers.is(Status.values()[Status.values().length - 1]));
+ }
+}
diff --git a/core/health/impl/pom.xml b/core/health/impl/pom.xml
index 2b45339732ae..c91e7b19a1f3 100644
--- a/core/health/impl/pom.xml
+++ b/core/health/impl/pom.xml
@@ -4,7 +4,7 @@
org.opennms.coreorg.opennms.core.health
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.health
@@ -38,7 +38,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
@@ -67,5 +67,9 @@
org.opennms.core.test-api.libtest
+
+ org.opennms
+ opennms-util
+
diff --git a/core/health/impl/src/main/java/org/opennms/core/health/impl/DefaultHealthCheckService.java b/core/health/impl/src/main/java/org/opennms/core/health/impl/DefaultHealthCheckService.java
index 2ba8db009747..f9c0e63ff3b3 100644
--- a/core/health/impl/src/main/java/org/opennms/core/health/impl/DefaultHealthCheckService.java
+++ b/core/health/impl/src/main/java/org/opennms/core/health/impl/DefaultHealthCheckService.java
@@ -28,20 +28,18 @@
package org.opennms.core.health.impl;
+import java.time.Duration;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
-import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionStage;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
import java.util.stream.Collectors;
+import org.apache.commons.lang3.tuple.Pair;
+import org.opennms.core.concurrent.FutureUtils;
import org.opennms.core.health.api.Context;
import org.opennms.core.health.api.Health;
import org.opennms.core.health.api.HealthCheck;
@@ -57,6 +55,8 @@
import com.google.common.base.Strings;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import io.vavr.control.Either;
+
/**
* The "Default" implementation of the {@link HealthCheckService}.
* It loads all available {@link HealthCheckService}s from the OSGi service registry.
@@ -87,73 +87,69 @@ protected List getHealthChecks() throws InvalidSyntaxException {
}
@Override
- public CompletableFuture performAsyncHealthCheck(Context context, Consumer onStartConsumer, BiConsumer onFinishConsumer, List tags) {
- final CompletableFuture returnFuture = new CompletableFuture<>();
- final Health health = new Health();
- final BiConsumer consumer = (healthCheck, response) -> {
- health.withResponse(healthCheck, response);
- onFinishConsumer.accept(healthCheck, response);
- };
+ public Either> performAsyncHealthCheck(Context context, ProgressListener listener, List tags) {
try {
// Fail if no checks are available
List checks = getHealthChecks();
checks = filterChecksWithTags(checks, tags);
if (checks == null || checks.isEmpty()) {
- health.setError("No Health Checks available");
+ return Either.left("No Health Checks available");
} else {
- runChecks(context, checks, onStartConsumer, consumer);
+ if (listener != null) {
+ listener.onHealthChecksFound(checks);
+ }
+ return Either.right(runChecks(context, checks, listener));
}
} catch (InvalidSyntaxException ex) {
- health.setError("Error while performing health checks: " + ex.getMessage());
- } finally {
- returnFuture.complete(health);
+ return Either.left("Error while performing health checks: " + ex.getMessage());
}
- return returnFuture;
}
- List filterChecksWithTags(List checks, List tags){
- if (checks != null && tags != null && tags.stream().anyMatch(tag -> !Strings.isNullOrEmpty(tag))){
+ List filterChecksWithTags(List checks, List tags) {
+ if (checks != null && tags != null && tags.stream().anyMatch(tag -> !Strings.isNullOrEmpty(tag))) {
checks = checks.stream().filter(check -> check.getTags().stream().anyMatch(tags::contains)).collect(Collectors.toList());
}
return checks;
}
- // Asynchronously run all checks
- private void runChecks(Context context, List checks, Consumer onStartConsumer, BiConsumer onFinishConsumer) {
- Future currentFuture = null;
- for (HealthCheck check : checks) {
- try {
- if (onStartConsumer != null) {
- onStartConsumer.accept(check);
- }
- currentFuture = executorService.submit(() -> {
+ /**
+ * Creates a completable future for the given health check.
+ *
+ * The returned future is guaranteed to complete within the timeout given in the context instance. Listener
+ * callbacks have been called before the future completes.
+ */
+ private CompletionStage> completionStage(HealthCheck check, Context context, ProgressListener listener) {
+ return FutureUtils.completionStageWithDefaultOnTimeout(
+ () -> {
try {
- final Response response = check.perform(context);
- if (response == null) {
- return new Response(Status.Unknown);
+ if (listener != null) {
+ listener.onPerform(check);
}
- return response;
- } catch (Exception ex) {
- // Log the stack trace
- LOG.warn("Health check {} failed with exception: {}", check, ex.getMessage(), ex);
- return new Response(ex);
+ var response = check.perform(context);
+ return response != null ? response : Response.UNKNOWN;
+ } catch (Throwable t) {
+ return new Response(t);
}
- });
- final Response response = currentFuture.get(context.getTimeout(), TimeUnit.MILLISECONDS);
- if (onFinishConsumer != null) {
- onFinishConsumer.accept(check, response);
- }
- } catch (TimeoutException timeoutException) {
- if (currentFuture != null) {
- currentFuture.cancel(true);
- }
- onFinishConsumer.accept(check, new Response(Status.Timeout, "Health Check did not finish within " + context.getTimeout() + " ms"));
- } catch (Exception ex) {
- if (currentFuture != null) {
- currentFuture.cancel(true);
- }
- onFinishConsumer.accept(check, new Response(ex));
+ },
+ Duration.ofMillis(context.getTimeout()),
+ () -> new Response(Status.Timeout, "Health Check did not finish within " + context.getTimeout() + " ms"),
+ executorService
+ ).thenApply(response -> {
+ if (listener != null) {
+ listener.onResponse(check, response);
}
- }
+ return Pair.of(check, response);
+ });
+ }
+
+ // Asynchronously run all checks
+ private CompletionStage runChecks(Context context, List checks, ProgressListener listener) {
+ return FutureUtils.traverse(checks, check -> completionStage(check, context, listener)).thenApply(list -> {
+ var health = new Health(list);
+ if (listener != null) {
+ listener.onAllHealthChecksCompleted(health);
+ }
+ return health;
+ });
}
}
diff --git a/core/health/impl/src/test/java/org/opennms/core/health/impl/DefaultHealthCheckServiceTest.java b/core/health/impl/src/test/java/org/opennms/core/health/impl/DefaultHealthCheckServiceTest.java
index f17dec1ea714..e342ed3df6f8 100644
--- a/core/health/impl/src/test/java/org/opennms/core/health/impl/DefaultHealthCheckServiceTest.java
+++ b/core/health/impl/src/test/java/org/opennms/core/health/impl/DefaultHealthCheckServiceTest.java
@@ -33,7 +33,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -47,10 +46,11 @@
import org.opennms.core.health.api.Context;
import org.opennms.core.health.api.Health;
import org.opennms.core.health.api.HealthCheck;
+import org.opennms.core.health.api.HealthCheckConstants;
+import org.opennms.core.health.api.HealthCheckService;
import org.opennms.core.health.api.Response;
import org.opennms.core.health.api.SimpleHealthCheck;
import org.opennms.core.health.api.Status;
-import org.opennms.core.health.api.HealthCheckConstants;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.slf4j.Logger;
@@ -125,12 +125,21 @@ protected List getHealthChecks() {
context.setTimeout(1000); // ms
for (int i=0; i<2; i++) {
- final CompletableFuture future = healthCheckService
+ var eitherErrorOrFuture = healthCheckService
.performAsyncHealthCheck(context,
- healthCheck -> LOG.info("Executing: {}", healthCheck.getDescription()),
- (healthCheck, response) -> LOG.info("=> {} : {}", response.getStatus().name(), response.getMessage()),
+ new HealthCheckService.ProgressListener() {
+ @Override
+ public void onPerform(HealthCheck healthCheck) {
+ LOG.info("Executing: {}", healthCheck.getDescription());
+ }
+
+ @Override
+ public void onResponse(HealthCheck check, Response response) {
+ LOG.info("=> {} : {}", response.getStatus().name(), response.getMessage());
+ }
+ },
null);
- final Health health = future.get();
+ final Health health = eitherErrorOrFuture.get().toCompletableFuture().get();
final List timedOutResponsed = health.getResponses().stream().map(Pair::getRight).filter(r -> r.getStatus() == Status.Timeout).collect(Collectors.toList());
Assert.assertThat(timedOutResponsed.size(), is(1));
}
diff --git a/core/health/pom.xml b/core/health/pom.xml
index 0498f5e8f6fa..38e998349399 100644
--- a/core/health/pom.xml
+++ b/core/health/pom.xml
@@ -4,7 +4,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
diff --git a/core/health/rest/pom.xml b/core/health/rest/pom.xml
index 80cee519c288..51d1064f121d 100644
--- a/core/health/rest/pom.xml
+++ b/core/health/rest/pom.xml
@@ -4,7 +4,7 @@
org.opennms.coreorg.opennms.core.health
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.health
diff --git a/core/health/rest/src/main/java/org/opennms/core/health/rest/HealthCheckRestService.java b/core/health/rest/src/main/java/org/opennms/core/health/rest/HealthCheckRestService.java
index dce858b012d4..251f165df3e3 100644
--- a/core/health/rest/src/main/java/org/opennms/core/health/rest/HealthCheckRestService.java
+++ b/core/health/rest/src/main/java/org/opennms/core/health/rest/HealthCheckRestService.java
@@ -44,9 +44,9 @@ public interface HealthCheckRestService {
@GET
@Path("probe")
@Produces(MediaType.TEXT_PLAIN)
- Response probeHealth(@QueryParam("t") @DefaultValue("5000") int timeoutInMs, @QueryParam("maxAgeMs") @DefaultValue("0") int maxAgeMs, @Context final UriInfo uriInfo);
+ Response probeHealth(@QueryParam("t") @DefaultValue("5000") int timeoutInMs, @QueryParam("maxAgeMs") @DefaultValue("90000") int maxAgeMs, @Context final UriInfo uriInfo);
@GET
@Produces(MediaType.APPLICATION_JSON)
- Response getHealth(@QueryParam("t") @DefaultValue("5000") int timeoutInMs, @QueryParam("maxAgeMs") @DefaultValue("0") int maxAgeMs, @Context final UriInfo uriInfo);
+ Response getHealth(@QueryParam("t") @DefaultValue("5000") int timeoutInMs, @QueryParam("maxAgeMs") @DefaultValue("90000") int maxAgeMs, @Context final UriInfo uriInfo);
}
diff --git a/core/health/rest/src/main/java/org/opennms/core/health/rest/internal/HealthCheckRestServiceImpl.java b/core/health/rest/src/main/java/org/opennms/core/health/rest/internal/HealthCheckRestServiceImpl.java
index 014fc8763232..f2d3546e5e41 100644
--- a/core/health/rest/src/main/java/org/opennms/core/health/rest/internal/HealthCheckRestServiceImpl.java
+++ b/core/health/rest/src/main/java/org/opennms/core/health/rest/internal/HealthCheckRestServiceImpl.java
@@ -29,17 +29,14 @@
package org.opennms.core.health.rest.internal;
import java.time.Duration;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.Objects;
-import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
-import java.util.concurrent.atomic.AtomicReference;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
+import org.apache.commons.lang3.tuple.Pair;
import org.json.JSONArray;
import org.json.JSONObject;
import org.opennms.core.health.api.Context;
@@ -47,6 +44,8 @@
import org.opennms.core.health.api.HealthCheckService;
import org.opennms.core.health.rest.HealthCheckRestService;
+import io.vavr.control.Either;
+
public class HealthCheckRestServiceImpl implements HealthCheckRestService {
private static final String SUCCESS_MESSAGE = "Everything is awesome";
@@ -61,8 +60,11 @@ public HealthCheckRestServiceImpl(final HealthCheckService healthCheckService) {
@Override
public Response probeHealth(int timeoutInMs, int maxAgeMs, UriInfo uriInfo) {
List tags = uriInfo.getQueryParameters().get("tag");
- final Health health = getHealthInternally(timeoutInMs, maxAgeMs, tags);
- if (health.isSuccess()) {
+ var isSuccess = getHealthInternally(timeoutInMs, maxAgeMs, tags).fold(
+ errorMessage -> false,
+ health -> health.isSuccess()
+ );
+ if (isSuccess) {
return Response.ok()
.header("Health", SUCCESS_MESSAGE)
.entity(SUCCESS_MESSAGE)
@@ -75,46 +77,52 @@ public Response probeHealth(int timeoutInMs, int maxAgeMs, UriInfo uriInfo) {
}
@Override
- public Response getHealth(int timeoutInMs, int maxAgeMs, UriInfo uriInfo){
+ public Response getHealth(int timeoutInMs, int maxAgeMs, UriInfo uriInfo) {
List tags = uriInfo.getQueryParameters().get("tag");
- final Health health = getHealthInternally(timeoutInMs, maxAgeMs, tags);
-
- // Create response object
- final JSONArray jsonResponseArray = new JSONArray();
- for (var pair : health.getResponses()) {
- final JSONObject eachJsonResponse = new JSONObject();
- eachJsonResponse.put("status", pair.getRight().getStatus().name());
- eachJsonResponse.put("description", pair.getLeft().getDescription());
- eachJsonResponse.put("message", pair.getRight().getMessage());
- jsonResponseArray.put(eachJsonResponse);
- }
- final JSONObject jsonHealth = new JSONObject();
- jsonHealth.put("healthy", health.isSuccess());
- jsonHealth.put("errorMessage", health.getErrorMessage());
- jsonHealth.put("responses", jsonResponseArray);
+ var flagAndResponse = getHealthInternally(timeoutInMs, maxAgeMs, tags).fold(
+ errorMessage -> {
+ final JSONObject jsonHealth = new JSONObject();
+ final JSONArray jsonResponseArray = new JSONArray();
+ jsonHealth.put("healthy", false);
+ jsonHealth.put("errorMessage", errorMessage);
+ jsonHealth.put("responses", jsonResponseArray);
+ return Pair.of(false, jsonHealth);
+ },
+ health -> {
+ final JSONObject jsonHealth = new JSONObject();
+ final JSONArray jsonResponseArray = new JSONArray();
+ jsonHealth.put("healthy", health.isSuccess());
+ jsonHealth.put("errorMessage", (String) null);
+ jsonHealth.put("responses", jsonResponseArray);
+ for (var pair : health.getResponses()) {
+ final JSONObject eachJsonResponse = new JSONObject();
+ eachJsonResponse.put("status", pair.getRight().getStatus().name());
+ eachJsonResponse.put("description", pair.getLeft().getDescription());
+ eachJsonResponse.put("message", pair.getRight().getMessage());
+ jsonResponseArray.put(eachJsonResponse);
+ }
+ return Pair.of(health.isSuccess(), jsonHealth);
+ }
+ );
// Return response
return Response.ok()
- .header("Health", health.isSuccess() ? SUCCESS_MESSAGE : ERROR_MESSAGE)
- .entity(jsonHealth.toString())
+ .header("Health", flagAndResponse.getLeft() ? SUCCESS_MESSAGE : ERROR_MESSAGE)
+ .entity(flagAndResponse.getRight().toString())
.build();
}
- private Health getHealthInternally(int timeoutInMs, int maxAgeMs, List tags){
- try {
- final Context context = new Context();
- context.setTimeout(timeoutInMs);
- context.setMaxAge(Duration.ofMillis(maxAgeMs));
- final CompletableFuture future = healthCheckService.performAsyncHealthCheck(
- context,
- healthCheck -> {},
- (healthCheck, response) -> {},
- tags
- );
- return future.get();
- } catch (InterruptedException | ExecutionException e) {
- throw new RuntimeException(e);
- }
+ private Either getHealthInternally(int timeoutInMs, int maxAgeMs, List tags) {
+ final Context context = new Context();
+ context.setTimeout(timeoutInMs);
+ context.setMaxAge(Duration.ofMillis(maxAgeMs));
+ return healthCheckService.performAsyncHealthCheck(context, null, tags).map(f -> {
+ try {
+ return f.toCompletableFuture().get();
+ } catch (InterruptedException | ExecutionException e) {
+ throw new RuntimeException(e);
+ }
+ });
}
}
diff --git a/core/health/shell/pom.xml b/core/health/shell/pom.xml
index 56227c614e9f..866e2a8a23b4 100644
--- a/core/health/shell/pom.xml
+++ b/core/health/shell/pom.xml
@@ -4,7 +4,7 @@
org.opennms.coreorg.opennms.core.health
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.health
@@ -47,7 +47,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckCommand.java b/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckCommand.java
index 2b68b37de941..e4ba84872559 100644
--- a/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckCommand.java
+++ b/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckCommand.java
@@ -30,11 +30,12 @@
import java.time.Duration;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Comparator;
+import java.util.IdentityHashMap;
import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.stream.Collectors;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
import org.apache.karaf.shell.api.action.Action;
import org.apache.karaf.shell.api.action.Command;
@@ -45,15 +46,22 @@
import org.opennms.core.health.api.Health;
import org.opennms.core.health.api.HealthCheck;
import org.opennms.core.health.api.HealthCheckService;
+import org.opennms.core.health.api.Response;
import org.opennms.core.health.api.Status;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
@Command(scope = "opennms", name = "health-check", description="Verifies that the container is healthy.")
@Service
public class HealthCheckCommand implements Action {
+ public static final String SUCCESS_MESSAGE = "=> Everything is awesome";
+ public static final String FAILURE_MESSAGE = "=> Oh no, something is wrong";
+
+ public static boolean isEndMessage(String s) {
+ // a newline is appended to the string -> do a startsWith check
+ return s.startsWith(SUCCESS_MESSAGE) || s.startsWith(FAILURE_MESSAGE);
+ }
+
private static final String DESCRIPTION_FORMAT = "%%-%ds ";
private static final String STATUS_FORMAT = "[ %%-%ds ]";
@@ -79,48 +87,28 @@ public Object execute() throws Exception {
final Context context = new Context();
context.setTimeout(timeout);
context.setMaxAge(Duration.ofMillis(maxAgeMs));
- final CompletableFuture future = performHealthCheck(bundleContext, context);
- final Health health = future.get();
- // Print results
- System.out.println();
- if (health.isSuccess()) {
- System.out.println("=> Everything is awesome");
- } else {
- if (health.getErrorMessage() != null) {
- System.out.println(Colorizer.colorize("Error: " + health.getErrorMessage(), Color.Red));
- }
- System.out.println("=> Oh no, something is wrong");
- }
- return null;
- }
+ final var listener = new Listener();
+
+ healthCheckService.performAsyncHealthCheck(context, listener, null).fold(
+ errorMessage -> {
+ System.out.println(Colorizer.colorize("Error: " + errorMessage, Color.Red));
+ System.out.println("=> Oh no, something is wrong");
+ return null;
+ },
+ completionStage -> {
+ // the concurrent execution of health checks is started
+ // -> the listener is informed about progress and creates corresponding ouput
+ // -> consume that output and print it to the console
+ String next;
+ while ((next = listener.read()) != null) {
+ System.out.print(next);
+ System.out.flush();
+ }
+ return null;
+ });
- private CompletableFuture performHealthCheck(BundleContext bundleContext, Context context) throws InvalidSyntaxException {
- // Determine attributes (e.g. max length) for visualization
- final Collection> serviceReferences = bundleContext.getServiceReferences(HealthCheck.class, null);
- final List healthChecks = serviceReferences.stream().map(s -> bundleContext.getService(s)).collect(Collectors.toList());
- final int maxColorLength = Arrays.stream(Color.values()).map(c -> c.toAnsi()).max(Comparator.comparingInt(String::length)).get().length();
- final int maxDescriptionLength = healthChecks.stream().map(check -> check.getDescription()).max(Comparator.comparingInt(String::length)).orElse("").length();
- final int maxStatusLength = Arrays.stream(Status.values()).map(v -> v.name()).max(Comparator.comparingInt(String::length)).get().length() + maxColorLength + "\033[m".length() * 2 + Color.NoColor.toAnsi().length();
- final String descFormat = String.format(DESCRIPTION_FORMAT, maxDescriptionLength);
- final String statusFormat = String.format(STATUS_FORMAT, maxStatusLength);
-
- // Run Health Checks
- final CompletableFuture future = healthCheckService
- .performAsyncHealthCheck(context,
- healthCheck -> System.out.print(String.format(descFormat, healthCheck.getDescription())),
- (healthCheck, response) -> {
- final Status status = response.getStatus();
- final Color statusColor = determineColor(status);
- final String statusText = String.format(statusFormat, Colorizer.colorize(status.name(), statusColor));
- System.out.print(statusText);
- if (response.getMessage() != null) {
- System.out.print(" => " + response.getMessage());
- }
- System.out.println();
- },
- null);
- return future;
+ return null;
}
private static Color determineColor(Status status) {
@@ -133,4 +121,95 @@ private static Color determineColor(Status status) {
default: return Color.NoColor;
}
}
+
+ /**
+ * Listens for progress during the health check executions.
+ *
+ * The listener must not output to the console directly when its callbacks are called. There is some multiplexing
+ * logic that takes care that System.out is multiplexed to the Karaf shell session that invoked a command.
+ * When a callback is called the listener just stores a corresponding messages in its {@code out} queue.
+ * That queue is consumed by the thread that called the command. The final success or failure messages are
+ * used like a poison pill to indicate the end of messages.
+ */
+ private static class Listener implements HealthCheckService.ProgressListener {
+
+ private List checks;
+ private String descFormat, statusFormat;
+ private final Map responses = new IdentityHashMap<>();
+ private final BlockingQueue out = new LinkedBlockingQueue<>();
+ private boolean completed = false;
+
+ private void print(String string) {
+ out.add(string);
+ }
+
+ private void println() {
+ print("\n");
+ }
+
+ private void println(String string) {
+ print(string + "\n");
+ }
+
+ @Override
+ public synchronized void onHealthChecksFound(List healthChecks) {
+ this.checks = healthChecks;
+ final int maxColorLength = Arrays.stream(Color.values()).map(c -> c.toAnsi()).max(Comparator.comparingInt(String::length)).get().length();
+ final int maxDescriptionLength = healthChecks.stream().map(check -> check.getDescription()).max(Comparator.comparingInt(String::length)).orElse("").length();
+ final int maxStatusLength = Arrays.stream(Status.values()).map(v -> v.name()).max(Comparator.comparingInt(String::length)).get().length() + maxColorLength + "\033[m".length() * 2 + Color.NoColor.toAnsi().length();
+ descFormat = String.format(DESCRIPTION_FORMAT, maxDescriptionLength);
+ statusFormat = String.format(STATUS_FORMAT, maxStatusLength);
+ printCurrentExecutionState();
+ }
+
+ @Override
+ public synchronized void onResponse(HealthCheck check, Response response) {
+ responses.put(check, response);
+ print(String.format("\033[%dA", checks.size())); // move cursor up
+ printCurrentExecutionState();
+ }
+
+ @Override
+ public synchronized void onAllHealthChecksCompleted(Health health) {
+ println();
+ if (health.isSuccess()) {
+ println(SUCCESS_MESSAGE);
+ } else {
+ println(FAILURE_MESSAGE);
+ }
+ }
+
+ private void printCurrentExecutionState() {
+ for (var healthCheck : checks) {
+ String str;
+ str = String.format(descFormat, healthCheck.getDescription());
+ var response = responses.get(healthCheck);
+ if (response != null) {
+ final Status status = response.getStatus();
+ final Color statusColor = determineColor(status);
+ final String statusText = String.format(statusFormat, Colorizer.colorize(status.name(), statusColor));
+ str = str + statusText;
+ if (response.getMessage() != null) {
+ str = str + " => " + response.getMessage();
+ }
+ } else {
+ str = str + "[ ]";
+ }
+ println(str);
+ }
+ }
+
+ public String read() {
+ if (completed) {
+ return null;
+ }
+ try {
+ var string = out.take();
+ completed = isEndMessage(string);
+ return string;
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
}
diff --git a/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckTagCompleter.java b/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckTagCompleter.java
new file mode 100644
index 000000000000..5f8adcd7e722
--- /dev/null
+++ b/core/health/shell/src/main/java/org/opennms/core/health/shell/HealthCheckTagCompleter.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2018-2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.health.shell;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.karaf.shell.api.action.lifecycle.Reference;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
+import org.apache.karaf.shell.api.console.CommandLine;
+import org.apache.karaf.shell.api.console.Completer;
+import org.apache.karaf.shell.api.console.Session;
+import org.apache.karaf.shell.support.completers.StringsCompleter;
+import org.opennms.core.health.api.HealthCheck;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+
+@Service
+public class HealthCheckTagCompleter implements Completer {
+
+ @Reference
+ private BundleContext bundleContext;
+
+ @Override
+ public int complete(Session session, CommandLine commandLine, List candidates) {
+ try {
+ var tags = bundleContext
+ .getServiceReferences(HealthCheck.class, null)
+ .stream()
+ .flatMap(s -> bundleContext.getService(s).getTags().stream())
+ .collect(Collectors.toSet());
+ StringsCompleter delegate = new StringsCompleter();
+ delegate.getStrings().addAll(tags);
+ return delegate.complete(session, commandLine, candidates);
+ } catch (InvalidSyntaxException e) {
+ throw new RuntimeException("could not retrieve tags", e);
+ }
+ }
+
+}
diff --git a/core/icmp-jna/pom.xml b/core/icmp-jna/pom.xml
index 1b4a6e741391..89d2fe9bd18e 100644
--- a/core/icmp-jna/pom.xml
+++ b/core/icmp-jna/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -62,7 +62,7 @@
trueopennms-repoOpenNMS Repository
- http://maven.opennms.org/content/groups/opennms.org-release
+ https://maven.opennms.org/content/groups/opennms.org-release
diff --git a/core/ipc/common/aws-sqs/pom.xml b/core/ipc/common/aws-sqs/pom.xml
deleted file mode 100644
index 0344e27d1ae5..000000000000
--- a/core/ipc/common/aws-sqs/pom.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
- org.opennms.core.ipc
- org.opennms.core.ipc.common
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.common
- org.opennms.core.ipc.common.aws-sqs
- OpenNMS :: Core :: IPC :: Common :: Amazon SQS
- bundle
-
- true
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- test-jar
-
-
-
-
-
-
-
-
- com.google.guava
- guava
-
-
- org.opennms.core
- org.opennms.core.logging
-
-
- org.opennms.dependencies
- aws-dependencies
- pom
-
-
- org.opennms.core
- org.opennms.core.lib
-
-
- org.osgi
- org.osgi.compendium
- provided
-
-
- junit
- junit
- test
-
-
- org.hamcrest
- hamcrest-library
- test
-
-
- org.mockito
- mockito-core
- test
-
-
-
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConfig.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConfig.java
deleted file mode 100644
index 98c8a7ef5a59..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConfig.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import com.amazonaws.regions.Regions;
-
-/**
- * Encapsulates all the SQS related bits that can be configured.
- */
-public interface AmazonSQSConfig {
-
- /**
- * Prefix to be added to all queues.
- *
- * This can be used to differentiate between OpenNMS deployments in a single region.
- *
- * @return the prefix, or null if no prefix should be used.
- */
- String getQueuePrefix();
-
- /**
- * AWS region to use.
- *
- * @return the region, or null if the default region should be used.
- */
- Regions getRegion();
-
- /**
- * AWS access key.
- *
- * @return the key, or null if the client should be initialized without static credentials.
- */
- String getAccessKey();
-
- /**
- * AWS secret key.
- *
- * @return the key, or null if the client should be initialized without static credentials.
- */
- String getSecretKey();
-
- /**
- * Convenience method that returns true if both an access key and secret key have been set.
- *
- * @return true if both an access key and secret key have been set, false otherwise.
- */
- boolean hasStaticCredentials();
-
- /**
- * Used to force the SQS client to use HTTP instead of HTTPS.
- *
- * This can be used for testing, making it easier to intercept the messages sent over the wire.
- *
- * @return true if HTTP should be used insetad of HTTPS, false otherwise.
- */
- boolean isUseHttp();
-
- /**
- * Retrieves the queue configuration for queues used by the Sink API.
- *
- * @return the queue configuration
- */
- AmazonSQSQueueConfig getSinkQueueConfig();
-
- /**
- * Retrieves the queue configuration for queues used by the RPC API.
- *
- * @return the queue configuration
- */
- AmazonSQSQueueConfig getRpcQueueConfig();
-
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConstants.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConstants.java
deleted file mode 100644
index 191ffb2ef510..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSConstants.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-/**
- * The Interface AmazonSQSConstants.
- *
- * @author Alejandro Galue
- */
-public interface AmazonSQSConstants {
-
- final String AWS_CONFIG_PID = "org.opennms.core.ipc.aws.sqs";
-
- final String AWS_CONFIG_SYS_PROP_PREFIX = AWS_CONFIG_PID + ".";
-
- final String SINK_QUEUE_PROP_PREFIX = "sink.";
-
- final String RPC_QUEUE_PROP_PREFIX = "rpc.";
-
- final String AWS_REGION = "aws_region";
-
- final String AWS_ACCESS_KEY_ID = "aws_access_key_id";
-
- final String AWS_SECRET_ACCESS_KEY = "aws_secret_access_key";
-
- final String AWS_QUEUE_NAME_PREFIX = "aws_queue_name_prefix";
-
- final String AWS_USE_HTTP = "aws_use_http";
-
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSManager.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSManager.java
deleted file mode 100644
index 8b776a57bcc5..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import com.amazon.sqs.javamessaging.SQSConnectionFactory;
-import com.amazonaws.services.sqs.AmazonSQS;
-
-public interface AmazonSQSManager {
-
- /**
- * Retrieve the underlying SQS client.
- *
- * @return the sqs client
- */
- AmazonSQS getSQSClient();
-
- /**
- * Retrieve a connection factory that wraps the
- * SQS client as a JMS provider.
- *
- * @return the JMS connection factory
- */
- SQSConnectionFactory getSQSConnectionFactory();
-
- /**
- * Retrieve the queue URL for the given Sink Module
- * and create the queue if it does not already exist.
- *
- *
This is a blocking operation. If AWS is unreachable,
- * the method will keep retrying indefinitely until the queue is
- * created and the queue URL is determined, or the thread is interrupted.
- *
- *
This function may cache the queue URL, avoiding unecesssary
- * API calls.
- *
- * @param moduleId the ID of the Sink Module
- * @return the queue URL
- */
- String getSinkQueueUrlAndCreateIfNecessary(String moduleId) throws InterruptedException;
-
- /**
- * Retrieve the queue name to use for RPC request targetting
- * a specific RPC Module and location. Also create the queue if
- * it does not already exist.
- *
- *
This function may cache the queue URL, avoiding unecesssary
- * API calls.
- *
- * @param moduleId the ID of the RPC Module
- * @param location the targetted location of the request
- * @return the queue name
- * @throws AmazonSQSQueueException if some error occured creating the queue or determining the URL
- */
- String getRpcRequestQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException;
-
- /**
- * Retrieve the queue name to use for RPC replies from a
- * specific RPC Module and location. Also create the queue if
- * it does not already exist.
- *
- *
This function may cache the queue URL, avoiding unecesssary
- * API calls.
- *
- * @param moduleId the ID of the RPC Module
- * @param location the source location of the reply
- * @return the queue name
- * @throws AmazonSQSQueueException if some error occured creating the queue or determining the URL
- */
- String getRpcReplyQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException;
-
- /**
- * Send message.
- *
- *
This is a blocking operation. If AWS is unreachable,
- * the method will keep retrying indefinitely until the message is delivered
- * or the thread is interrupted.
- *
- * @param queueUrl the queue URL
- * @param body the message body
- * @return the message ID
- */
- String sendMessage(String queueUrl, String body) throws InterruptedException;
-
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueAttributes.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueAttributes.java
deleted file mode 100644
index b4cd8fae8717..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueAttributes.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import java.io.Serializable;
-
-/**
- * An Enumeration for the SQS Queue Attributes.
- */
-public enum AmazonSQSQueueAttributes implements Serializable {
-
- /** The Delay seconds. */
- DelaySeconds,
-
- /** The Maximum message size. */
- MaximumMessageSize,
-
- /** The Message retention period. */
- MessageRetentionPeriod,
-
- /** The Receive message wait time seconds. */
- ReceiveMessageWaitTimeSeconds,
-
- /** The Visibility timeout. */
- VisibilityTimeout,
-
- /** The FIFO queue. */
- FifoQueue,
-
- /** The Content based deduplication. */
- ContentBasedDeduplication,
-
- /** The Policy. */
- Policy,
-
- /** The Redrive policy. */
- RedrivePolicy,
-
- /** The KMS master key id. */
- KmsMasterKeyId,
-
- /** The KMS data key reuse period seconds. */
- KmsDataKeyReusePeriodSeconds
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueConfig.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueConfig.java
deleted file mode 100644
index 9d2dda776f41..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueConfig.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import com.google.common.collect.ImmutableMap;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class AmazonSQSQueueConfig {
-
- public static final ImmutableMap DEFAULT_QUEUE_ATTRIBUTES = new ImmutableMap.Builder()
- .put(AmazonSQSQueueAttributes.DelaySeconds.toString(), "0")
- .put(AmazonSQSQueueAttributes.MaximumMessageSize.toString(), "262144")
- .put(AmazonSQSQueueAttributes.MessageRetentionPeriod.toString(), "1209600")
- .put(AmazonSQSQueueAttributes.ReceiveMessageWaitTimeSeconds.toString(), "10")
- .put(AmazonSQSQueueAttributes.VisibilityTimeout.toString(), "30")
- .put(AmazonSQSQueueAttributes.FifoQueue.toString(), "false")
- .put(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString(), "false")
- .build();
-
- private final Map attributes;
-
- public AmazonSQSQueueConfig(Map sqsConfig) {
- final Map attributes = new HashMap<>();
- for (AmazonSQSQueueAttributes attr : AmazonSQSQueueAttributes.values()) {
- // Retrieve the property, using the default if provided
- final String val = sqsConfig.getOrDefault(attr.toString(), DEFAULT_QUEUE_ATTRIBUTES.get(attr.toString()));
- if (val != null) {
- attributes.put(attr.toString(), val);
- }
- }
- if (!Boolean.parseBoolean(attributes.get(AmazonSQSQueueAttributes.FifoQueue.toString()))) {
- attributes.remove(AmazonSQSQueueAttributes.FifoQueue.toString());
- attributes.remove(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString());
- }
- this.attributes = ImmutableMap.copyOf(attributes);
- }
-
- public Map getAttributes() {
- return attributes;
- }
-
- public boolean isFifoEnabled() {
- return Boolean.parseBoolean(attributes.get(AmazonSQSQueueAttributes.FifoQueue.toString()));
- }
-
- public boolean isFifoContentDedupEnabled() {
- return Boolean.parseBoolean(attributes.get(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString()));
-
- }
-
- @Override
- public String toString() {
- return "AmazonSQSQueueConfig{" +
- "attributes=" + attributes +
- '}';
- }
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueException.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueException.java
deleted file mode 100644
index 8fd53a7fdf9c..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/AmazonSQSQueueException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-public class AmazonSQSQueueException extends Exception {
-
- public AmazonSQSQueueException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManager.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManager.java
deleted file mode 100644
index f629c3c98d82..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManager.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import com.amazon.sqs.javamessaging.ProviderConfiguration;
-import com.amazon.sqs.javamessaging.SQSConnectionFactory;
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.Protocol;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
-import com.amazonaws.services.sqs.model.CreateQueueRequest;
-import com.amazonaws.services.sqs.model.QueueNameExistsException;
-import com.amazonaws.services.sqs.model.SendMessageRequest;
-import com.amazonaws.services.sqs.model.SetQueueAttributesRequest;
-import com.google.common.base.Strings;
-import com.google.common.base.Supplier;
-import com.google.common.base.Suppliers;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import org.opennms.core.utils.SystemInfoUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Map;
-import java.util.Objects;
-import java.util.concurrent.ExecutionException;
-
-public class DefaultAmazonSQSManager implements AmazonSQSManager {
-
- private static final Logger LOG = LoggerFactory.getLogger(DefaultAmazonSQSManager.class);
-
- private final AmazonSQSConfig sqsConfig;
-
- /**
- * Creates the SQS client in the first get.
- */
- private final Supplier sqsClientSupplier = Suppliers.memoize(() -> createSQSClient());
-
- /**
- * Caches the RPC queue URL once created.
- */
- private LoadingCache rpcQueueUrlsByName = CacheBuilder.newBuilder()
- .maximumSize(1000)
- .build(new CacheLoader() {
- public String load(String queueName) {
- return ensureRpcQueueExists(queueName);
- }
- });
-
- /**
- * Caches the Sink queue URL once created.
- */
- private LoadingCache sinkQueueUrlsById = CacheBuilder.newBuilder()
- .maximumSize(1000)
- .build(new CacheLoader() {
- public String load(String moduleId) {
- final String queueName = getSinkQueueName(moduleId);
- return ensureSinkQueueExists(queueName);
- }
- });
-
- public DefaultAmazonSQSManager(AmazonSQSConfig sqsConfig) {
- this.sqsConfig = Objects.requireNonNull(sqsConfig);
- }
-
- @Override
- public String getSinkQueueUrlAndCreateIfNecessary(String moduleId) throws InterruptedException {
- while (true) {
- try {
- return sinkQueueUrlsById.get(moduleId);
- } catch (ExecutionException e) {
- if (isCause(UnknownHostException.class, e) || isCause(SocketException.class, e)) {
- LOG.warn("Cannot reach AWS while trying to retrieve the queue details for module {}, trying again in 5 seconds...", moduleId);
- Thread.sleep(5000);
- } else {
- throw new RuntimeException(e);
- }
- }
- }
- }
-
- @Override
- public String getRpcRequestQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException {
- final String rpcRequestQueueName = getRpcRequestQueueName(moduleId, location);
- try {
- rpcQueueUrlsByName.get(rpcRequestQueueName);
- return rpcRequestQueueName;
- } catch (ExecutionException e) {
- throw new AmazonSQSQueueException(e);
- }
- }
-
- @Override
- public String getRpcReplyQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException {
- final String rpcReplyQueueName = getRpcReplyQueueName(moduleId, location);
- try {
- rpcQueueUrlsByName.get(rpcReplyQueueName);
- return rpcReplyQueueName;
- } catch (ExecutionException e) {
- throw new AmazonSQSQueueException(e);
- }
- }
-
- @Override
- public AmazonSQS getSQSClient() {
- return sqsClientSupplier.get();
- }
-
- @Override
- public SQSConnectionFactory getSQSConnectionFactory() {
- return new SQSConnectionFactory(
- new ProviderConfiguration(),
- getSQSClient()
- );
- }
-
- @Override
- public String sendMessage(String queueUrl, String body) throws InterruptedException {
- final SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, body);
- if (sqsConfig.getSinkQueueConfig().isFifoEnabled()) {
- sendMessageRequest.setMessageGroupId(queueUrl);
- if (!sqsConfig.getSinkQueueConfig().isFifoContentDedupEnabled()) {
- sendMessageRequest.setMessageDeduplicationId(Long.toString(System.nanoTime()));
- }
- }
- while (true) {
- try {
- return getSQSClient().sendMessage(sendMessageRequest).getMessageId();
- } catch (RuntimeException ex) {
- if (isCause(UnknownHostException.class, ex) || isCause(SocketException.class, ex)) {
- LOG.warn("Cannot reach AWS at {} while trying to send a message, trying again in 5 seconds...", queueUrl);
- Thread.sleep(5000);
- } else {
- throw ex;
- }
- }
- }
- }
-
- private AmazonSQS createSQSClient() {
- final AmazonSQSClientBuilder builder = AmazonSQSClientBuilder.standard()
- .withRegion(sqsConfig.getRegion());
- if (sqsConfig.hasStaticCredentials()) {
- final BasicAWSCredentials awsCreds = new BasicAWSCredentials(sqsConfig.getAccessKey(), sqsConfig.getSecretKey());
- builder.withCredentials(new AWSStaticCredentialsProvider(awsCreds));
- }
- if (sqsConfig.isUseHttp()) {
- final ClientConfiguration clientConfig = new ClientConfiguration();
- clientConfig.setProtocol(Protocol.HTTP);
- builder.withClientConfiguration(clientConfig);
- }
- return builder.build();
- }
-
- private String getRpcRequestQueueName(String moduleId, String location) {
- String queueName = String.format("%s-%s-%s",
- SystemInfoUtils.getInstanceId(),
- moduleId,
- location);
- if (!Strings.isNullOrEmpty(sqsConfig.getQueuePrefix())) {
- queueName = String.format("%s-%s", sqsConfig.getQueuePrefix(), queueName);
- }
- return queueName;
- }
-
- private String getRpcReplyQueueName(String moduleId, String location) {
- return getRpcRequestQueueName(moduleId, location) + "-Reply";
- }
-
- protected String getSinkQueueName(String moduleId) {
- final String prefix = !Strings.isNullOrEmpty(sqsConfig.getQueuePrefix()) ? sqsConfig.getQueuePrefix() + "-" : "";
- final String suffix = sqsConfig.getSinkQueueConfig().isFifoEnabled() ? ".fifo" : "";
- return String.format("%s%s-%s-%s%s",
- prefix,
- SystemInfoUtils.getInstanceId(),
- "Sink",
- moduleId,
- suffix);
- }
-
- private String ensureRpcQueueExists(String queueName) {
- final Map attributes = sqsConfig.getRpcQueueConfig().getAttributes();
- return ensureQueueExists(queueName, attributes);
- }
-
- private String ensureSinkQueueExists(String queueName) {
- final Map attributes = sqsConfig.getSinkQueueConfig().getAttributes();
- return ensureQueueExists(queueName, attributes);
- }
-
- private String ensureQueueExists(String queueName, Map attributes) {
- final AmazonSQS sqsClient = getSQSClient();
- try {
- return sqsClient.createQueue(new CreateQueueRequest(queueName).withAttributes(attributes)).getQueueUrl();
- } catch (QueueNameExistsException e) {
- final String queueUrl = sqsClient.getQueueUrl(queueName).getQueueUrl();
- sqsClient.setQueueAttributes(new SetQueueAttributesRequest(queueUrl, attributes));
- return queueUrl;
- }
- }
-
- /**
- * Checks if is cause.
- *
- * @param expected the expected
- * @param exc the exception
- * @return true, if is cause
- */
- private static boolean isCause(Class extends Throwable> expected, Throwable exc) {
- return expected.isInstance(exc) || (exc != null && isCause(expected, exc.getCause()));
- }
-
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/ManagedSQSConfig.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/ManagedSQSConfig.java
deleted file mode 100644
index cd950a3073d4..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/ManagedSQSConfig.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import org.osgi.service.cm.ConfigurationAdmin;
-
-import java.io.IOException;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.Map;
-
-public class ManagedSQSConfig extends MapBasedSQSConfig {
-
- public ManagedSQSConfig(ConfigurationAdmin configAdmin) throws IOException {
- // Use the system properties as initial values and overwrite
- // the values with the properties from org.opennms.core.ipc.aws.sqs.cfg
- super(getConfigMapFromConfigAdmin(configAdmin, getConfigMapFromSystemProperties()));
- }
-
- private static Map getConfigMapFromConfigAdmin(ConfigurationAdmin configAdmin, Map sqsConfig) throws IOException {
- final Dictionary properties = configAdmin.getConfiguration(AmazonSQSConstants.AWS_CONFIG_PID).getProperties();
- if (properties != null) {
- final Enumeration keys = properties.keys();
- while (keys.hasMoreElements()) {
- final String key = keys.nextElement();
- sqsConfig.put(key, (String)properties.get(key));
- }
- }
- return sqsConfig;
- }
-}
diff --git a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/MapBasedSQSConfig.java b/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/MapBasedSQSConfig.java
deleted file mode 100644
index 68bb90dddfa1..000000000000
--- a/core/ipc/common/aws-sqs/src/main/java/org/opennms/core/ipc/common/aws/sqs/MapBasedSQSConfig.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import com.amazonaws.regions.Regions;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * SQS configuration from a map of values.
- *
- * The associated keys are defined in {@link AmazonSQSConstants}.
- *
- */
-public class MapBasedSQSConfig implements AmazonSQSConfig {
- public static final String DEFAULT_REGION = Regions.US_EAST_1.getName();
- private final String queuePrefix;
- private final Regions region;
- private final String accessKey;
- private final String secretKey;
- private final boolean useHttp;
- private final AmazonSQSQueueConfig sinkQueueConfig;
- private final AmazonSQSQueueConfig rpcQueueConfig;
-
- public MapBasedSQSConfig() {
- this(getConfigMapFromSystemProperties());
- }
-
- public MapBasedSQSConfig(Map sqsConfig) {
- queuePrefix = sqsConfig.get(AmazonSQSConstants.AWS_QUEUE_NAME_PREFIX);
- region = Regions.fromName(sqsConfig.getOrDefault(AmazonSQSConstants.AWS_REGION, DEFAULT_REGION));
- accessKey = sqsConfig.get(AmazonSQSConstants.AWS_ACCESS_KEY_ID);
- secretKey = sqsConfig.get(AmazonSQSConstants.AWS_SECRET_ACCESS_KEY);
- useHttp = Boolean.TRUE.toString().equals(sqsConfig.get(AmazonSQSConstants.AWS_USE_HTTP));
- sinkQueueConfig = new AmazonSQSQueueConfig(filterKeysByPrefix(sqsConfig, AmazonSQSConstants.SINK_QUEUE_PROP_PREFIX));
- rpcQueueConfig = new AmazonSQSQueueConfig(filterKeysByPrefix(sqsConfig, AmazonSQSConstants.RPC_QUEUE_PROP_PREFIX));
- }
-
- protected static Map getConfigMapFromSystemProperties() {
- return filterKeysByPrefix(System.getProperties().entrySet(), AmazonSQSConstants.AWS_CONFIG_SYS_PROP_PREFIX);
- }
-
- @Override
- public String getQueuePrefix() {
- return queuePrefix;
- }
-
- @Override
- public Regions getRegion() {
- return region;
- }
-
- @Override
- public boolean hasStaticCredentials() {
- return accessKey != null && secretKey != null;
- }
-
- @Override
- public String getAccessKey() {
- return accessKey;
- }
-
- @Override
- public String getSecretKey() {
- return secretKey;
- }
-
- @Override
- public boolean isUseHttp() {
- return useHttp;
- }
-
- @Override
- public AmazonSQSQueueConfig getSinkQueueConfig() {
- return sinkQueueConfig;
- }
-
- @Override
- public AmazonSQSQueueConfig getRpcQueueConfig() {
- return rpcQueueConfig;
- }
-
- @Override
- public String toString() {
- return "MapBasedSQSConfig{" +
- "queuePrefix='" + queuePrefix + '\'' +
- ", region='" + region + '\'' +
- ", accessKey='" + accessKey != null ? "********" : accessKey + '\'' +
- ", secretKey='" + secretKey != null ? "********" : secretKey + '\'' +
- ", useHttp=" + useHttp +
- ", sinkQueueConfig=" + sinkQueueConfig +
- ", rpcQueueConfig=" + rpcQueueConfig +
- '}';
- }
-
- private static Map filterKeysByPrefix(Map map, String prefix) {
- return filterKeysByPrefix(map.entrySet(), prefix);
- }
-
- private static Map filterKeysByPrefix(Set> entrySet, String prefix) {
- return entrySet.stream()
- // Filter out invalid keys and/or values
- .filter(e -> e.getKey() != null && e.getKey() instanceof String)
- .filter(e -> e.getValue() == null || e.getValue() instanceof String)
- .map(e -> (Map.Entry)e)
- // Extract the keys from the map that are prefixed
- .filter(e -> e.getKey().startsWith(prefix))
- // Remove the prefix, and collect the results back into a map
- .collect(Collectors.toMap(e -> e.getKey().substring(prefix.length(), e.getKey().length()),
- e -> e.getValue()));
- }
-}
diff --git a/core/ipc/common/aws-sqs/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/core/ipc/common/aws-sqs/src/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index 7517446b4032..000000000000
--- a/core/ipc/common/aws-sqs/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/common/aws-sqs/src/test/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManagerTest.java b/core/ipc/common/aws-sqs/src/test/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManagerTest.java
deleted file mode 100644
index 99a62b863fd9..000000000000
--- a/core/ipc/common/aws-sqs/src/test/java/org/opennms/core/ipc/common/aws/sqs/DefaultAmazonSQSManagerTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2002-2018 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2018 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.common.aws.sqs;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.hamcrest.Matchers.hasKey;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertEquals;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.opennms.core.utils.SystemInfoUtils;
-
-import org.junit.Test;
-
-/**
- * The Class DefaultAmazonSQSManagerTest.
- *
- * @author Alejandro Galue
- */
-public class DefaultAmazonSQSManagerTest {
-
- /**
- * Test queue name.
- */
- @Test
- public void testQueueName() {
- String moduleId = "Heartbeat";
- Map sqsConfig = new HashMap<>();
- DefaultAmazonSQSManager mgr = getManagerWith(sqsConfig);
- assertEquals(SystemInfoUtils.DEFAULT_INSTANCE_ID + "-Sink-Heartbeat", mgr.getSinkQueueName(moduleId));
-
- sqsConfig.put(AmazonSQSConstants.AWS_QUEUE_NAME_PREFIX, "PROD");
- mgr = getManagerWith(sqsConfig);
- assertEquals("PROD-" + SystemInfoUtils.DEFAULT_INSTANCE_ID + "-Sink-Heartbeat", mgr.getSinkQueueName(moduleId));
-
- sqsConfig.put(AmazonSQSConstants.SINK_QUEUE_PROP_PREFIX + AmazonSQSQueueAttributes.FifoQueue.toString(), "true");
- mgr = getManagerWith(sqsConfig);
- assertEquals("PROD-" + SystemInfoUtils.DEFAULT_INSTANCE_ID + "-Sink-Heartbeat.fifo", mgr.getSinkQueueName(moduleId));
- }
-
- /**
- * Test queue attributes.
- */
- @Test
- public void testQueueAttributes() {
- Map sqsConfig = new HashMap<>();
- sqsConfig.put(AmazonSQSConstants.AWS_REGION, "us-east-2");
-
- // FifoQueue=false should not be passed.
- AmazonSQSQueueConfig queueConfig = getSinkQueueConfig(sqsConfig);
- Map queueAttributes = queueConfig.getAttributes();
- assertThat(queueAttributes, not(hasKey(AmazonSQSQueueAttributes.FifoQueue.toString())));
- assertThat(queueAttributes, not(hasKey(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString())));
-
- sqsConfig.put(AmazonSQSConstants.SINK_QUEUE_PROP_PREFIX + AmazonSQSQueueAttributes.FifoQueue.toString(), "true");
- queueConfig = getSinkQueueConfig(sqsConfig);
- queueAttributes = queueConfig.getAttributes();
- assertThat(queueConfig.isFifoEnabled(), equalTo(true));
- assertThat(queueConfig.isFifoContentDedupEnabled(), equalTo(false));
- // FifoQueue was added as well as ContentBasedDeduplication
- assertThat(queueAttributes, hasEntry(AmazonSQSQueueAttributes.FifoQueue.toString(), "true"));
- assertThat(queueAttributes, hasEntry(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString(), "false"));
-
- sqsConfig.put(AmazonSQSConstants.SINK_QUEUE_PROP_PREFIX + AmazonSQSQueueAttributes.ContentBasedDeduplication.toString(), "true");
- queueConfig = getSinkQueueConfig(sqsConfig);
- queueAttributes = queueConfig.getAttributes();
- assertThat(queueConfig.isFifoEnabled(), equalTo(true));
- assertThat(queueConfig.isFifoContentDedupEnabled(), equalTo(true));
- // FifoQueue was added as well as ContentBasedDeduplication
- assertThat(queueAttributes, hasEntry(AmazonSQSQueueAttributes.FifoQueue.toString(), "true"));
- assertThat(queueAttributes, hasEntry(AmazonSQSQueueAttributes.ContentBasedDeduplication.toString(), "true"));
-
- // Another entry
- sqsConfig.put(AmazonSQSConstants.SINK_QUEUE_PROP_PREFIX + AmazonSQSQueueAttributes.Policy.toString(), "a-policy-here");
- queueConfig = getSinkQueueConfig(sqsConfig);
- queueAttributes = queueConfig.getAttributes();
- assertThat(queueAttributes, hasEntry(AmazonSQSQueueAttributes.Policy.toString(), "a-policy-here"));
- }
-
- private DefaultAmazonSQSManager getManagerWith(Map sqsConfig) {
- AmazonSQSConfig config = new MapBasedSQSConfig(sqsConfig);
- return new DefaultAmazonSQSManager(config);
- }
-
- private AmazonSQSQueueConfig getSinkQueueConfig(Map sqsConfig) {
- AmazonSQSConfig config = new MapBasedSQSConfig(sqsConfig);
- return config.getSinkQueueConfig();
- }
-}
diff --git a/core/ipc/common/kafka-shell/pom.xml b/core/ipc/common/kafka-shell/pom.xml
index b77879e4ae5d..6c32428f6fae 100644
--- a/core/ipc/common/kafka-shell/pom.xml
+++ b/core/ipc/common/kafka-shell/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipc.commonorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/ipc/common/kafka/pom.xml b/core/ipc/common/kafka/pom.xml
index e4c6b0f3e4fc..6caf521d97e9 100644
--- a/core/ipc/common/kafka/pom.xml
+++ b/core/ipc/common/kafka/pom.xml
@@ -4,7 +4,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.common
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.common
@@ -46,7 +46,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpn
diff --git a/core/ipc/common/kafka/src/main/java/org/opennms/core/ipc/common/kafka/KafkaTwinConstants.java b/core/ipc/common/kafka/src/main/java/org/opennms/core/ipc/common/kafka/KafkaTwinConstants.java
new file mode 100644
index 000000000000..0ca3a735c5cf
--- /dev/null
+++ b/core/ipc/common/kafka/src/main/java/org/opennms/core/ipc/common/kafka/KafkaTwinConstants.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2016 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2016 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.common.kafka;
+
+public interface KafkaTwinConstants {
+ String KAFKA_CONFIG_PID = "org.opennms.core.ipc.twin.kafka";
+ String KAFKA_CONFIG_SYS_PROP_PREFIX = KAFKA_CONFIG_PID + ".";
+}
diff --git a/core/ipc/common/pom.xml b/core/ipc/common/pom.xml
index f829dad688af..f4be6d5d8009 100644
--- a/core/ipc/common/pom.xml
+++ b/core/ipc/common/pom.xml
@@ -3,7 +3,7 @@
org.opennms.coreorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc
@@ -11,7 +11,6 @@
pomOpenNMS :: Core :: IPC :: Common
- aws-sqskafkakafka-shell
diff --git a/core/ipc/grpc/client/pom.xml b/core/ipc/grpc/client/pom.xml
index b1b34757a07e..60300ee844eb 100644
--- a/core/ipc/grpc/client/pom.xml
+++ b/core/ipc/grpc/client/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipc.grpcorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
@@ -59,12 +59,12 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnprovidedorg.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/grpc/client/src/main/java/org/opennms/core/ipc/grpc/client/MinionGrpcClient.java b/core/ipc/grpc/client/src/main/java/org/opennms/core/ipc/grpc/client/MinionGrpcClient.java
index 65200b157510..70330a34216a 100644
--- a/core/ipc/grpc/client/src/main/java/org/opennms/core/ipc/grpc/client/MinionGrpcClient.java
+++ b/core/ipc/grpc/client/src/main/java/org/opennms/core/ipc/grpc/client/MinionGrpcClient.java
@@ -122,7 +122,7 @@
public class MinionGrpcClient extends AbstractMessageDispatcherFactory {
private static final Logger LOG = LoggerFactory.getLogger(MinionGrpcClient.class);
- private static final long SINK_BLOCKING_TIMEOUT = 3000;
+ private static final long SINK_BLOCKING_TIMEOUT = 1000;
private static final int SINK_BLOCKING_THREAD_POOL_SIZE = 100;
private ManagedChannel channel;
private OpenNMSIpcGrpc.OpenNMSIpcStub asyncStub;
diff --git a/core/ipc/grpc/common/pom.xml b/core/ipc/grpc/common/pom.xml
index 01c633112a9a..60bb3e3dcdbe 100644
--- a/core/ipc/grpc/common/pom.xml
+++ b/core/ipc/grpc/common/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipc.grpcorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.grpc
@@ -34,7 +34,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
diff --git a/core/ipc/grpc/itests/pom.xml b/core/ipc/grpc/itests/pom.xml
index a1fa1d27cf0e..26c714abee3b 100644
--- a/core/ipc/grpc/itests/pom.xml
+++ b/core/ipc/grpc/itests/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipc.grpcorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
@@ -47,12 +47,12 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnprovidedorg.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcRpcIT.java b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcRpcIT.java
index 9af10319e3e2..d68134646518 100644
--- a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcRpcIT.java
+++ b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcRpcIT.java
@@ -47,6 +47,8 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.opennms.core.grpc.common.GrpcIpcServer;
+import org.opennms.core.grpc.common.GrpcIpcServerBuilder;
import org.opennms.core.ipc.grpc.client.GrpcClientConstants;
import org.opennms.core.ipc.grpc.client.MinionGrpcClient;
import org.opennms.core.ipc.grpc.common.RpcRequestProto;
@@ -91,8 +93,8 @@ public void setup() throws Exception {
grpcClient = new MinionGrpcClient(minionIdentity, configAdmin);
grpcClient.bind(echoRpcModule);
- server = new OpennmsGrpcServer();
- server.setConfigAdmin(configAdmin);
+ GrpcIpcServer grpcIpcServer = new GrpcIpcServerBuilder(configAdmin, port, "PT0S");
+ server = new OpennmsGrpcServer(grpcIpcServer);
echoClient = new MockEchoClient(server);
server.start();
grpcClient.start();
@@ -120,7 +122,7 @@ public void testRpcWithDefaultLocation() {
@Test(timeout = 30000)
public void testRpcAtRemoteLocation() {
- await().atMost(10, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
+ await().atMost(15, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
.until(() -> {
grpcClient.dispatch(new HeartbeatModule(), null, new Heartbeat());
return server.getRpcHandlerByLocation().size();
@@ -135,12 +137,11 @@ public void testRpcAtRemoteLocation() {
} catch (InterruptedException | ExecutionException e) {
fail();
}
-
}
@Test(timeout = 30000)
public void testLargeMessageWithRpcAtRemoteLocation() {
- await().atMost(10, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
+ await().atMost(15, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
.until(() -> {
grpcClient.dispatch(new HeartbeatModule(), null, new Heartbeat());
return server.getRpcHandlerByLocation().size();
diff --git a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcSinkIT.java b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcSinkIT.java
index 9fb1b69d5ff8..a28281d66f03 100644
--- a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcSinkIT.java
+++ b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcIpcSinkIT.java
@@ -44,6 +44,8 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import org.opennms.core.grpc.common.GrpcIpcServer;
+import org.opennms.core.grpc.common.GrpcIpcServerBuilder;
import org.opennms.core.ipc.grpc.client.GrpcClientConstants;
import org.opennms.core.ipc.grpc.client.MinionGrpcClient;
import org.opennms.core.ipc.grpc.server.GrpcServerConstants;
@@ -82,8 +84,8 @@ public void setup() throws Exception {
MinionIdentity minionIdentity = new MockMinionIdentity(REMOTE_LOCATION_NAME);
grpcClient = new MinionGrpcClient(minionIdentity, configAdmin);
- server = new OpennmsGrpcServer();
- server.setConfigAdmin(configAdmin);
+ GrpcIpcServer grpcIpcServer = new GrpcIpcServerBuilder(configAdmin, port, "PT0S");
+ server = new OpennmsGrpcServer(grpcIpcServer);
grpcClient.start();
}
diff --git a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcTLSMutualAuthIT.java b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcTLSMutualAuthIT.java
index 0e472e97bb27..4ef9e0c561e1 100644
--- a/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcTLSMutualAuthIT.java
+++ b/core/ipc/grpc/itests/src/test/java/org/opennms/core/ipc/grpc/GrpcTLSMutualAuthIT.java
@@ -44,6 +44,8 @@
import org.junit.Before;
import org.junit.Test;
+import org.opennms.core.grpc.common.GrpcIpcServer;
+import org.opennms.core.grpc.common.GrpcIpcServerBuilder;
import org.opennms.core.ipc.grpc.client.GrpcClientConstants;
import org.opennms.core.ipc.grpc.client.MinionGrpcClient;
import org.opennms.core.ipc.grpc.server.GrpcServerConstants;
@@ -96,8 +98,8 @@ public void setup() throws Exception {
grpcClient = new MinionGrpcClient(minionIdentity, configAdmin);
grpcClient.bind(echoRpcModule);
- server = new OpennmsGrpcServer();
- server.setConfigAdmin(configAdmin);
+ GrpcIpcServer grpcIpcServer = new GrpcIpcServerBuilder(configAdmin, port, "PT0S");
+ server = new OpennmsGrpcServer(grpcIpcServer);
echoClient = new MockEchoClient(server);
server.start();
grpcClient.start();
@@ -105,7 +107,7 @@ public void setup() throws Exception {
@Test(timeout = 30000)
public void testgRPCWithTLSAtRemoteLocation() {
- await().atMost(10, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
+ await().atMost(15, TimeUnit.SECONDS).pollInterval(2, TimeUnit.SECONDS)
.until(() -> {
grpcClient.dispatch(new HeartbeatModule(), null, new Heartbeat());
return server.getRpcHandlerByLocation().size();
diff --git a/core/ipc/grpc/pom.xml b/core/ipc/grpc/pom.xml
index 6afd4b1b15eb..f16f5d7ca094 100644
--- a/core/ipc/grpc/pom.xml
+++ b/core/ipc/grpc/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipcorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0OpenNMS :: Core :: IPC :: GRPC :: Parent
diff --git a/core/ipc/grpc/server/pom.xml b/core/ipc/grpc/server/pom.xml
index 20c16ed4de87..2c1e7dfbb6de 100644
--- a/core/ipc/grpc/server/pom.xml
+++ b/core/ipc/grpc/server/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipc.grpcorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.grpc
@@ -33,7 +33,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
@@ -41,6 +41,11 @@
grpc-netty-shaded${grpcVersion}
+
+ org.opennms.core.grpc
+ org.opennms.core.grpc.common
+ ${project.version}
+ org.opennms.core.ipc.grpcorg.opennms.core.ipc.grpc.common
@@ -63,7 +68,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/grpc/server/src/main/java/org/opennms/core/ipc/grpc/server/OpennmsGrpcServer.java b/core/ipc/grpc/server/src/main/java/org/opennms/core/ipc/grpc/server/OpennmsGrpcServer.java
index 6fdbb7026ed2..751b6115595b 100644
--- a/core/ipc/grpc/server/src/main/java/org/opennms/core/ipc/grpc/server/OpennmsGrpcServer.java
+++ b/core/ipc/grpc/server/src/main/java/org/opennms/core/ipc/grpc/server/OpennmsGrpcServer.java
@@ -28,26 +28,15 @@
package org.opennms.core.ipc.grpc.server;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.DEFAULT_GRPC_PORT;
import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.DEFAULT_GRPC_TTL;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.DEFAULT_MESSAGE_SIZE;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.GRPC_MAX_INBOUND_SIZE;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.GRPC_SERVER_PID;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.GRPC_SERVER_PORT;
import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.GRPC_TTL_PROPERTY;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.PRIVATE_KEY_FILE_PATH;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.SERVER_CERTIFICATE_FILE_PATH;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.TLS_ENABLED;
-import static org.opennms.core.ipc.grpc.server.GrpcServerConstants.TRUST_CERTIFICATE_FILE_PATH;
import static org.opennms.core.ipc.sink.api.Message.SINK_METRIC_CONSUMER_DOMAIN;
import static org.opennms.core.rpc.api.RpcModule.MINION_HEADERS_MODULE;
import static org.opennms.core.tracing.api.TracerConstants.TAG_LOCATION;
import static org.opennms.core.tracing.api.TracerConstants.TAG_SYSTEM_ID;
import static org.opennms.core.tracing.api.TracerConstants.TAG_TIMEOUT;
-import java.io.File;
import java.io.IOException;
-import java.net.InetSocketAddress;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -65,7 +54,7 @@
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.opennms.core.ipc.grpc.common.ConfigUtils;
+import org.opennms.core.grpc.common.GrpcIpcServer;
import org.opennms.core.ipc.grpc.common.Empty;
import org.opennms.core.ipc.grpc.common.OpenNMSIpcGrpc;
import org.opennms.core.ipc.grpc.common.RpcRequestProto;
@@ -89,7 +78,6 @@
import org.opennms.core.tracing.util.TracingInfoCarrier;
import org.opennms.core.utils.PropertiesUtils;
import org.opennms.distributed.core.api.Identity;
-import org.osgi.service.cm.ConfigurationAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -104,12 +92,6 @@
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.google.protobuf.ByteString;
-import io.grpc.Server;
-import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts;
-import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
-import io.grpc.netty.shaded.io.netty.handler.ssl.ClientAuth;
-import io.grpc.netty.shaded.io.netty.handler.ssl.SslContextBuilder;
-import io.grpc.netty.shaded.io.netty.handler.ssl.SslProvider;
import io.grpc.stub.StreamObserver;
import io.opentracing.References;
import io.opentracing.Scope;
@@ -141,8 +123,7 @@
public class OpennmsGrpcServer extends AbstractMessageConsumerManager implements RpcClientFactory {
private static final Logger LOG = LoggerFactory.getLogger(OpennmsGrpcServer.class);
- private ConfigurationAdmin configAdmin;
- private Server server;
+ private final GrpcIpcServer grpcIpcServer;
private String location;
private Identity identity;
private Properties properties;
@@ -184,26 +165,19 @@ public class OpennmsGrpcServer extends AbstractMessageConsumerManager implements
// Maintains the map of sink consumer executor and by module Id.
private final Map sinkConsumersByModuleId = new ConcurrentHashMap<>();
+ public OpennmsGrpcServer(GrpcIpcServer grpcIpcServer) {
+ this.grpcIpcServer = grpcIpcServer;
+ }
+
public void start() throws IOException {
try (Logging.MDCCloseable mdc = Logging.withPrefixCloseable(RpcClientFactory.LOG_PREFIX)) {
- properties = ConfigUtils.getPropertiesFromConfig(configAdmin, GRPC_SERVER_PID);
- int port = PropertiesUtils.getProperty(properties, GRPC_SERVER_PORT, DEFAULT_GRPC_PORT);
- int maxInboundMessageSize = PropertiesUtils.getProperty(properties, GRPC_MAX_INBOUND_SIZE, DEFAULT_MESSAGE_SIZE);
+
+ grpcIpcServer.startServer(new OpennmsIpcService());
+ LOG.info("Added RPC/Sink Service to OpenNMS IPC Grpc Server");
+
+ properties = grpcIpcServer.getProperties();
ttl = PropertiesUtils.getProperty(properties, GRPC_TTL_PROPERTY, DEFAULT_GRPC_TTL);
- boolean tlsEnabled = PropertiesUtils.getProperty(properties, TLS_ENABLED, false);
-
- NettyServerBuilder serverBuilder = NettyServerBuilder.forAddress(new InetSocketAddress(port))
- .addService(new OpennmsIpcService())
- .maxInboundMessageSize(maxInboundMessageSize);
- if (tlsEnabled) {
- SslContextBuilder sslContextBuilder = getSslContextBuilder();
- if (sslContextBuilder != null) {
- serverBuilder.sslContext(sslContextBuilder.build());
- LOG.info("TLS enabled for gRPC");
- }
- }
- server = serverBuilder.build();
rpcTimeoutExecutor.execute(this::handleRpcTimeouts);
rpcMetricsReporter = JmxReporter.forRegistry(getRpcMetrics())
.inDomain(JMX_DOMAIN_RPC)
@@ -213,35 +187,13 @@ public void start() throws IOException {
.inDomain(SINK_METRIC_CONSUMER_DOMAIN)
.build();
sinkMetricsReporter.start();
- server.start();
// Initialize tracer from tracer registry.
if (tracerRegistry != null) {
tracerRegistry.init(identity.getId());
}
- LOG.info("OpenNMS gRPC server started");
}
}
-
- private SslContextBuilder getSslContextBuilder() {
- String certChainFilePath = properties.getProperty(SERVER_CERTIFICATE_FILE_PATH);
- String privateKeyFilePath = properties.getProperty(PRIVATE_KEY_FILE_PATH);
- String trustCertCollectionFilePath = properties.getProperty(TRUST_CERTIFICATE_FILE_PATH);
- if (Strings.isNullOrEmpty(certChainFilePath) || Strings.isNullOrEmpty(privateKeyFilePath)) {
- return null;
- }
-
- SslContextBuilder sslClientContextBuilder = SslContextBuilder.forServer(new File(certChainFilePath),
- new File(privateKeyFilePath));
- if (!Strings.isNullOrEmpty(trustCertCollectionFilePath)) {
- sslClientContextBuilder.trustManager(new File(trustCertCollectionFilePath));
- sslClientContextBuilder.clientAuth(ClientAuth.REQUIRE);
- }
- return GrpcSslContexts.configure(sslClientContextBuilder,
- SslProvider.OPENSSL);
- }
-
-
@Override
protected void startConsumingForModule(SinkModule, Message> module) throws Exception {
if (sinkConsumersByModuleId.get(module.getId()) == null) {
@@ -463,10 +415,6 @@ public void setIdentity(Identity identity) {
this.identity = identity;
}
- public void setConfigAdmin(ConfigurationAdmin configAdmin) {
- this.configAdmin = configAdmin;
- }
-
private MetricRegistry getRpcMetrics() {
if (rpcMetrics == null) {
rpcMetrics = new MetricRegistry();
@@ -519,9 +467,7 @@ public void shutdown() {
if (sinkMetricsReporter != null) {
sinkMetricsReporter.close();
}
- if (server != null) {
- server.shutdown();
- }
+ grpcIpcServer.stopServer();
rpcTimeoutExecutor.shutdownNow();
responseHandlerExecutor.shutdownNow();
LOG.info("OpenNMS gRPC server stopped");
diff --git a/core/ipc/grpc/server/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/core/ipc/grpc/server/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 61f9129676ba..f07798edec66 100644
--- a/core/ipc/grpc/server/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/core/ipc/grpc/server/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -1,35 +1,21 @@
-
-
-
-
-
-
-
-
+
+
+
+
-
diff --git a/core/ipc/osgi/pom.xml b/core/ipc/osgi/pom.xml
index da519c39b356..17f96138353c 100644
--- a/core/ipc/osgi/pom.xml
+++ b/core/ipc/osgi/pom.xml
@@ -5,7 +5,7 @@
org.opennms.core.ipcorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
@@ -47,9 +47,19 @@
org.opennms.core.ipc.sink.common${project.version}
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.api
+ ${project.version}
+
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.common
+ ${project.version}
+ org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/osgi/src/main/java/org/opennms/core/ipc/twin/osgi/OsgiTwinPublisher.java b/core/ipc/osgi/src/main/java/org/opennms/core/ipc/twin/osgi/OsgiTwinPublisher.java
new file mode 100644
index 000000000000..7bb16dae447e
--- /dev/null
+++ b/core/ipc/osgi/src/main/java/org/opennms/core/ipc/twin/osgi/OsgiTwinPublisher.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.osgi;
+
+import java.io.IOException;
+
+import org.opennms.core.ipc.twin.api.TwinPublisher;
+import org.opennms.core.soa.lookup.ServiceLookup;
+import org.opennms.core.soa.lookup.ServiceLookupBuilder;
+import org.opennms.core.soa.lookup.ServiceRegistryLookup;
+import org.opennms.core.soa.support.DefaultServiceRegistry;
+
+public class OsgiTwinPublisher implements TwinPublisher {
+
+ private final ServiceLookup, String> blockingServiceLookup;
+
+ public OsgiTwinPublisher() {
+ this.blockingServiceLookup = new ServiceLookupBuilder(new ServiceRegistryLookup(DefaultServiceRegistry.INSTANCE))
+ .blocking()
+ .build();
+ ;
+ }
+
+ private TwinPublisher getDelegate() throws IOException {
+ final TwinPublisher twinPublisher = this.blockingServiceLookup.lookup(TwinPublisher.class, "(!(strategy=delegate))");
+ if (twinPublisher != null) {
+ return twinPublisher;
+ } else {
+ throw new IOException("Only delegate publisher is registered. No real publisher available");
+ }
+ }
+
+ @Override
+ public Session register(String key, Class clazz, String location) throws IOException {
+ return this.getDelegate().register(key, clazz, location);
+ }
+
+ @Override
+ public void close() throws IOException {
+ this.getDelegate().close();
+ }
+}
diff --git a/core/ipc/osgi/src/main/resources/META-INF/opennms/applicationContext-ipc-osgi.xml b/core/ipc/osgi/src/main/resources/META-INF/opennms/applicationContext-ipc-osgi.xml
index acf688691795..35ebecdb56e1 100644
--- a/core/ipc/osgi/src/main/resources/META-INF/opennms/applicationContext-ipc-osgi.xml
+++ b/core/ipc/osgi/src/main/resources/META-INF/opennms/applicationContext-ipc-osgi.xml
@@ -17,6 +17,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/ipc/pom.xml b/core/ipc/pom.xml
index c8da82fc73c4..cf98cf695d17 100644
--- a/core/ipc/pom.xml
+++ b/core/ipc/pom.xml
@@ -3,7 +3,7 @@
org.opennmsorg.opennms.core
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core
@@ -16,5 +16,6 @@
sinkgrpcosgi
+ twin
diff --git a/core/ipc/rpc/api/pom.xml b/core/ipc/rpc/api/pom.xml
index 05e1aa2cfa5d..2120a2410a8c 100644
--- a/core/ipc/rpc/api/pom.xml
+++ b/core/ipc/rpc/api/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.rpc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.rpc
diff --git a/core/ipc/rpc/aws-sqs-impl/pom.xml b/core/ipc/rpc/aws-sqs-impl/pom.xml
deleted file mode 100644
index 5bcf7ead15ee..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
- org.opennms.core.ipc
- org.opennms.core.ipc.rpc
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.rpc
- org.opennms.core.ipc.rpc.aws-sqs-impl
- OpenNMS :: Core :: IPC :: RPC :: Amazon SQS Impl.
- bundle
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
-
-
-
-
-
- org.opennms.core.ipc.rpc
- org.opennms.core.ipc.rpc.common
-
-
- org.opennms.core.ipc.rpc
- org.opennms.core.ipc.rpc.camel
-
-
- org.opennms.core.ipc.common
- org.opennms.core.ipc.common.aws-sqs
- ${project.version}
-
-
- org.opennms.features.distributed
- core-api
- ${project.version}
- provided
-
-
- org.opennms.core
- org.opennms.core.daemon
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.activemq
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.snmp
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.services
- test
-
-
- org.opennms.core.tracing
- org.opennms.core.tracing.registry
- ${project.version}
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.camel
- test
-
-
- org.opennms.core.ipc.rpc
- org.opennms.core.ipc.rpc.camel
- ${project.version}
- test-jar
- test
-
-
- org.hamcrest
- hamcrest-library
- test
-
-
- org.opennms
- opennms-dao
- test
-
-
- org.opennms
- opennms-dao-mock
- test
-
-
-
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSClientPreProcessor.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSClientPreProcessor.java
deleted file mode 100644
index 1c9c5ae6f8fa..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSClientPreProcessor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import org.apache.camel.Exchange;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSQueueException;
-import org.opennms.core.rpc.api.RpcRequest;
-import org.opennms.core.rpc.api.RpcResponse;
-import org.opennms.core.rpc.camel.CamelRpcClientPreProcessor;
-import org.opennms.core.rpc.camel.CamelRpcConstants;
-import org.opennms.core.rpc.camel.CamelRpcRequest;
-
-import java.util.Objects;
-
-public class AmazonSQSClientPreProcessor extends CamelRpcClientPreProcessor {
-
- private final AmazonSQSManager sqsManager;
-
- public AmazonSQSClientPreProcessor(AmazonSQSManager sqsManager) {
- this.sqsManager = Objects.requireNonNull(sqsManager);
- }
-
- @Override
- public void process(Exchange exchange) throws AmazonSQSQueueException {
- @SuppressWarnings("unchecked")
- final CamelRpcRequest wrapper = exchange.getIn().getBody(CamelRpcRequest.class);
-
- final String requestQueueName = sqsManager.getRpcRequestQueueNameAndCreateIfNecessary(
- wrapper.getModule().getId(),
- wrapper.getRequest().getLocation());
- final String replyQueueName = sqsManager.getRpcReplyQueueNameAndCreateIfNecessary(
- wrapper.getModule().getId(),
- wrapper.getRequest().getLocation());
- exchange.getIn().setHeader(CamelRpcConstants.JMS_QUEUE_NAME_HEADER, requestQueueName);
- exchange.getIn().setHeader(CamelRpcConstants.JMS_REPLY_TO_QUEUE_NAME_HEADER, replyQueueName);
-
- exchange.getIn().setHeader(CamelRpcConstants.CAMEL_JMS_REQUEST_TIMEOUT_HEADER, wrapper.getRequest().getTimeToLiveMs() != null ? wrapper.getRequest().getTimeToLiveMs() : CAMEL_JMS_REQUEST_TIMEOUT);
- if (wrapper.getRequest().getSystemId() != null) {
- exchange.getIn().setHeader(CamelRpcConstants.JMS_SYSTEM_ID_HEADER, wrapper.getRequest().getSystemId());
- }
-
- final String request = wrapper.getModule().marshalRequest((RpcRequest)wrapper.getRequest());
- exchange.getIn().setBody(request);
- }
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSRPCConstants.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSRPCConstants.java
deleted file mode 100644
index 251e33d699ff..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSRPCConstants.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-public interface AmazonSQSRPCConstants {
-
- static final String AWS_SQS_CORRELATION_ID_HEADER = "RPCCorrelationId";
-
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerProcessor.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerProcessor.java
deleted file mode 100644
index e52afc451007..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerProcessor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import org.apache.camel.Exchange;
-import org.opennms.core.rpc.api.RpcModule;
-import org.opennms.core.rpc.api.RpcRequest;
-import org.opennms.core.rpc.api.RpcResponse;
-import org.opennms.core.rpc.camel.CamelRpcServerProcessor;
-import org.opennms.core.tracing.api.TracerRegistry;
-
-public class AmazonSQSServerProcessor extends CamelRpcServerProcessor {
- public AmazonSQSServerProcessor(RpcModule module, TracerRegistry tracerRegistry) {
- super(module, tracerRegistry);
- }
-
- @Override
- public void postProcess(Exchange exchange) {
- // Copy the value of the correlation id header from the in to the out
- exchange.getOut().setHeader(AmazonSQSRPCConstants.AWS_SQS_CORRELATION_ID_HEADER,
- exchange.getIn().getHeader(AmazonSQSRPCConstants.AWS_SQS_CORRELATION_ID_HEADER));
- }
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerRouteManager.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerRouteManager.java
deleted file mode 100644
index 89018b85aa0a..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/AmazonSQSServerRouteManager.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import java.util.Objects;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.JmsEndpoint;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.rpc.api.RpcModule;
-import org.opennms.core.rpc.api.RpcRequest;
-import org.opennms.core.rpc.api.RpcResponse;
-import org.opennms.core.rpc.camel.CamelRpcServerRouteManager;
-import org.opennms.core.tracing.api.TracerRegistry;
-import org.opennms.distributed.core.api.MinionIdentity;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AmazonSQSServerRouteManager extends CamelRpcServerRouteManager {
- private static final Logger LOG = LoggerFactory.getLogger(CamelRpcServerRouteManager.class);
-
- private final AmazonSQSManager sqsManager;
- private final TracerRegistry tracerRegistry;
-
- public AmazonSQSServerRouteManager(CamelContext context, MinionIdentity identity, AmazonSQSManager sqsManager, TracerRegistry tracerRegistry) {
- super(context, identity);
- this.sqsManager = Objects.requireNonNull(sqsManager);
- this.tracerRegistry = Objects.requireNonNull(tracerRegistry);
- }
-
- @Override
- public RouteBuilder getRouteBuilder(CamelContext context, MinionIdentity identity, RpcModule module) {
- return new DynamicRpcRouteBuilder(sqsManager, context, identity, module, tracerRegistry);
- }
-
- private static final class DynamicRpcRouteBuilder extends RouteBuilder {
- private final AmazonSQSManager sqsManager;
- private final MinionIdentity identity;
- private final RpcModule module;
- private final TracerRegistry tracerRegistry;
-
- private DynamicRpcRouteBuilder(AmazonSQSManager sqsManager, CamelContext context, MinionIdentity identity, RpcModule module, TracerRegistry tracerRegistry) {
- super(context);
- this.sqsManager = sqsManager;
- this.identity = identity;
- this.module = module;
- this.tracerRegistry = tracerRegistry;
- }
-
- @Override
- public void configure() throws Exception {
- final String requestQueueName = sqsManager.getRpcRequestQueueNameAndCreateIfNecessary(module.getId(), identity.getLocation());
- final JmsEndpoint endpoint = getContext().getEndpoint(String.format("jms:queue:%s?connectionFactory=#connectionFactory"
- + "&correlationProperty=%s"
- + "&asyncConsumer=true", requestQueueName,
- AmazonSQSRPCConstants.AWS_SQS_CORRELATION_ID_HEADER), JmsEndpoint.class);
- tracerRegistry.init(identity.getLocation()+"@"+identity.getId());
- from(endpoint).setExchangePattern(ExchangePattern.InOut)
- .process(new SystemIdFilterProcessor(identity.getId()))
- .process(new AmazonSQSServerProcessor(module, tracerRegistry))
- .routeId(getRouteId(module));
- }
- }
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/ConditionalAmazonSqsRpcContext.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/ConditionalAmazonSqsRpcContext.java
deleted file mode 100644
index 3a60f4e8239c..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/ConditionalAmazonSqsRpcContext.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2016 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2016 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import org.opennms.core.rpc.common.RpcStrategy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ConfigurationCondition;
-import org.springframework.context.annotation.ImportResource;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-import static org.opennms.core.rpc.common.RpcStrategy.Strategy.SQS;
-
-@Configuration
-@Conditional(ConditionalAmazonSqsRpcContext.Condition.class)
-@ImportResource("/META-INF/opennms/applicationContext-rpc-client-sqs.xml")
-public class ConditionalAmazonSqsRpcContext {
- private static final Logger LOG = LoggerFactory.getLogger(ConditionalAmazonSqsRpcContext.class);
-
- static class Condition implements ConfigurationCondition {
- @Override
- public ConfigurationPhase getConfigurationPhase() {
- return ConfigurationPhase.PARSE_CONFIGURATION;
- }
-
- @Override
- public boolean matches(final ConditionContext context, final AnnotatedTypeMetadata metadata) {
- final boolean enabled = SQS.equals(RpcStrategy.getRpcStrategy());
- LOG.debug("Enable SQS RPC: {}", enabled);
- return enabled;
- }
- }
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/SystemIdFilterProcessor.java b/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/SystemIdFilterProcessor.java
deleted file mode 100644
index cac92cfefd01..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/java/org/opennms/core/rpc/aws/sqs/SystemIdFilterProcessor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.AsyncProcessor;
-import org.apache.camel.Exchange;
-import org.opennms.core.rpc.camel.CamelRpcConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Objects;
-
-public class SystemIdFilterProcessor implements AsyncProcessor {
- private static final Logger LOG = LoggerFactory.getLogger(SystemIdFilterProcessor.class);
-
- private final String systemId;
-
- public SystemIdFilterProcessor(String systemId) {
- this.systemId = Objects.requireNonNull(systemId);
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- throw new UnsupportedOperationException("This processor must be invoked using the async interface.");
- }
-
- @Override
- public boolean process(Exchange exchange, AsyncCallback callback) {
- // Retrieve the system id header in the given request
- final String targettedSystemId = (String)exchange.getIn().getHeader(CamelRpcConstants.JMS_SYSTEM_ID_HEADER);
- if (targettedSystemId == null || systemId.equals(targettedSystemId)) {
- // Either no system was specified, or the requested system id matches our
- // Accept the request
- } else {
- // We should reject this request, but the SQS JMS connector doesn't provide
- // a way for us to reset the visibility timeout of the message at this stage
- // so for now we just log and process the message anyways
- LOG.info("Directed RPCs are not supported with SQS. The message targeted to %s, but our system id is %s." +
- "Processing the message anyways.");
- }
- callback.done(false);
- return false;
- }
-}
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/applicationContext-rpc-client-sqs.xml b/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/applicationContext-rpc-client-sqs.xml
deleted file mode 100644
index d59f9aaa5aa7..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/applicationContext-rpc-client-sqs.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- jms:queue:${header.JmsQueueName}?connectionFactory=#connectionFactory&replyTo=${header.JmsReplyToQueueName}&replyToType=Exclusive&correlationProperty=RPCCorrelationId
-
-
-
-
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/component-dao.xml b/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/component-dao.xml
deleted file mode 100644
index d0f753bb159f..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/resources/META-INF/opennms/component-dao.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
diff --git a/core/ipc/rpc/aws-sqs-impl/src/main/resources/OSGI-INF/blueprint/blueprint-rpc-server.xml b/core/ipc/rpc/aws-sqs-impl/src/main/resources/OSGI-INF/blueprint/blueprint-rpc-server.xml
deleted file mode 100644
index 908381521697..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/main/resources/OSGI-INF/blueprint/blueprint-rpc-server.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/rpc/aws-sqs-impl/src/test/java/org/opennms/core/rpc/aws/sqs/EchoRpcBlueprintIT.java b/core/ipc/rpc/aws-sqs-impl/src/test/java/org/opennms/core/rpc/aws/sqs/EchoRpcBlueprintIT.java
deleted file mode 100644
index 2d0249012a0e..000000000000
--- a/core/ipc/rpc/aws-sqs-impl/src/test/java/org/opennms/core/rpc/aws/sqs/EchoRpcBlueprintIT.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2016 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2016 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.rpc.aws.sqs;
-
-import java.util.Dictionary;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.camel.util.KeyValueHolder;
-import org.junit.Ignore;
-import org.junit.runner.RunWith;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSConfig;
-import org.opennms.core.ipc.common.aws.sqs.MapBasedSQSConfig;
-import org.opennms.core.rpc.camel.MockMinionIdentity;
-import org.opennms.core.test.OpenNMSJUnit4ClassRunner;
-import org.opennms.distributed.core.api.MinionIdentity;
-import org.opennms.test.JUnitConfigurationEnvironment;
-import org.springframework.test.context.ContextConfiguration;
-
-@Ignore("Requires access to AWS")
-@RunWith(OpenNMSJUnit4ClassRunner.class)
-@ContextConfiguration(locations={
- "classpath:/META-INF/opennms/applicationContext-soa.xml",
- "classpath:/META-INF/opennms/applicationContext-mockDao.xml",
- "classpath:/META-INF/opennms/applicationContext-proxy-snmp.xml",
- "classpath:/META-INF/opennms/applicationContext-rpc-client-sqs.xml",
- "classpath:/META-INF/opennms/applicationContext-rpc-echo.xml",
- "classpath:/META-INF/opennms/applicationContext-tracer-registry.xml"
-})
-@JUnitConfigurationEnvironment(systemProperties={
- "org.opennms.core.ipc.aws.sqs.aws_use_http=true",
- "org.opennms.core.ipc.aws.sqs.aws_region=ca-central-1"})
-public class EchoRpcBlueprintIT extends org.opennms.core.rpc.camel.EchoRpcBlueprintIT {
-
- @SuppressWarnings( "rawtypes" )
- @Override
- protected void addServicesOnStartup(Map> services) {
- services.put(MinionIdentity.class.getName(),
- new KeyValueHolderorg.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
@@ -151,7 +151,7 @@
org.osgi
- org.osgi.core
+ osgi.coretest
diff --git a/core/ipc/rpc/mock-impl/pom.xml b/core/ipc/rpc/mock-impl/pom.xml
index 4218694a2c38..e3df3f3e241b 100644
--- a/core/ipc/rpc/mock-impl/pom.xml
+++ b/core/ipc/rpc/mock-impl/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.rpc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.rpc
diff --git a/core/ipc/rpc/pom.xml b/core/ipc/rpc/pom.xml
index 4048aad16cfd..81e5a08fef1b 100644
--- a/core/ipc/rpc/pom.xml
+++ b/core/ipc/rpc/pom.xml
@@ -3,7 +3,7 @@
org.opennms.coreorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc
@@ -12,7 +12,6 @@
OpenNMS :: Core :: IPC :: RPCapi
- aws-sqs-implcamelcommonjms-impl
diff --git a/core/ipc/rpc/shell-commands/pom.xml b/core/ipc/rpc/shell-commands/pom.xml
index 5fb689389429..ab33bf7226a8 100644
--- a/core/ipc/rpc/shell-commands/pom.xml
+++ b/core/ipc/rpc/shell-commands/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.rpc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.rpc
@@ -53,7 +53,7 @@
org.osgi
- org.osgi.enterprise
+ osgi.enterpriseprovided
diff --git a/core/ipc/rpc/utils/pom.xml b/core/ipc/rpc/utils/pom.xml
index 53ceccf0d527..3512c9df4f12 100644
--- a/core/ipc/rpc/utils/pom.xml
+++ b/core/ipc/rpc/utils/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.rpc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.rpc
diff --git a/core/ipc/rpc/xml/pom.xml b/core/ipc/rpc/xml/pom.xml
index 2dc6b112264a..18bc5257ce89 100644
--- a/core/ipc/rpc/xml/pom.xml
+++ b/core/ipc/rpc/xml/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.rpc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.rpc
diff --git a/core/ipc/sink/api/pom.xml b/core/ipc/sink/api/pom.xml
index dd667709b4e0..98d1709c27de 100644
--- a/core/ipc/sink/api/pom.xml
+++ b/core/ipc/sink/api/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
diff --git a/core/ipc/sink/aws-sqs/client/pom.xml b/core/ipc/sink/aws-sqs/client/pom.xml
deleted file mode 100644
index e9ba3ca0d5d8..000000000000
--- a/core/ipc/sink/aws-sqs/client/pom.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.aws.sqs
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.client
- OpenNMS :: Core :: IPC :: Sink :: AWS :: SQS :: Client
- bundle
-
- true
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
- !org.opennms.core.ipc.sink.aws.sqs.server,
- *
-
-
-
-
-
-
-
-
- org.osgi
- org.osgi.core
- provided
-
-
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.common
- ${project.version}
-
-
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.server
- ${project.version}
-
-
-
diff --git a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSConditionalSinkContext.java b/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSConditionalSinkContext.java
deleted file mode 100644
index 59196591fa99..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSConditionalSinkContext.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.client;
-
-import static org.opennms.core.ipc.sink.common.SinkStrategy.Strategy.SQS;
-
-import org.opennms.core.ipc.sink.api.MessageConsumerManager;
-import org.opennms.core.ipc.sink.common.SinkStrategy;
-import org.opennms.core.logging.Logging;
-import org.opennms.core.logging.Logging.MDCCloseable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ConfigurationCondition;
-import org.springframework.context.annotation.ImportResource;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-@Configuration
-@Conditional(AmazonSQSConditionalSinkContext.Condition.class)
-@ImportResource("/META-INF/opennms/applicationContext-ipc-sink-aws-client.xml")
-public class AmazonSQSConditionalSinkContext {
-
- /** The Constant LOG. */
- private static final Logger LOG = LoggerFactory.getLogger(AmazonSQSConditionalSinkContext.class);
-
- /**
- * The Class Condition.
- */
- static class Condition implements ConfigurationCondition {
-
- /* (non-Javadoc)
- * @see org.springframework.context.annotation.ConfigurationCondition#getConfigurationPhase()
- */
- @Override
- public ConfigurationPhase getConfigurationPhase() {
- return ConfigurationPhase.PARSE_CONFIGURATION;
- }
-
- /* (non-Javadoc)
- * @see org.springframework.context.annotation.Condition#matches(org.springframework.context.annotation.ConditionContext, org.springframework.core.type.AnnotatedTypeMetadata)
- */
- @Override
- public boolean matches(final ConditionContext context, final AnnotatedTypeMetadata metadata) {
- final boolean enabled = SQS.equals(SinkStrategy.getSinkStrategy());
- try (MDCCloseable mdc = Logging.withPrefixCloseable(MessageConsumerManager.LOG_PREFIX)) {
- LOG.debug("Enable AWS SQS Sink: {}", enabled);
- }
- return enabled;
- }
- }
-}
diff --git a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSLocalMessageDispatcherFactory.java b/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSLocalMessageDispatcherFactory.java
deleted file mode 100644
index 5bffebe18635..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSLocalMessageDispatcherFactory.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.client;
-
-import static org.opennms.core.ipc.sink.api.Message.SINK_METRIC_PRODUCER_DOMAIN;
-
-import org.opennms.core.ipc.sink.api.Message;
-import org.opennms.core.ipc.sink.api.SinkModule;
-import org.opennms.core.ipc.sink.aws.sqs.server.AmazonSQSMessageConsumerManager;
-import org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory;
-import org.osgi.framework.BundleContext;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.codahale.metrics.MetricRegistry;
-
-import io.opentracing.Tracer;
-import io.opentracing.util.GlobalTracer;
-
-/**
- * Dispatches the messages directly the consumers.
- *
- * @author Alejandro Galue
- */
-public class AmazonSQSLocalMessageDispatcherFactory extends AbstractMessageDispatcherFactory implements InitializingBean, DisposableBean {
-
- /** The message consumer manager. */
- @Autowired
- private AmazonSQSMessageConsumerManager messageConsumerManager;
-
- private MetricRegistry metrics;
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory#dispatch(org.opennms.core.ipc.sink.api.SinkModule, java.lang.Object, org.opennms.core.ipc.sink.api.Message)
- */
- public void dispatch(final SinkModule module, final Void metadata, final T message) {
- messageConsumerManager.dispatch(module, message);
- }
-
- /* (non-Javadoc)
- * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
- */
- @Override
- public void afterPropertiesSet() {
- onInit();
- }
-
- @Override
- public void destroy() {
- onDestroy();
- }
-
- @Override
- public String getMetricDomain() {
- return SINK_METRIC_PRODUCER_DOMAIN;
- }
-
- @Override
- public BundleContext getBundleContext() {
- return null;
- }
-
- @Override
- public Tracer getTracer() {
- return GlobalTracer.get();
- }
-
- @Override
- public MetricRegistry getMetrics() {
- return new MetricRegistry();
- }
-
- public void setMetrics(MetricRegistry metrics) {
- this.metrics = metrics;
- }
-}
diff --git a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSRemoteMessageDispatcherFactory.java b/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSRemoteMessageDispatcherFactory.java
deleted file mode 100644
index 0c077226fdef..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/java/org/opennms/core/ipc/sink/aws/sqs/client/AmazonSQSRemoteMessageDispatcherFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.client;
-
-import static org.opennms.core.ipc.sink.api.Message.SINK_METRIC_PRODUCER_DOMAIN;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.ipc.sink.api.Message;
-import org.opennms.core.ipc.sink.api.MessageConsumerManager;
-import org.opennms.core.ipc.sink.api.SinkModule;
-import org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory;
-import org.opennms.core.logging.Logging;
-import org.opennms.core.logging.Logging.MDCCloseable;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.model.AmazonSQSException;
-import com.codahale.metrics.MetricRegistry;
-
-import io.opentracing.Tracer;
-import io.opentracing.util.GlobalTracer;
-
-/**
- * A factory for creating AwsRemoteMessageDispatcher objects.
- *
- * @author Alejandro Galue
- */
-public class AmazonSQSRemoteMessageDispatcherFactory extends AbstractMessageDispatcherFactory {
-
- /** The Constant LOG. */
- private static final Logger LOG = LoggerFactory.getLogger(AmazonSQSRemoteMessageDispatcherFactory.class);
-
- /** The AWS SQS Object. */
- private AmazonSQS sqs;
-
- /** The AWS SQS manager. */
- private AmazonSQSManager awsSqsManager;
-
- private BundleContext bundleContext;
-
- private MetricRegistry metrics;
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.common.AbstractMessageDispatcherFactory#dispatch(org.opennms.core.ipc.sink.api.SinkModule, java.lang.Object, org.opennms.core.ipc.sink.api.Message)
- */
- @Override
- public void dispatch(SinkModule module, String topic, T message) {
- try (MDCCloseable mdc = Logging.withPrefixCloseable(MessageConsumerManager.LOG_PREFIX)) {
- LOG.trace("dispatch({}): sending message {}", topic, message);
- try {
- final String queueUrl = awsSqsManager.getSinkQueueUrlAndCreateIfNecessary(module.getId());
- final String messageId = awsSqsManager.sendMessage(queueUrl, new String(module.marshal((T)message), StandardCharsets.UTF_8));
- LOG.debug("SQS Message with ID {} has been successfully sent to {}", messageId, queueUrl);
- } catch (InterruptedException ex) {
- LOG.warn("Interrupted while trying to send message. Aborting.", ex);
- } catch (RuntimeException ex) {
- LOG.error("Unexpected AWS SDK exception while sending a message. Aborting.", ex);
- }
- }
- }
-
- /**
- * Initializes the producers.
- *
- * @throws IOException Signals that an I/O exception has occurred.
- */
- public void init() throws IOException {
- try (MDCCloseable mdc = Logging.withPrefixCloseable(MessageConsumerManager.LOG_PREFIX)) {
- try {
- sqs = awsSqsManager.getSQSClient();
- } catch (AmazonSQSException e) {
- LOG.error("Can't create an AmazonSQS Object", e);
- }
- onInit();
- }
- }
-
- /**
- * Destroy.
- */
- public void destroy() {
- onDestroy();
- sqs.shutdown();
- }
-
- @Override
- public String getMetricDomain() {
- return SINK_METRIC_PRODUCER_DOMAIN;
- }
-
- @Override
- public BundleContext getBundleContext() {
- return bundleContext;
- }
-
-
- @Override
- public Tracer getTracer() {
- return GlobalTracer.get();
- }
-
- /**
- * Sets the AWS SQS manager.
- *
- * @param awsSqsManager the new AWS SQS manager
- */
- public void setAwsSqsManager(AmazonSQSManager awsSqsManager) {
- this.awsSqsManager = awsSqsManager;
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-
- @Override
- public MetricRegistry getMetrics() {
- return new MetricRegistry();
- }
-
- public void setMetrics(MetricRegistry metrics) {
- this.metrics = metrics;
- }
-}
diff --git a/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-client.xml b/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-client.xml
deleted file mode 100644
index 219d879a59e1..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-client.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/component-dao.xml b/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/component-dao.xml
deleted file mode 100644
index a871c9e0c219..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/resources/META-INF/opennms/component-dao.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/client/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-client.xml b/core/ipc/sink/aws-sqs/client/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-client.xml
deleted file mode 100644
index 69ba83741c6e..000000000000
--- a/core/ipc/sink/aws-sqs/client/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-client.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/common/pom.xml b/core/ipc/sink/aws-sqs/common/pom.xml
deleted file mode 100644
index baf6fdcfb393..000000000000
--- a/core/ipc/sink/aws-sqs/common/pom.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.aws.sqs
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.common
- OpenNMS :: Core :: IPC :: Sink :: AWS :: SQS :: Common
- bundle
-
- true
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
-
-
-
-
-
- com.google.guava
- guava
-
-
- org.opennms.core
- org.opennms.core.logging
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.api
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.common
- ${project.version}
-
-
- org.osgi
- org.osgi.compendium
- provided
-
-
- org.opennms.dependencies
- spring-dependencies
- pom
-
-
- org.opennms.core.ipc.common
- org.opennms.core.ipc.common.aws-sqs
- ${project.version}
-
-
-
diff --git a/core/ipc/sink/aws-sqs/itests/pom.xml b/core/ipc/sink/aws-sqs/itests/pom.xml
deleted file mode 100644
index 1e8af9a44ee1..000000000000
--- a/core/ipc/sink/aws-sqs/itests/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.aws.sqs
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.itests
- OpenNMS :: Core :: IPC :: Sink :: AWS :: SQS :: Integration Tests
- bundle
-
- true
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
-
-
-
-
-
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.client
- ${project.version}
- test
-
-
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.server
- ${project.version}
- test
-
-
- org.opennms.core
- org.opennms.core.daemon
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.snmp
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.services
- test
-
-
- org.opennms.core.test-api
- org.opennms.core.test-api.camel
- test
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.xml
- test
-
-
- org.hamcrest
- hamcrest-library
- test
-
-
- com.jayway.awaitility
- awaitility
- test
-
-
- org.mockito
- mockito-core
-
-
- org.opennms
- opennms-dao
- test
-
-
- org.opennms
- opennms-dao-mock
- test
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.mock-impl
- ${project.version}
- test
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.common
- ${project.version}
- test-jar
- test
-
-
-
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/AmazonSQSDispatcherBlueprintIT.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/AmazonSQSDispatcherBlueprintIT.java
deleted file mode 100644
index 131dbfb2312e..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/AmazonSQSDispatcherBlueprintIT.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests;
-
-import org.apache.camel.util.KeyValueHolder;
-import org.junit.Test;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSConfig;
-import org.opennms.core.ipc.common.aws.sqs.MapBasedSQSConfig;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSConstants;
-import org.opennms.core.test.camel.CamelBlueprintTest;
-
-import java.util.Dictionary;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * The Class AwsDispatcherBlueprintIT.
- *
- * @author Alejandro Galue
- */
-public class AmazonSQSDispatcherBlueprintIT extends CamelBlueprintTest {
-
- @SuppressWarnings( "rawtypes" )
- @Override
- protected void addServicesOnStartup(Map> services) {
- services.put(AmazonSQSConfig.class.getName(),
- new KeyValueHolder(new MapBasedSQSConfig(),
- new Properties()));
- }
-
- /* (non-Javadoc)
- * @see org.apache.camel.test.blueprint.CamelBlueprintTestSupport#getBlueprintDescriptor()
- */
- @Override
- protected String getBlueprintDescriptor() {
- return "classpath:/OSGI-INF/blueprint/blueprint-ipc-client.xml,blueprint-empty-camel-context.xml";
- }
-
- /* (non-Javadoc)
- * @see org.apache.camel.test.blueprint.CamelBlueprintTestSupport#setConfigAdminInitialConfiguration(java.util.Properties)
- */
- @Override
- protected String setConfigAdminInitialConfiguration(final Properties props) {
- return AmazonSQSConstants.AWS_CONFIG_PID;
- }
-
- /**
- * Can blueprint load successfully.
- */
- @Test
- public void canBlueprintLoadSuccessfully() {
- }
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkIT.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkIT.java
deleted file mode 100644
index 6eb749dd41e1..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkIT.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2020 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests;
-
-import static com.jayway.awaitility.Awaitility.await;
-import static java.util.concurrent.TimeUnit.MINUTES;
-import static org.hamcrest.Matchers.equalTo;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.ipc.sink.api.MessageConsumer;
-import org.opennms.core.ipc.sink.api.MessageDispatcherFactory;
-import org.opennms.core.ipc.sink.api.SinkModule;
-import org.opennms.core.ipc.sink.api.SyncDispatcher;
-import org.opennms.core.ipc.sink.aws.sqs.client.AmazonSQSRemoteMessageDispatcherFactory;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.Heartbeat;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.HeartbeatModule;
-import org.opennms.core.ipc.sink.aws.sqs.server.AmazonSQSMessageConsumerManager;
-import org.opennms.core.test.OpenNMSJUnit4ClassRunner;
-import org.opennms.test.JUnitConfigurationEnvironment;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.model.Message;
-
-/**
- * The Class HeartbeatSinkIT.
- *
- * Warning: This test requires AWS Access and appropriate credentials stored on ~/.aws/credentials
- *
- * @author Alejandro Galue
- */
-@RunWith(OpenNMSJUnit4ClassRunner.class)
-@ContextConfiguration(locations={
- "classpath:/META-INF/opennms/applicationContext-soa.xml",
- "classpath:/META-INF/opennms/applicationContext-mockDao.xml",
- "classpath:/META-INF/opennms/applicationContext-proxy-snmp.xml",
- "classpath:/META-INF/opennms/applicationContext-ipc-sink-server-aws-mock.xml"
-})
-@JUnitConfigurationEnvironment
-public class HeartbeatSinkIT {
-
- /** The local message dispatcher factory. */
- @Autowired
- private MessageDispatcherFactory localMessageDispatcherFactory;
-
- /** The consumer manager. */
- @Autowired
- private AmazonSQSMessageConsumerManager consumerManager;
-
- /** The SQS manager. */
- @Autowired
- private AmazonSQSManager sqsManager;
-
- /** The remote message dispatcher factory. */
- private AmazonSQSRemoteMessageDispatcherFactory remoteMessageDispatcherFactory;
-
- /**
- * Sets the up.
- *
- * @throws Exception the exception
- */
- @Before
- public void setUp() throws Exception {
- remoteMessageDispatcherFactory = new AmazonSQSRemoteMessageDispatcherFactory();
- remoteMessageDispatcherFactory.setAwsSqsManager(sqsManager);
- remoteMessageDispatcherFactory.init();
-
- LinkedBlockingQueue bodies = new LinkedBlockingQueue<>();
- AmazonSQS sqsClient = mock(AmazonSQS.class, RETURNS_DEEP_STUBS);
- when(sqsClient.receiveMessage(anyString()).getMessages()).thenAnswer(new Answer>() {
- @Override
- public List answer(InvocationOnMock invocation) {
- List messageBodies = new LinkedList<>();
- bodies.drainTo(messageBodies);
- return messageBodies.stream()
- .map(b -> {
- Message msg = new Message();
- msg.setBody(b);
- return msg;
- })
- .collect(Collectors.toList());
- }
- });
-
- when(sqsManager.getSQSClient()).thenReturn(sqsClient);
- when(sqsManager.getSinkQueueUrlAndCreateIfNecessary(anyString())).thenReturn("some-url");
- when(sqsManager.sendMessage(anyString(), anyString())).thenAnswer(new Answer() {
- @Override
- public String answer(InvocationOnMock invocation) throws Throwable {
- String body = invocation.getArgument(1);
- bodies.add(body);
- return null;
- }
- });
- }
-
- /**
- * Can produce and consume messages.
- *
- * @throws Exception the exception
- */
- @Test(timeout=30000)
- public void canProduceAndConsumeMessages() throws Exception {
- HeartbeatModule module = new HeartbeatModule();
-
- AtomicInteger heartbeatCount = new AtomicInteger();
- final MessageConsumer heartbeatConsumer = new MessageConsumer() {
- @Override
- public SinkModule getModule() {
- return module;
- }
-
- @Override
- public void handleMessage(final Heartbeat heartbeat) {
- heartbeatCount.incrementAndGet();
- }
- };
-
- try {
- consumerManager.registerConsumer(heartbeatConsumer);
-
- final SyncDispatcher localDispatcher = localMessageDispatcherFactory.createSyncDispatcher(module);
- localDispatcher.send(new Heartbeat());
- await().atMost(1, MINUTES).until(() -> heartbeatCount.get(), equalTo(1));
-
- final SyncDispatcher dispatcher = remoteMessageDispatcherFactory.createSyncDispatcher(HeartbeatModule.INSTANCE);
-
- dispatcher.send(new Heartbeat());
- await().atMost(1, MINUTES).until(() -> heartbeatCount.get(), equalTo(2));
- } finally {
- consumerManager.unregisterConsumer(heartbeatConsumer);
- }
- }
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkPerfIT.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkPerfIT.java
deleted file mode 100644
index 3749e5283dbd..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/HeartbeatSinkPerfIT.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017-2020 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2020 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.model.Message;
-import com.codahale.metrics.Meter;
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.Timer;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.ipc.sink.api.SyncDispatcher;
-import org.opennms.core.ipc.sink.aws.sqs.server.AmazonSQSMessageConsumerManager;
-import org.opennms.core.ipc.sink.aws.sqs.client.AmazonSQSRemoteMessageDispatcherFactory;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.Heartbeat;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.HeartbeatConsumer;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.HeartbeatGenerator;
-import org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat.HeartbeatModule;
-import org.opennms.core.test.OpenNMSJUnit4ClassRunner;
-import org.opennms.test.JUnitConfigurationEnvironment;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-
-import static com.jayway.awaitility.Awaitility.await;
-import static org.hamcrest.Matchers.greaterThan;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-/**
- * Used to help profile the sink producer and consumer against AWS SQS.
- *
- * Warning: This test requires AWS Access and appropriate credentials stored on ~/.aws/credentials
- *
- * @author Alejandro Galue
- */
-@RunWith(OpenNMSJUnit4ClassRunner.class)
-@ContextConfiguration(locations={
- "classpath:/META-INF/opennms/applicationContext-soa.xml",
- "classpath:/META-INF/opennms/applicationContext-mockDao.xml",
- "classpath:/META-INF/opennms/applicationContext-proxy-snmp.xml",
- "classpath:/META-INF/opennms/applicationContext-ipc-sink-server-aws-mock.xml"
-})
-@JUnitConfigurationEnvironment
-public class HeartbeatSinkPerfIT {
-
- /** The consumer manager. */
- @Autowired
- private AmazonSQSMessageConsumerManager consumerManager;
-
- /** The SQS manager. */
- @Autowired
- private AmazonSQSManager sqsManager;
-
- /** The message dispatcher factory. */
- private AmazonSQSRemoteMessageDispatcherFactory messageDispatcherFactory = new AmazonSQSRemoteMessageDispatcherFactory();
-
- /** The generators. */
- private List generators = new ArrayList<>();
-
- /** The metrics. */
- private final MetricRegistry metrics = new MetricRegistry();
-
- /** The received meter. */
- private final Meter receivedMeter = metrics.meter("receivedMeter");
-
- /** The sent meter. */
- private final Meter sentMeter = metrics.meter("sent");
-
- /** The send timer. */
- private final Timer sendTimer = metrics.timer("send");
-
- /** The Constant NUM_CONSUMER_THREADS. */
- private static final int NUM_CONSUMER_THREADS = 2;
-
- /** The Constant NUM_GENERATORS. */
- private static final int NUM_GENERATORS = 2;
-
- /** The Constant RATE_PER_GENERATOR. */
- private static final double RATE_PER_GENERATOR = 1000.0;
-
- /**
- * Sets the up.
- *
- * @throws Exception the exception
- */
- @Before
- public void setUp() throws Exception {
- messageDispatcherFactory = new AmazonSQSRemoteMessageDispatcherFactory();
- messageDispatcherFactory.setAwsSqsManager(sqsManager);
- messageDispatcherFactory.init();
-
- LinkedBlockingQueue bodies = new LinkedBlockingQueue<>();
- AmazonSQS sqsClient = mock(AmazonSQS.class, RETURNS_DEEP_STUBS);
- when(sqsClient.receiveMessage(anyString()).getMessages()).thenAnswer(new Answer>() {
- @Override
- public List answer(InvocationOnMock invocation) {
- List messageBodies = new LinkedList<>();
- bodies.drainTo(messageBodies);
- return messageBodies.stream()
- .map(b -> {
- Message msg = new Message();
- msg.setBody(b);
- return msg;
- })
- .collect(Collectors.toList());
- }
- });
-
- when(sqsManager.getSQSClient()).thenReturn(sqsClient);
- when(sqsManager.getSinkQueueUrlAndCreateIfNecessary(anyString())).thenReturn("some-url");
- when(sqsManager.sendMessage(anyString(), anyString())).thenAnswer(new Answer() {
- @Override
- public String answer(InvocationOnMock invocation) throws Throwable {
- String body = invocation.getArgument(1);
- bodies.add(body);
- return null;
- }
- });
- }
-
- /**
- * Configure generators.
- *
- * @throws Exception the exception
- */
- public void configureGenerators() throws Exception {
- System.err.println("Starting Heartbeat generators.");
-
- // Start the consumer
- final HeartbeatModule parallelHeartbeatModule = new HeartbeatModule() {
- @Override
- public int getNumConsumerThreads() {
- return NUM_CONSUMER_THREADS;
- }
- };
- final HeartbeatConsumer consumer = new HeartbeatConsumer(parallelHeartbeatModule, receivedMeter);
- consumerManager.registerConsumer(consumer);
-
- // Start the dispatcher
- final SyncDispatcher dispatcher = messageDispatcherFactory.createSyncDispatcher(HeartbeatModule.INSTANCE);
-
- // Fire up the generators
- generators = new ArrayList<>(NUM_GENERATORS);
- for (int k = 0; k < NUM_GENERATORS; k++) {
- final HeartbeatGenerator generator = new HeartbeatGenerator(dispatcher, RATE_PER_GENERATOR, sentMeter, sendTimer);
- generators.add(generator);
- generator.start();
- }
- }
-
- /**
- * Tear down.
- *
- * @throws Exception the exception
- */
- @After
- public void tearDown() throws Exception {
- if (generators != null) {
- for (HeartbeatGenerator generator : generators) {
- generator.stop();
- }
- generators.clear();
- }
- consumerManager.unregisterAllConsumers();
- }
-
- /**
- * Quick run.
- *
- * @throws Exception the exception
- */
- @Test(timeout=30000)
- public void quickRun() throws Exception {
- configureGenerators();
- await().atMost(30, TimeUnit.SECONDS).until(() -> Long.valueOf(receivedMeter.getCount()), greaterThan(100L));
- }
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/Heartbeat.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/Heartbeat.java
deleted file mode 100644
index 878276f042ed..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/Heartbeat.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.opennms.core.ipc.sink.api.Message;
-
-/**
- * The Class Heartbeat.
- *
- * @author Alejandro Galue
- */
-@XmlRootElement(name="heartbeat")
-@XmlAccessorType(XmlAccessType.NONE)
-public class Heartbeat implements Message {
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatConsumer.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatConsumer.java
deleted file mode 100644
index af07c0d17ced..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatConsumer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat;
-
-import org.opennms.core.ipc.sink.api.MessageConsumer;
-import org.opennms.core.ipc.sink.api.SinkModule;
-
-import com.codahale.metrics.Meter;
-
-/**
- * The Class HeartbeatConsumer.
- *
- * @author Alejandro Galue
- */
-public class HeartbeatConsumer implements MessageConsumer {
-
- /** The heartbeat module. */
- private final HeartbeatModule heartbeatModule;
-
- /** The received meter. */
- private final Meter receivedMeter;
-
- /**
- * Instantiates a new heartbeat consumer.
- *
- * @param heartbeatModule the heartbeat module
- * @param receivedMeter the received meter
- */
- public HeartbeatConsumer(HeartbeatModule heartbeatModule, Meter receivedMeter) {
- this.heartbeatModule = heartbeatModule;
- this.receivedMeter = receivedMeter;
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.MessageConsumer#getModule()
- */
- @Override
- public SinkModule getModule() {
- return heartbeatModule;
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.MessageConsumer#handleMessage(org.opennms.core.ipc.sink.api.Message)
- */
- @Override
- public void handleMessage(Heartbeat message) {
- receivedMeter.mark();
- }
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatGenerator.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatGenerator.java
deleted file mode 100644
index 8e2e27e532ca..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatGenerator.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.opennms.core.ipc.sink.api.SyncDispatcher;
-
-import com.codahale.metrics.Meter;
-import com.codahale.metrics.MetricRegistry;
-import com.codahale.metrics.Timer;
-import com.codahale.metrics.Timer.Context;
-import com.google.common.util.concurrent.RateLimiter;
-
-/**
- * The Class HeartbeatGenerator.
- *
- * @author Alejandro Galue
- */
-public class HeartbeatGenerator {
-
- /** The thread. */
- Thread thread;
-
- /** The dispatcher. */
- final SyncDispatcher dispatcher;
-
- /** The rate. */
- final double rate;
-
- /** The stopped. */
- final AtomicBoolean stopped = new AtomicBoolean(false);
-
- /** The sent meter. */
- private final Meter sentMeter;
-
- /** The send timer. */
- private final Timer sendTimer;
-
- /**
- * Instantiates a new heartbeat generator.
- *
- * @param dispatcher the dispatcher
- * @param rate the rate
- */
- public HeartbeatGenerator(SyncDispatcher dispatcher, double rate) {
- this.dispatcher = dispatcher;
- this.rate = rate;
- MetricRegistry metrics = new MetricRegistry();
- this.sentMeter = metrics.meter("sent");
- this.sendTimer = metrics.timer("send");
- }
-
- /**
- * Instantiates a new heartbeat generator.
- *
- * @param dispatcher the dispatcher
- * @param rate the rate
- * @param sentMeter the sent meter
- * @param sendTimer the send timer
- */
- public HeartbeatGenerator(SyncDispatcher dispatcher, double rate, Meter sentMeter, Timer sendTimer) {
- this.dispatcher = dispatcher;
- this.rate = rate;
- this.sentMeter = sentMeter;
- this.sendTimer = sendTimer;
- }
-
- /**
- * Start.
- */
- public synchronized void start() {
- stopped.set(false);
- final RateLimiter rateLimiter = RateLimiter.create(rate);
- thread = new Thread(new Runnable() {
- @Override
- public void run() {
-
- while(!stopped.get()) {
- rateLimiter.acquire();
- try (Context ctx = sendTimer.time()) {
- dispatcher.send(new Heartbeat());
- sentMeter.mark();
- }
- }
- }
- });
- thread.start();
- }
-
- /**
- * Stop.
- *
- * @throws InterruptedException the interrupted exception
- */
- public synchronized void stop() throws InterruptedException {
- stopped.set(true);
- if (thread != null) {
- thread.join();
- thread = null;
- }
- }
-}
\ No newline at end of file
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatModule.java b/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatModule.java
deleted file mode 100644
index bb41907a9092..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/java/org/opennms/core/ipc/sink/aws/sqs/itests/heartbeat/HeartbeatModule.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.itests.heartbeat;
-
-import org.opennms.core.ipc.sink.api.AggregationPolicy;
-import org.opennms.core.ipc.sink.api.AsyncPolicy;
-import org.opennms.core.ipc.sink.xml.AbstractXmlSinkModule;
-
-/**
- * The Class HeartbeatModule.
- *
- * @author Alejandro Galue
- */
-public class HeartbeatModule extends AbstractXmlSinkModule {
-
- /** The Constant INSTANCE. */
- public static final HeartbeatModule INSTANCE = new HeartbeatModule();
-
- /**
- * Instantiates a new heartbeat module.
- */
- public HeartbeatModule() {
- super(Heartbeat.class);
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.SinkModule#getNumConsumerThreads()
- */
- @Override
- public int getNumConsumerThreads() {
- return 1;
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.SinkModule#getId()
- */
- @Override
- public String getId() {
- return "Heartbeat";
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.SinkModule#getAggregationPolicy()
- */
- @Override
- public AggregationPolicy getAggregationPolicy() {
- // No aggregation
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.api.SinkModule#getAsyncPolicy()
- */
- @Override
- public AsyncPolicy getAsyncPolicy() {
- // Only synchronous dispatching
- return null;
- }
-
-}
diff --git a/core/ipc/sink/aws-sqs/itests/src/test/resources/META-INF/opennms/applicationContext-ipc-sink-server-aws-mock.xml b/core/ipc/sink/aws-sqs/itests/src/test/resources/META-INF/opennms/applicationContext-ipc-sink-server-aws-mock.xml
deleted file mode 100644
index 4247f086d750..000000000000
--- a/core/ipc/sink/aws-sqs/itests/src/test/resources/META-INF/opennms/applicationContext-ipc-sink-server-aws-mock.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/pom.xml b/core/ipc/sink/aws-sqs/pom.xml
deleted file mode 100644
index 8415d318f939..000000000000
--- a/core/ipc/sink/aws-sqs/pom.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- org.opennms.core.ipc
- org.opennms.core.ipc.sink
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.aws.sqs
- pom
- OpenNMS :: Core :: IPC :: Sink :: AWS :: SQS
-
- common
- client
- server
- itests
-
-
diff --git a/core/ipc/sink/aws-sqs/server/pom.xml b/core/ipc/sink/aws-sqs/server/pom.xml
deleted file mode 100644
index 3ca7092659f6..000000000000
--- a/core/ipc/sink/aws-sqs/server/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
- org.opennms.core.ipc.sink
- org.opennms.core.ipc.sink.aws.sqs
- 28.1.1
-
- 4.0.0
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.server
- OpenNMS :: Core :: IPC :: Sink :: AWS :: SQS :: Server
- bundle
-
- true
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- JavaSE-1.8
- ${project.artifactId}
- ${project.version}
-
-
-
-
-
-
-
- org.opennms.core.ipc.sink.aws.sqs
- org.opennms.core.ipc.sink.aws.sqs.common
- ${project.version}
-
-
-
diff --git a/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSConditionalSinkContext.java b/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSConditionalSinkContext.java
deleted file mode 100644
index 7b1ab7d532bd..000000000000
--- a/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSConditionalSinkContext.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.server;
-
-import static org.opennms.core.ipc.sink.common.SinkStrategy.Strategy.SQS;
-
-import org.opennms.core.ipc.sink.api.MessageConsumerManager;
-import org.opennms.core.ipc.sink.common.SinkStrategy;
-import org.opennms.core.logging.Logging;
-import org.opennms.core.logging.Logging.MDCCloseable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.annotation.ConditionContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ConfigurationCondition;
-import org.springframework.context.annotation.ImportResource;
-import org.springframework.core.type.AnnotatedTypeMetadata;
-
-@Configuration
-@Conditional(AmazonSQSConditionalSinkContext.Condition.class)
-@ImportResource("/META-INF/opennms/applicationContext-ipc-sink-aws-server.xml")
-public class AmazonSQSConditionalSinkContext {
-
- /** The Constant LOG. */
- private static final Logger LOG = LoggerFactory.getLogger(AmazonSQSConditionalSinkContext.class);
-
- /**
- * The Class Condition.
- */
- static class Condition implements ConfigurationCondition {
-
- /* (non-Javadoc)
- * @see org.springframework.context.annotation.ConfigurationCondition#getConfigurationPhase()
- */
- @Override
- public ConfigurationPhase getConfigurationPhase() {
- return ConfigurationPhase.PARSE_CONFIGURATION;
- }
-
- /* (non-Javadoc)
- * @see org.springframework.context.annotation.Condition#matches(org.springframework.context.annotation.ConditionContext, org.springframework.core.type.AnnotatedTypeMetadata)
- */
- @Override
- public boolean matches(final ConditionContext context, final AnnotatedTypeMetadata metadata) {
- final boolean enabled = SQS.equals(SinkStrategy.getSinkStrategy());
- try (MDCCloseable mdc = Logging.withPrefixCloseable(MessageConsumerManager.LOG_PREFIX)) {
- LOG.debug("Enable AWS SQS Sink: {}", enabled);
- }
- return enabled;
- }
- }
-}
diff --git a/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSMessageConsumerManager.java b/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSMessageConsumerManager.java
deleted file mode 100644
index ab899540fdcb..000000000000
--- a/core/ipc/sink/aws-sqs/server/src/main/java/org/opennms/core/ipc/sink/aws/sqs/server/AmazonSQSMessageConsumerManager.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * This file is part of OpenNMS(R).
- *
- * Copyright (C) 2017 The OpenNMS Group, Inc.
- * OpenNMS(R) is Copyright (C) 1999-2017 The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
- *
- * OpenNMS(R) is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * OpenNMS(R) is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with OpenNMS(R). If not, see:
- * http://www.gnu.org/licenses/
- *
- * For more information contact:
- * OpenNMS(R) Licensing
- * http://www.opennms.org/
- * http://www.opennms.com/
- *******************************************************************************/
-
-package org.opennms.core.ipc.sink.aws.sqs.server;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.opennms.core.ipc.common.aws.sqs.AmazonSQSManager;
-import org.opennms.core.ipc.sink.api.Message;
-import org.opennms.core.ipc.sink.api.MessageConsumerManager;
-import org.opennms.core.ipc.sink.api.SinkModule;
-import org.opennms.core.ipc.sink.common.AbstractMessageConsumerManager;
-import org.opennms.core.logging.Logging;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.model.AmazonSQSException;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-
-/**
- * The Class AwsMessageConsumerManager.
- *
- * @author Alejandro Galue
- */
-public class AmazonSQSMessageConsumerManager extends AbstractMessageConsumerManager {
-
- /** The Constant LOG. */
- private static final Logger LOG = LoggerFactory.getLogger(AmazonSQSMessageConsumerManager.class);
-
- /** The consumer runners by module. */
- private final Map, List> consumerRunnersByModule = new ConcurrentHashMap<>();
-
- /** The thread factory. */
- private final ThreadFactory threadFactory = new ThreadFactoryBuilder()
- .setNameFormat("sqs-consumer-%d")
- .build();
-
- /** The executor. */
- private final ExecutorService executor = Executors.newCachedThreadPool(threadFactory);
-
- /** The AWS SQS manager. */
- private AmazonSQSManager awsSqsManager;
-
- /**
- * The Class AwsConsumerRunner.
- */
- private class AwsConsumerRunner implements Runnable {
-
- /** The module. */
- private final SinkModule, Message> module;
-
- /** The closed. */
- private final AtomicBoolean closed = new AtomicBoolean(false);
-
- /** The AWS SQS Object. */
- private final AmazonSQS sqs;
-
- /** The queue URL. This is cached to avoid an API call on each attempt to send a message. */
- private String queueUrl;
-
- /**
- * Instantiates a new AWS consumer runner.
- *
- * @param module the module
- * @throws AmazonSQSException the Amazon SQS exception
- */
- public AwsConsumerRunner(SinkModule, Message> module) throws AmazonSQSException {
- this.module = module;
- sqs = awsSqsManager.getSQSClient();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- @Override
- public void run() {
- Logging.putPrefix(MessageConsumerManager.LOG_PREFIX);
- try {
- LOG.debug("Retrieving queue URL for module with id: {}", module.getId());
- queueUrl = awsSqsManager.getSinkQueueUrlAndCreateIfNecessary(module.getId());
- LOG.debug("Using queue URL: {}", queueUrl);
- } catch (InterruptedException e) {
- LOG.error("Interrupted while retrieving queue URL. Aborting consumer.", e);
- }
-
- while (!closed.get()) {
- // The SQS Queue is configured to use "Long Polling" through "ReceiveMessageWaitTimeSeconds".
- // That means, calling receiveMessage will block the thread execution for that amount of time if there are no messages on the queue.
- // This is recommended to reduce the traffic against AWS, which can be translated into undesired costs.
- List messages = null;
- try {
- messages = sqs.receiveMessage(queueUrl).getMessages();
- } catch (RuntimeException e) {
- LOG.error("Unexpected exception while receiving messages from " + queueUrl, e);
- }
- if (messages != null) {
- for (com.amazonaws.services.sqs.model.Message m : messages) {
- try {
- LOG.debug("Received SQS message with ID {} from {}", m.getMessageId(), queueUrl);
- final Message msg = module.unmarshal(m.getBody().getBytes(StandardCharsets.UTF_8));
- dispatch(module, msg);
- LOG.debug("Message with ID {} successfully dispatched.", m.getMessageId(), queueUrl);
- } catch (RuntimeException e) {
- final String msg = String.format("Unexpected exception while dispatching message with ID %s from %s", m.getMessageId(), queueUrl);
- LOG.warn(msg, e);
- } finally {
- // This is mandatory to avoid re-process a message on a subsequent receive request.
- LOG.debug("Deleting SQS message receipt handle {} from {}", m.getReceiptHandle(), queueUrl);
- sqs.deleteMessage(queueUrl, m.getReceiptHandle());
- }
- }
- }
- }
- }
-
- /**
- * Shutdown hook which can be called from a separate thread
- */
- public void shutdown() {
- closed.set(true);
- sqs.shutdown();
- }
- }
-
- /**
- * Sets the AWS SQS manager.
- *
- * @param awsSqsManager the new AWS SQS manager
- */
- public void setAwsSqsManager(AmazonSQSManager awsSqsManager) {
- this.awsSqsManager = awsSqsManager;
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.common.AbstractMessageConsumerManager#startConsumingForModule(org.opennms.core.ipc.sink.api.SinkModule)
- */
- @Override
- protected void startConsumingForModule(SinkModule, Message> module) throws Exception {
- if (!consumerRunnersByModule.containsKey(module)) {
- LOG.info("Starting consumers for module: {}", module);
-
- final int numConsumerThreads = getNumConsumerThreads(module);
- final List consumerRunners = new ArrayList<>(numConsumerThreads);
- for (int i = 0; i < numConsumerThreads; i++) {
- final AwsConsumerRunner consumerRunner = new AwsConsumerRunner(module);
- executor.execute(consumerRunner);
- consumerRunners.add(new AwsConsumerRunner(module));
- }
-
- consumerRunnersByModule.put(module, consumerRunners);
- }
- }
-
- /* (non-Javadoc)
- * @see org.opennms.core.ipc.sink.common.AbstractMessageConsumerManager#stopConsumingForModule(org.opennms.core.ipc.sink.api.SinkModule)
- */
- @Override
- protected void stopConsumingForModule(SinkModule, Message> module) throws Exception {
- if (consumerRunnersByModule.containsKey(module)) {
- LOG.info("Stopping consumers for module: {}", module);
- final List consumerRunners = consumerRunnersByModule.get(module);
- for (AwsConsumerRunner consumerRunner : consumerRunners) {
- consumerRunner.shutdown();
- }
- consumerRunnersByModule.remove(module);
- }
- }
-
- public void shutdown() {
- executor.shutdown();
- if(getStartupExecutor() != null) {
- getStartupExecutor().shutdown();
- }
- }
-}
diff --git a/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-server.xml b/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-server.xml
deleted file mode 100644
index 1d664405d61c..000000000000
--- a/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/applicationContext-ipc-sink-aws-server.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/component-dao.xml b/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/component-dao.xml
deleted file mode 100644
index 36fd9fc370a8..000000000000
--- a/core/ipc/sink/aws-sqs/server/src/main/resources/META-INF/opennms/component-dao.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
diff --git a/core/ipc/sink/aws-sqs/server/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-server.xml b/core/ipc/sink/aws-sqs/server/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-server.xml
deleted file mode 100644
index a301df63312b..000000000000
--- a/core/ipc/sink/aws-sqs/server/src/main/resources/OSGI-INF/blueprint/blueprint-ipc-server.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/core/ipc/sink/camel/client/pom.xml b/core/ipc/sink/camel/client/pom.xml
index 028b32bbfae1..51eb998160b7 100644
--- a/core/ipc/sink/camel/client/pom.xml
+++ b/core/ipc/sink/camel/client/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.camel
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
@@ -42,7 +42,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/sink/camel/common/pom.xml b/core/ipc/sink/camel/common/pom.xml
index 70ffef02539f..da6f7371b034 100644
--- a/core/ipc/sink/camel/common/pom.xml
+++ b/core/ipc/sink/camel/common/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.camel
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/ipc/sink/camel/itests/pom.xml b/core/ipc/sink/camel/itests/pom.xml
index bbc385347cc5..dcf86f47ebee 100644
--- a/core/ipc/sink/camel/itests/pom.xml
+++ b/core/ipc/sink/camel/itests/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.camel
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/ipc/sink/camel/pom.xml b/core/ipc/sink/camel/pom.xml
index 29feba05abbc..858013b5603a 100644
--- a/core/ipc/sink/camel/pom.xml
+++ b/core/ipc/sink/camel/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
diff --git a/core/ipc/sink/camel/server/pom.xml b/core/ipc/sink/camel/server/pom.xml
index f87039578aa7..905f6b414587 100644
--- a/core/ipc/sink/camel/server/pom.xml
+++ b/core/ipc/sink/camel/server/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.camel
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0
diff --git a/core/ipc/sink/common/pom.xml b/core/ipc/sink/common/pom.xml
index d086160bb5ce..fa963396064a 100644
--- a/core/ipc/sink/common/pom.xml
+++ b/core/ipc/sink/common/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
@@ -69,7 +69,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
@@ -103,7 +103,7 @@
org.osgi
- org.osgi.compendium
+ osgi.cmpnprovided
diff --git a/core/ipc/sink/common/src/main/java/org/opennms/core/ipc/sink/common/SinkStrategy.java b/core/ipc/sink/common/src/main/java/org/opennms/core/ipc/sink/common/SinkStrategy.java
index 75e787bdda85..f8232f3499fd 100644
--- a/core/ipc/sink/common/src/main/java/org/opennms/core/ipc/sink/common/SinkStrategy.java
+++ b/core/ipc/sink/common/src/main/java/org/opennms/core/ipc/sink/common/SinkStrategy.java
@@ -40,8 +40,6 @@ public class SinkStrategy {
private static final String KAFKA_SINK_STRATEGY_NAME = "kafka";
- private static final String SQS_SINK_STRATEGY_NAME = "sqs";
-
private static final String GRPC_SINK_STRATEGY_NAME = "grpc";
private static final String OSGI_SINK_STRATEGY_NAME = "osgi";
@@ -49,7 +47,6 @@ public class SinkStrategy {
public static enum Strategy {
CAMEL(CAMEL_SINK_STRATEGY_NAME, "JMS implementation using Camel"),
KAFKA(KAFKA_SINK_STRATEGY_NAME, "Kafka implementation using the Kafka consumer/producer APIs"),
- SQS(SQS_SINK_STRATEGY_NAME, "AWS SQS implementation using the AWS SDK"),
GRPC(GRPC_SINK_STRATEGY_NAME, "GRPC implementation using gRPC APIs"),
OSGI(OSGI_SINK_STRATEGY_NAME, "OSGI Delegate implementation");
diff --git a/core/ipc/sink/kafka/client/pom.xml b/core/ipc/sink/kafka/client/pom.xml
index 8b6a315c41ed..519144ab660e 100644
--- a/core/ipc/sink/kafka/client/pom.xml
+++ b/core/ipc/sink/kafka/client/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.kafka
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink.kafka
@@ -40,7 +40,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/sink/kafka/itests/pom.xml b/core/ipc/sink/kafka/itests/pom.xml
index ae82b5ed8eca..765b01c52ee7 100644
--- a/core/ipc/sink/kafka/itests/pom.xml
+++ b/core/ipc/sink/kafka/itests/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.kafka
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink.kafka
diff --git a/core/ipc/sink/kafka/pom.xml b/core/ipc/sink/kafka/pom.xml
index 95957be3428f..59710c15470c 100644
--- a/core/ipc/sink/kafka/pom.xml
+++ b/core/ipc/sink/kafka/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
diff --git a/core/ipc/sink/kafka/server/pom.xml b/core/ipc/sink/kafka/server/pom.xml
index 79dcacb44d44..30d60d27ca42 100644
--- a/core/ipc/sink/kafka/server/pom.xml
+++ b/core/ipc/sink/kafka/server/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipc.sinkorg.opennms.core.ipc.sink.kafka
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink.kafka
diff --git a/core/ipc/sink/mock-impl/pom.xml b/core/ipc/sink/mock-impl/pom.xml
index 40d28f3293b8..abc68d3766f7 100644
--- a/core/ipc/sink/mock-impl/pom.xml
+++ b/core/ipc/sink/mock-impl/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
@@ -29,7 +29,7 @@
org.osgi
- org.osgi.core
+ osgi.coreprovided
diff --git a/core/ipc/sink/off-heap/pom.xml b/core/ipc/sink/off-heap/pom.xml
index f6a1d3ffd5fb..1d3d6ca316d0 100644
--- a/core/ipc/sink/off-heap/pom.xml
+++ b/core/ipc/sink/off-heap/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
diff --git a/core/ipc/sink/pom.xml b/core/ipc/sink/pom.xml
index bf0cacd93774..32fe627c7fbf 100644
--- a/core/ipc/sink/pom.xml
+++ b/core/ipc/sink/pom.xml
@@ -3,7 +3,7 @@
org.opennms.coreorg.opennms.core.ipc
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc
@@ -15,7 +15,6 @@
commoncamelkafka
- aws-sqsmock-implxmloff-heap
diff --git a/core/ipc/sink/xml/pom.xml b/core/ipc/sink/xml/pom.xml
index 804c46b6f26c..d7bb52aed4f3 100644
--- a/core/ipc/sink/xml/pom.xml
+++ b/core/ipc/sink/xml/pom.xml
@@ -3,7 +3,7 @@
org.opennms.core.ipcorg.opennms.core.ipc.sink
- 28.1.1
+ 29.0.0-SNAPSHOT4.0.0org.opennms.core.ipc.sink
diff --git a/core/ipc/twin/api/pom.xml b/core/ipc/twin/api/pom.xml
new file mode 100644
index 000000000000..a75e6916524b
--- /dev/null
+++ b/core/ipc/twin/api/pom.xml
@@ -0,0 +1,37 @@
+
+
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc
+ 29.0.0-SNAPSHOT
+
+ 4.0.0
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.api
+ bundle
+ OpenNMS :: Core :: IPC :: Twin :: API
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ JavaSE-1.8
+ ${project.artifactId}
+ ${project.version}
+
+
+
+
+
+
+
+ com.google.guava
+ guava
+
+
+
\ No newline at end of file
diff --git a/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinPublisher.java b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinPublisher.java
new file mode 100644
index 000000000000..1b876af57ae9
--- /dev/null
+++ b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinPublisher.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.api;
+
+import java.io.Closeable;
+import java.io.IOException;
+
+/**
+ * TwinPublisher lives on OpenNMS that handles all the Objects that need to be replicated.
+ * At boot up, modules register module specific key with TwinPublisher.
+ * Modules publish initial objects/updated objects on the session.
+ */
+
+public interface TwinPublisher extends Closeable {
+
+ /**
+ * Session that can publish initial objects and updates to T.
+ *
+ * @param type of object that is getting replicated.
+ */
+ interface Session extends Closeable {
+ /**
+ * @param obj an object that needs replication on Minion
+ */
+ void publish(T obj) throws IOException;
+ }
+
+ /**
+ * @param type of object for replication
+ * @param key unique key for the object.
+ * @param clazz a class used for serialization.
+ * @param location targeted Minion location for the object, set null for all locations.
+ * @return Session which provides updates to object.
+ */
+ Session register(String key, Class clazz, String location) throws IOException;
+
+ default Session register(String key, Class clazz) throws IOException {
+ return register(key, clazz, null);
+ }
+}
+
diff --git a/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinStrategy.java b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinStrategy.java
new file mode 100644
index 000000000000..a87fb011ff2e
--- /dev/null
+++ b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinStrategy.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.api;
+
+import com.google.common.base.Strings;
+
+public class TwinStrategy {
+
+ public static final String IPC_STRATEGY = "org.opennms.core.ipc.strategy";
+
+ public static final String TWIN_STRATEGY_PROPERTY = "org.opennms.core.ipc.twin.strategy";
+
+ private static final String JMS_TWIN_STRATEGY_NAME = "jms";
+
+ private static final String KAFKA_TWIN_STRATEGY_NAME = "kafka";
+
+ private static final String GRPC_TWIN_STRATEGY_NAME = "grpc";
+
+ private static final String OSGI_TWIN_STRATEGY_NAME = "osgi";
+
+ public static enum Strategy {
+ JMS(JMS_TWIN_STRATEGY_NAME, "JMS implementation using Camel"),
+ KAFKA(KAFKA_TWIN_STRATEGY_NAME, "Kafka implementation using the Kafka consumer/producer APIs"),
+ GRPC(GRPC_TWIN_STRATEGY_NAME, "GRPC implementation using gRPC APIs"),
+ OSGI(OSGI_TWIN_STRATEGY_NAME, "OSGI Delegate implementation");
+
+ private final String m_name;
+ private final String m_descr;
+
+ Strategy(String name, String descr) {
+ m_name = name;
+ m_descr = descr;
+ }
+ Strategy(String name) {
+ this(name, name);
+ }
+
+ public String getName() {
+ return m_name;
+ }
+
+ public String getDescr() {
+ return m_descr;
+ }
+ }
+
+ public static Strategy getTwinStrategy() {
+ String effectiveStrategyName = System.getProperty(IPC_STRATEGY);
+ if (Strings.isNullOrEmpty(effectiveStrategyName)) {
+ effectiveStrategyName = System.getProperty(TWIN_STRATEGY_PROPERTY, JMS_TWIN_STRATEGY_NAME);
+ }
+ for (Strategy strategy : Strategy.values()) {
+ if (strategy.getName().equalsIgnoreCase(effectiveStrategyName)) {
+ return strategy;
+ }
+ }
+ throw new IllegalArgumentException("Unsupported Twin strategy: " + effectiveStrategyName);
+ }
+}
diff --git a/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinSubscriber.java b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinSubscriber.java
new file mode 100644
index 000000000000..8cfc828d6c94
--- /dev/null
+++ b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/TwinSubscriber.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.api;
+
+import java.io.Closeable;
+import java.util.function.Consumer;
+
+/**
+ * TwinSubscriber lives on Minion that handles all the Object subscriptions on Minion.
+ * At boot up, a module that lives on Minion issues an RPC from Minion to OpenNMS to get an object.
+ * Subsequent updates of the object will come as reverse sink messages from OpenNMS to Minion
+ */
+public interface TwinSubscriber extends Closeable {
+
+ /**
+ * @param key Unique key for the object.
+ * @param clazz Specific bean class of T to marshal/unmarshal.
+ * @param consumer Consumer of T for subsequent updates to T.
+ * @param T is an object type that needs to be replicated from OpenNMS to Minion.
+ * @return Closeable to close the subscription of T.
+ */
+ Closeable subscribe(String key, Class clazz, Consumer consumer);
+}
diff --git a/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/util/StatefulSubscription.java b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/util/StatefulSubscription.java
new file mode 100644
index 000000000000..1c775e702ee0
--- /dev/null
+++ b/core/ipc/twin/api/src/main/java/org/opennms/core/ipc/twin/api/util/StatefulSubscription.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.api.util;
+
+import java.util.Objects;
+import java.util.function.Consumer;
+
+public abstract class StatefulSubscription implements Consumer {
+
+ private T current = null;
+
+ protected abstract void accept(final T current, final T update);
+
+ @Override
+ public final void accept(final T update) {
+ if (!Objects.equals(this.current, update)) {
+ this.accept(this.current, update);
+ }
+
+ this.current = update;
+ }
+
+ public T getCurrent() {
+ return this.current;
+ }
+}
diff --git a/core/ipc/twin/common/pom.xml b/core/ipc/twin/common/pom.xml
new file mode 100644
index 000000000000..4e71c6feddc6
--- /dev/null
+++ b/core/ipc/twin/common/pom.xml
@@ -0,0 +1,157 @@
+
+
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc
+ 29.0.0-SNAPSHOT
+
+ 4.0.0
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.common
+ OpenNMS :: Core :: IPC :: Twin :: Common
+ bundle
+
+ ${project.basedir}/src/main
+
+
+
+
+
+
+
+
+ ${protobuf.source.dir}
+
+ proto/twin-message.proto
+
+
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ JavaSE-1.8
+ ${project.artifactId}
+ ${project.version}
+
+
+
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.opennms.core.ipc.twin
+ org.opennms.core.ipc.twin.api
+ ${project.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson2Version}
+
+
+ com.github.java-json-tools
+ json-patch
+ ${jsonPatchVersion}
+
+
+ org.opennms.features.distributed
+ core-api
+ ${project.version}
+
+
+ com.google.protobuf
+ protobuf-java
+ ${protobufVersion}
+
+
+ junit
+ junit
+ test
+
+
+ org.opennms.core.test-api
+ org.opennms.core.test-api.kafka
+ ${project.version}
+ test
+
+
+ com.jayway.awaitility
+ awaitility
+ test
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ 2.11.2
+ test
+
+
+
\ No newline at end of file
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinPublisher.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinPublisher.java
new file mode 100644
index 000000000000..994f94847a9b
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinPublisher.java
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.BiConsumer;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.github.fge.jsonpatch.diff.JsonDiff;
+import com.google.common.base.Strings;
+import com.google.protobuf.ByteString;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.opennms.core.ipc.twin.api.TwinPublisher;
+import org.opennms.core.ipc.twin.model.TwinRequestProto;
+import org.opennms.core.ipc.twin.model.TwinResponseProto;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public abstract class AbstractTwinPublisher implements TwinPublisher {
+
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractTwinPublisher.class);
+ private final Map twinTrackerMap = new HashMap<>();
+ protected final ObjectMapper objectMapper = new ObjectMapper();
+
+ private final LocalTwinSubscriber localTwinSubscriber;
+
+ public AbstractTwinPublisher(LocalTwinSubscriber localTwinSubscriber) {
+ this.localTwinSubscriber = Objects.requireNonNull(localTwinSubscriber);
+ }
+
+ /**
+ * @param sinkUpdate Handle sink Update from @{@link AbstractTwinPublisher}.
+ */
+ protected abstract void handleSinkUpdate(TwinUpdate sinkUpdate);
+
+ @Override
+ public Session register(String key, Class clazz, String location) throws IOException {
+ SessionKey sessionKey = new SessionKey(key, location);
+ LOG.info("Registered a session with key {}", sessionKey);
+ return new SessionImpl<>(sessionKey);
+ }
+
+ protected TwinUpdate getTwin(TwinRequest twinRequest) {
+ TwinTracker twinTracker = getTwinTracker(twinRequest.getKey(), twinRequest.getLocation());
+ TwinUpdate twinUpdate;
+ if (twinTracker == null) {
+ // No twin object exists for this key yet, return with null object.
+ twinUpdate = new TwinUpdate(twinRequest.getKey(), twinRequest.getLocation(), null);
+ } else {
+ // Fill TwinUpdate fields from TwinTracker.
+ twinUpdate = new TwinUpdate(twinRequest.getKey(), twinRequest.getLocation(), twinTracker.getObj());
+ twinUpdate.setPatch(false);
+ twinUpdate.setVersion(twinTracker.getVersion());
+ twinUpdate.setSessionId(twinTracker.getSessionId());
+ }
+ return twinUpdate;
+ }
+
+ private synchronized TwinTracker getTwinTracker(String key, String location) {
+ // Check if we have a session key specific to location else check session key without location.
+ TwinTracker twinTracker = twinTrackerMap.get(new SessionKey(key, location));
+ if(twinTracker == null) {
+ twinTracker = twinTrackerMap.get(new SessionKey(key, null));
+ }
+ return twinTracker;
+ }
+
+ protected TwinResponseProto mapTwinResponse(TwinUpdate twinUpdate) {
+ TwinResponseProto.Builder builder = TwinResponseProto.newBuilder();
+ if (!Strings.isNullOrEmpty(twinUpdate.getLocation())) {
+ builder.setLocation(twinUpdate.getLocation());
+ }
+ if(!Strings.isNullOrEmpty(twinUpdate.getSessionId())) {
+ builder.setSessionId(twinUpdate.getSessionId());
+ }
+ builder.setConsumerKey(twinUpdate.getKey());
+ if (twinUpdate.getObject() != null) {
+ builder.setTwinObject(ByteString.copyFrom(twinUpdate.getObject()));
+ }
+ builder.setIsPatchObject(twinUpdate.isPatch());
+ builder.setVersion(twinUpdate.getVersion());
+ return builder.build();
+ }
+
+ protected TwinRequest mapTwinRequestProto(byte[] twinRequestBytes) {
+ TwinRequest twinRequest = new TwinRequest();
+ try {
+ TwinRequestProto twinRequestProto = TwinRequestProto.parseFrom(twinRequestBytes);
+ twinRequest.setKey(twinRequestProto.getConsumerKey());
+ if (!Strings.isNullOrEmpty(twinRequestProto.getLocation())) {
+ twinRequest.setLocation(twinRequestProto.getLocation());
+ }
+ } catch (InvalidProtocolBufferException e) {
+ LOG.warn("Failed to parse protobuf for the request", e);
+ throw new RuntimeException(e);
+ }
+ return twinRequest;
+ }
+
+ private synchronized TwinUpdate getResponseFromUpdatedObj(byte[] updatedObj, SessionKey sessionKey) {
+ TwinTracker twinTracker = getTwinTracker(sessionKey.key, sessionKey.location);
+ if (twinTracker == null || !Arrays.equals(twinTracker.getObj(), updatedObj)) {
+ TwinUpdate twinUpdate = new TwinUpdate(sessionKey.key, sessionKey.location, updatedObj);
+ if (twinTracker == null) {
+ twinTracker = new TwinTracker(updatedObj);
+ } else {
+ // Generate patch and update response with patch.
+ byte[] patchValue = getPatchValue(twinTracker.getObj(), updatedObj, sessionKey);
+ if (patchValue != null) {
+ twinUpdate.setObject(patchValue);
+ twinUpdate.setPatch(true);
+ }
+ // Update Twin tracker with updated obj.
+ twinTracker.setObj(updatedObj);
+ twinTracker.incrementVersion();
+ }
+ twinTrackerMap.put(sessionKey, twinTracker);
+ twinUpdate.setVersion(twinTracker.getVersion());
+ twinUpdate.setSessionId(twinTracker.getSessionId());
+ return twinUpdate;
+ }
+ return null;
+ }
+
+ private byte[] getPatchValue(byte[] originalObj, byte[] updatedObj, SessionKey sessionKey) {
+ try {
+ JsonNode sourceNode = objectMapper.readTree(originalObj);
+ JsonNode targetNode = objectMapper.readTree(updatedObj);
+ JsonNode diffNode = JsonDiff.asJson(sourceNode, targetNode);
+ return diffNode.toString().getBytes(StandardCharsets.UTF_8);
+ } catch (Exception e) {
+ LOG.error("Unable to generate patch for SessionKey {}", sessionKey, e);
+ }
+ return null;
+ }
+
+ private synchronized void removeSessionKey(SessionKey sessionKey) {
+ twinTrackerMap.remove(sessionKey);
+ }
+
+ public synchronized void forEachSession(BiConsumer consumer) {
+ twinTrackerMap.forEach(consumer);
+ }
+
+ private class SessionImpl implements Session {
+
+ private final SessionKey sessionKey;
+
+ public SessionImpl(SessionKey sessionKey) {
+ this.sessionKey = sessionKey;
+ }
+
+ @Override
+ public void publish(T obj) throws IOException {
+ LOG.info("Published an object update for the session with key {}", sessionKey.toString());
+ byte[] objInBytes = objectMapper.writeValueAsBytes(obj);
+ TwinUpdate twinUpdate = getResponseFromUpdatedObj(objInBytes, sessionKey);
+ if(twinUpdate != null) {
+ // Send update to local subscriber and on sink path.
+ localTwinSubscriber.accept(twinUpdate);
+ handleSinkUpdate(twinUpdate);
+ }
+ }
+
+
+ @Override
+ public void close() throws IOException {
+ removeSessionKey(sessionKey);
+ LOG.info("Closed session with key {} ", sessionKey);
+ }
+ }
+
+ public static class SessionKey {
+
+ public final String key;
+ public final String location;
+
+ private SessionKey(String key, String location) {
+ this.key = key;
+ this.location = location;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ SessionKey that = (SessionKey) o;
+ return Objects.equals(key, that.key) && Objects.equals(location, that.location);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(key, location);
+ }
+
+ @Override
+ public String toString() {
+ return "SessionKey{" +
+ "key='" + key + '\'' +
+ ", location='" + location + '\'' +
+ '}';
+ }
+ }
+
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinSubscriber.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinSubscriber.java
new file mode 100644
index 000000000000..540d90cecf5b
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/AbstractTwinSubscriber.java
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Objects;
+import java.util.StringJoiner;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.function.Consumer;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.github.fge.jsonpatch.JsonPatch;
+import com.google.common.base.Strings;
+import com.google.common.collect.Multimap;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.opennms.core.ipc.twin.api.TwinSubscriber;
+import org.opennms.core.ipc.twin.model.TwinRequestProto;
+import org.opennms.core.ipc.twin.model.TwinResponseProto;
+import org.opennms.distributed.core.api.MinionIdentity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Multimaps;
+
+public abstract class AbstractTwinSubscriber implements TwinSubscriber {
+
+ private final Multimap> sessionMap = Multimaps.synchronizedListMultimap(ArrayListMultimap.create());
+ private final Map objMap = new ConcurrentHashMap<>();
+ private final ObjectMapper objectMapper = new ObjectMapper();
+ private MinionIdentity minionIdentity;
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractTwinSubscriber.class);
+ private final ThreadFactory threadFactory = new ThreadFactoryBuilder()
+ .setNameFormat("abstract-twin-subscriber-%d")
+ .build();
+ private ExecutorService executorService = Executors.newSingleThreadExecutor(threadFactory);
+
+ protected AbstractTwinSubscriber(MinionIdentity minionIdentity) {
+ this.minionIdentity = minionIdentity;
+ }
+
+ public AbstractTwinSubscriber() {
+ }
+
+ /**
+ * @param twinRequest Send RpcRequest from @{@link AbstractTwinSubscriber}
+ */
+ protected abstract void sendRpcRequest(TwinRequest twinRequest);
+
+
+ @Override
+ public Closeable subscribe(String key, Class clazz, Consumer consumer) {
+ SessionImpl session = new SessionImpl(key, clazz, consumer);
+ sessionMap.put(key, session);
+ String location = minionIdentity != null ? minionIdentity.getLocation() : null;
+
+ TwinTracker twinTracker = objMap.get(key);
+ // If there is an existing object, send that update to subscriber
+ if (twinTracker != null) {
+ try {
+ session.accept(twinTracker.getObj());
+ } catch (Exception e) {
+ LOG.error("Exception while sending response to consumer", e);
+ }
+ } else {
+ TwinRequest twinRequest = new TwinRequest(key, location);
+ sendRpcRequest(twinRequest);
+ }
+
+ LOG.info("Subscribed to object updates with key {}", key);
+ return session;
+ }
+
+ protected void accept(TwinUpdate twinUpdate) {
+
+ // If Response is targeted to a location, ignore if it doesn't belong to the location of subscriber.
+ if (twinUpdate.getLocation() != null && !twinUpdate.getLocation().equals(getLocation())) {
+ return;
+ }
+
+ // Got empty response
+ if (twinUpdate.getObject() == null || twinUpdate.getSessionId() == null) {
+ return;
+ }
+
+ // Consume in our own thread instead of using broker's callback thread.
+ executorService.execute(() -> {
+ validateAndHandleUpdate(twinUpdate);
+ });
+ }
+
+ private void validateAndHandleUpdate(TwinUpdate twinUpdate) {
+ TwinTracker twinTracker = objMap.get(twinUpdate.getKey());
+ if (twinTracker == null) {
+ if (!twinUpdate.isPatch()) {
+ updateSessions(twinUpdate, twinUpdate.getObject());
+ }
+ return;
+ }
+ if (isObjectUpdated(twinTracker, twinUpdate)) {
+ LOG.trace("Received object update with key {}", twinUpdate.getKey());
+ // No need to update if version we are getting is less than what we have with the same session.
+ if (twinTracker.getSessionId().equals(twinUpdate.getSessionId())
+ && twinTracker.getVersion() > twinUpdate.getVersion()) {
+ return;
+ }
+ // If this is coming completely from new session, reset tracker.
+ if (!twinTracker.getSessionId().equals(twinUpdate.getSessionId())) {
+ if (!twinUpdate.isPatch()) {
+ updateSessions(twinUpdate, twinUpdate.getObject());
+ }
+ return;
+ }
+ // We can't apply patch when the version jumps more than one version.
+ if (twinUpdate.getVersion() != twinTracker.getVersion() + 1) {
+ sendRpcRequest(new TwinRequest(twinUpdate.getKey(), twinUpdate.getLocation()));
+ return;
+ }
+ byte[] patchedBytes = applyPatch(twinTracker, twinUpdate);
+ // Invoke RPC when we can't apply patch properly.
+ if (patchedBytes != null) {
+ // Update twin object for sessions.
+ updateSessions(twinUpdate, patchedBytes);
+ } else {
+ sendRpcRequest(new TwinRequest(twinUpdate.getKey(), twinUpdate.getLocation()));
+ }
+ }
+ }
+
+ private byte[] applyPatch(TwinTracker twinTracker, TwinUpdate twinUpdate) {
+ if (!twinUpdate.isPatch()) {
+ return twinUpdate.getObject();
+ }
+ try {
+ JsonNode resultingDiff = objectMapper.readTree(twinUpdate.getObject());
+ JsonNode original = objectMapper.readTree(twinTracker.getObj());
+ JsonPatch patch = JsonPatch.fromJson(resultingDiff);
+ JsonNode resultNode = patch.apply(original);
+ return resultNode.toString().getBytes(StandardCharsets.UTF_8);
+ } catch (Exception e) {
+ LOG.error("Not able to apply patch for key {}", twinUpdate.getKey(), e);
+ }
+ return null;
+ }
+
+ private boolean isObjectUpdated(TwinTracker twinTracker, TwinUpdate twinUpdate) {
+ if (twinUpdate.isPatch()) {
+ return true;
+ }
+ return !Arrays.equals(twinTracker.getObj(), twinUpdate.getObject());
+ }
+
+ private void updateSessions(TwinUpdate twinUpdate, byte[] newObjBytes) {
+ // Update twin object in local cache.
+ objMap.put(twinUpdate.getKey(), new TwinTracker(newObjBytes, twinUpdate.getVersion(), twinUpdate.getSessionId()));
+ // Send update to each session.
+ synchronized(sessionMap) {
+ final var sessions = sessionMap.get(twinUpdate.getKey());
+ if (sessions != null) {
+ sessions.forEach(session -> {
+ try {
+ session.accept(newObjBytes);
+ } catch (Exception e) {
+ LOG.error("Exception while sending update to Session {} for key {}", session, twinUpdate.getKey(), e);
+ }
+ });
+ }
+ }
+ }
+
+
+ protected TwinUpdate mapTwinResponseToProto(byte[] responseBytes) {
+ TwinUpdate twinUpdate = new TwinUpdate();
+ try {
+ TwinResponseProto twinResponseProto = TwinResponseProto.parseFrom(responseBytes);
+
+ if (!Strings.isNullOrEmpty(twinResponseProto.getLocation())) {
+ twinUpdate.setLocation(twinResponseProto.getLocation());
+ }
+ if(!Strings.isNullOrEmpty(twinResponseProto.getSessionId())) {
+ twinUpdate.setSessionId(twinResponseProto.getSessionId());
+ }
+ twinUpdate.setKey(twinResponseProto.getConsumerKey());
+ if (twinResponseProto.getTwinObject() != null) {
+ twinUpdate.setObject(twinResponseProto.getTwinObject().toByteArray());
+ }
+ twinUpdate.setPatch(twinResponseProto.getIsPatchObject());
+ twinUpdate.setVersion(twinResponseProto.getVersion());
+ return twinUpdate;
+ } catch (InvalidProtocolBufferException e) {
+ LOG.error("Failed to parse response from proto", e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected TwinRequestProto mapTwinRequestToProto(TwinRequest twinRequest) {
+ TwinRequestProto.Builder builder = TwinRequestProto.newBuilder();
+ builder.setConsumerKey(twinRequest.getKey()).setLocation(getMinionIdentity().getLocation())
+ .setSystemId(getMinionIdentity().getId());
+ return builder.build();
+ }
+
+ public void close() throws IOException {
+ executorService.shutdown();
+ objMap.clear();
+ sessionMap.clear();
+ }
+
+ public MinionIdentity getMinionIdentity() {
+ return minionIdentity;
+ }
+
+ private String getLocation() {
+ if (minionIdentity != null) {
+ return minionIdentity.getLocation();
+ }
+ return null;
+ }
+
+ private class SessionImpl implements Closeable {
+
+ private final String key;
+ private final Consumer consumer;
+ private final Class clazz;
+
+ public SessionImpl(String key, Class clazz, Consumer consumer) {
+ this.key = key;
+ this.clazz = clazz;
+ this.consumer = consumer;
+ }
+
+ @Override
+ public void close() throws IOException {
+ sessionMap.remove(key, this);
+ LOG.info("Closed session with key {} ", key);
+ }
+
+ public void accept(byte[] objValue) throws IOException {
+ final T value = objectMapper.readValue(objValue, clazz);
+ LOG.trace("Updated consumer with key {}", key);
+ consumer.accept(value);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ SessionImpl> session = (SessionImpl>) o;
+ return Objects.equals(key, session.key) && Objects.equals(consumer, session.consumer) && Objects.equals(clazz, session.clazz);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(key, consumer, clazz);
+ }
+
+ @Override
+ public String toString() {
+ return new StringJoiner(", ", SessionImpl.class.getSimpleName() + "[", "]")
+ .add("key='" + key + "'")
+ .add("consumer=" + consumer)
+ .add("clazz=" + clazz)
+ .toString();
+ }
+ }
+
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriber.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriber.java
new file mode 100644
index 000000000000..7f9d7f83a180
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriber.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import org.opennms.core.ipc.twin.api.TwinSubscriber;
+
+public interface LocalTwinSubscriber extends TwinSubscriber {
+
+ void accept(TwinUpdate twinResponse);
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriberImpl.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriberImpl.java
new file mode 100644
index 000000000000..769479b22844
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/LocalTwinSubscriberImpl.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+
+import java.io.IOException;
+
+public class LocalTwinSubscriberImpl extends AbstractTwinSubscriber implements LocalTwinSubscriber {
+
+
+ @Override
+ protected void sendRpcRequest(TwinRequest twinRequest) {
+ // no need to send any RPC on local subscriber.
+ }
+
+ @Override
+ public void accept(TwinUpdate twinUpdate) {
+ super.accept(twinUpdate);
+ }
+
+ @Override
+ public void close() throws IOException {
+ }
+}
+
+
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinRequest.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinRequest.java
new file mode 100644
index 000000000000..a2a5fb3bd08a
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinRequest.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import java.util.Objects;
+
+public class TwinRequest {
+
+ protected String key;
+
+ protected String location;
+
+ public TwinRequest(String key, String location) {
+ this.key = key;
+ this.location = location;
+ }
+
+ public TwinRequest() {
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ TwinRequest that = (TwinRequest) o;
+ return Objects.equals(key, that.key) && Objects.equals(location, that.location);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(key, location);
+ }
+
+ @Override
+ public String toString() {
+ return "TwinRequestBean{" +
+ "key='" + key + '\'' +
+ ", location='" + location + '\'' +
+ '}';
+ }
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinTracker.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinTracker.java
new file mode 100644
index 000000000000..7a0feff0d9aa
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinTracker.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import java.util.Objects;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * This Tracks Twin Object Updates for a given SessionKey (key, location).
+ * Twin Tracker consists of marshalled object( byte[]), version and sessionId.
+ * Version is incremented whenever object updates.
+ * sessionId is created only once per a SessionKey.
+ * TwinTracker is created and updated by publisher and only consumed by Subscriber.
+ * Subscriber will ignore any stale updates based on version but resets version whenever there is new SessionId.
+ */
+public class TwinTracker {
+
+ private final AtomicInteger version;
+ private byte[] obj;
+ private final String sessionId;
+
+ public TwinTracker(byte[] obj) {
+ this(obj, 0, UUID.randomUUID().toString());
+ }
+ public TwinTracker(byte[] obj, int version, String sessionId) {
+ this.obj = obj;
+ this.version = new AtomicInteger(version);
+ this.sessionId = Objects.requireNonNull(sessionId);
+ }
+
+ public int getVersion() {
+ return version.get();
+ }
+
+ public int incrementVersion() {
+ return version.incrementAndGet();
+ }
+
+ public byte[] getObj() {
+ return obj;
+ }
+
+ public String getSessionId() {
+ return sessionId;
+ }
+
+
+ public void setObj(byte[] obj) {
+ this.obj = obj;
+ }
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinUpdate.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinUpdate.java
new file mode 100644
index 000000000000..098c3f7eeb8c
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/common/TwinUpdate.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+package org.opennms.core.ipc.twin.common;
+
+import com.google.common.base.Objects;
+
+import java.util.Arrays;
+import java.util.StringJoiner;
+
+public class TwinUpdate {
+
+
+ private final TwinRequest twinRequest;
+
+ public TwinUpdate() {
+ this.twinRequest = new TwinRequest();
+ }
+
+ public TwinUpdate(String key, String location, byte[] object) {
+ this.twinRequest = new TwinRequest(key, location);
+ this.object = object;
+ }
+ public TwinUpdate(String key, String location) {
+ this.twinRequest = new TwinRequest(key, location);
+ }
+
+ private byte[] object;
+
+ private int version;
+
+ private boolean isPatch;
+
+ private String sessionId;
+
+ public byte[] getObject() {
+ return object;
+ }
+
+ public void setObject(byte[] object) {
+ this.object = object;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+
+ public String getSessionId() {
+ return sessionId;
+ }
+
+ public void setSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ public boolean isPatch() {
+ return isPatch;
+ }
+
+ public void setPatch(boolean patch) {
+ isPatch = patch;
+ }
+
+ public void setLocation(String location) {
+ twinRequest.setLocation(location);
+ }
+
+ public void setKey(String key) {
+ twinRequest.setKey(key);
+ }
+
+ public String getLocation() {
+ return twinRequest.getLocation();
+ }
+
+ public String getKey() {
+ return twinRequest.getKey();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof TwinUpdate)) return false;
+ TwinUpdate that = (TwinUpdate) o;
+ return version == that.version && isPatch == that.isPatch
+ && Objects.equal(twinRequest, that.twinRequest)
+ && Objects.equal(object, that.object)
+ && Objects.equal(sessionId, that.sessionId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(twinRequest, object, version, isPatch, sessionId);
+ }
+
+ @Override
+ public String toString() {
+ return new StringJoiner(", ", TwinUpdate.class.getSimpleName() + "[", "]")
+ .add("twinRequest=" + twinRequest)
+ .add("object=" + Arrays.toString(object))
+ .add("version=" + version)
+ .add("isPatch=" + isPatch)
+ .add("sessionId='" + sessionId + "'")
+ .toString();
+ }
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinMessageProto.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinMessageProto.java
new file mode 100644
index 000000000000..bc43b319e210
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinMessageProto.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: twin-message.proto
+
+package org.opennms.core.ipc.twin.model;
+
+public final class TwinMessageProto {
+ private TwinMessageProto() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_TwinRequestProto_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_TwinRequestProto_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_TwinRequestProto_TracingInfoEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_TwinRequestProto_TracingInfoEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_TwinResponseProto_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_TwinResponseProto_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_TwinResponseProto_TracingInfoEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_TwinResponseProto_TracingInfoEntry_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\022twin-message.proto\"\273\001\n\020TwinRequestProt" +
+ "o\022\024\n\014consumer_key\030\001 \001(\t\022\021\n\tsystem_id\030\002 \001" +
+ "(\t\022\020\n\010location\030\003 \001(\t\0228\n\014tracing_info\030\004 \003" +
+ "(\0132\".TwinRequestProto.TracingInfoEntry\0322" +
+ "\n\020TracingInfoEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" +
+ "\030\002 \001(\t:\0028\001\"\220\002\n\021TwinResponseProto\022\024\n\014cons" +
+ "umer_key\030\001 \001(\t\022\023\n\013twin_object\030\002 \001(\014\022\021\n\ts" +
+ "ystem_id\030\003 \001(\t\022\020\n\010location\030\004 \001(\t\022\027\n\017is_p" +
+ "atch_object\030\005 \001(\010\022\022\n\nsession_id\030\006 \001(\t\022\017\n" +
+ "\007version\030\007 \001(\005\0229\n\014tracing_info\030\010 \003(\0132#.T" +
+ "winResponseProto.TracingInfoEntry\0322\n\020Tra" +
+ "cingInfoEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" +
+ "\t:\0028\001B5\n\037org.opennms.core.ipc.twin.model" +
+ "B\020TwinMessageProtoP\001b\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ internal_static_TwinRequestProto_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_TwinRequestProto_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_TwinRequestProto_descriptor,
+ new java.lang.String[] { "ConsumerKey", "SystemId", "Location", "TracingInfo", });
+ internal_static_TwinRequestProto_TracingInfoEntry_descriptor =
+ internal_static_TwinRequestProto_descriptor.getNestedTypes().get(0);
+ internal_static_TwinRequestProto_TracingInfoEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_TwinRequestProto_TracingInfoEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_TwinResponseProto_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_TwinResponseProto_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_TwinResponseProto_descriptor,
+ new java.lang.String[] { "ConsumerKey", "TwinObject", "SystemId", "Location", "IsPatchObject", "SessionId", "Version", "TracingInfo", });
+ internal_static_TwinResponseProto_TracingInfoEntry_descriptor =
+ internal_static_TwinResponseProto_descriptor.getNestedTypes().get(0);
+ internal_static_TwinResponseProto_TracingInfoEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_TwinResponseProto_TracingInfoEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinRequestProto.java b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinRequestProto.java
new file mode 100644
index 000000000000..6fab747ca203
--- /dev/null
+++ b/core/ipc/twin/common/src/main/java/org/opennms/core/ipc/twin/model/TwinRequestProto.java
@@ -0,0 +1,1109 @@
+/*******************************************************************************
+ * This file is part of OpenNMS(R).
+ *
+ * Copyright (C) 2021 The OpenNMS Group, Inc.
+ * OpenNMS(R) is Copyright (C) 1999-2021 The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
+ *
+ * OpenNMS(R) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License,
+ * or (at your option) any later version.
+ *
+ * OpenNMS(R) is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with OpenNMS(R). If not, see:
+ * http://www.gnu.org/licenses/
+ *
+ * For more information contact:
+ * OpenNMS(R) Licensing
+ * http://www.opennms.org/
+ * http://www.opennms.com/
+ *******************************************************************************/
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: twin-message.proto
+
+package org.opennms.core.ipc.twin.model;
+
+/**
+ *
+ *Twin Request object used by Minion to make RPC Request.
+ *