summaryrefslogtreecommitdiffstats
path: root/appc-client/client-lib
diff options
context:
space:
mode:
authorSkip Wonnell <skip@att.com>2017-12-15 14:42:44 -0600
committerPatrick Brady <pb071s@att.com>2017-12-19 04:26:51 +0000
commit3d77400558365d716f567248d189a474d0bc8fae (patch)
tree46371d6b611162f2838339b30bf5f62feb322a01 /appc-client/client-lib
parentf0dad13dd1b44a7aa8720af48f479e36f7dcd886 (diff)
Adding new LCM features to the client lib
Provide support for a new set of LCM actions to support an In-Place Software Upgrade flow which can be triggered by SO. Issues included: APPC-346, APPC-349 Issue-ID: APPC-346 Change-Id: I65c10035978aecb543b1102dd9c2dbd8374921bc Signed-off-by: Skip Wonnell <skip@att.com>
Diffstat (limited to 'appc-client/client-lib')
-rw-r--r--appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java8
-rw-r--r--appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java8
2 files changed, 16 insertions, 0 deletions
diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
index 913f80f44..8fc678828 100644
--- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
+++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ConsumerImpl.java
@@ -105,6 +105,14 @@ class ConsumerImpl implements Consumer {
builder.usingHosts(hosts).onTopic(topic).knownAs(group, groupId);
builder.withSocketTimeout(timeout + 5000).waitAtServer(timeout);
builder.receivingAtMost(DEFAULT_LIMIT);
+
+ //added for loop for defect 354330
+ for (String url : hosts) {
+ if (url.contains("3905") || url.contains("https")) {
+ builder.usingHttps(true);
+ break;
+ }
+ }
// Add credentials if provided
if (authKey != null && authSecret != null) {
diff --git a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
index 7729db98d..b979c9d48 100644
--- a/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
+++ b/appc-client/client-lib/src/main/java/org/onap/appc/client/impl/protocol/ProducerImpl.java
@@ -62,6 +62,14 @@ class ProducerImpl implements Producer {
private CambriaBatchingPublisher getProducer() throws MalformedURLException, GeneralSecurityException {
PublisherBuilder builder = new PublisherBuilder().usingHosts(hosts);
+
+ //added for loop for defect 354330
+ for (String url : hosts) {
+ if (url.contains("3905") || url.contains("https")) {
+ builder.usingHttps(true);
+ break;
+ }
+ }
// Add credentials if provided
if (authKey != null && authSecret != null) {