summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2018-04-05 14:20:44 -0400
committerMichael Hwang <mhwang@research.att.com>2018-04-05 14:25:25 -0400
commitd73e0d5ba6a2b3968f57cf474832c6e32fa683bf (patch)
tree4a340054a8447caa9f7ccfac3afc4677748838b0
parent97b39b1577063aea01bf35abb849503626164ce0 (diff)
Update IConfiguration impl
v1.3.0 of distribution client changed the IConfiguration interface Change-Id: I29164aea59cdfd1273f1b7652d828d62d804b5f5 Issue-ID: DCAEGEN2-431 Signed-off-by: Michael Hwang <mhwang@research.att.com>
-rw-r--r--ChangeLog.md4
-rw-r--r--pom.xml2
-rw-r--r--src/sch/core.clj4
-rw-r--r--test/sch/core_test.clj3
-rw-r--r--version.properties2
5 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 7ed2195..e657225 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [1.1.3]
+
+* DCAEGEN2-431
+
## [1.1.0]
This body of work is aimed at getting SCH to be run on the new DCAE platform.
diff --git a/pom.xml b/pom.xml
index 8eae103..648fc9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<groupId>org.onap.dcaegen2.platform</groupId>
<artifactId>servicechange-handler</artifactId>
- <version>1.1.2</version>
+ <version>1.1.3</version>
<!-- Not sure why clojure-maven-plugin says packaging should be "clojure" -->
<packaging>jar</packaging>
diff --git a/src/sch/core.clj b/src/sch/core.clj
index a1734fa..1852c76 100644
--- a/src/sch/core.clj
+++ b/src/sch/core.clj
@@ -29,6 +29,7 @@
[sch.inventory-client :refer [create-inventory-conn]]
[sch.parse :refer [get-dcae-artifact-types pick-out-artifact]]
[sch.util :refer [read-config]]
+ [clojure.string :as strlib]
)
(:import (org.onap.sdc.impl DistributionClientFactory)
(org.onap.sdc.api.consumer IConfiguration INotificationCallback
@@ -93,6 +94,8 @@
(let [config-asdc (:asdcDistributionClient config)]
(proxy [IConfiguration] []
(getAsdcAddress [] (str (:asdcAddress config-asdc)))
+ (getMsgBusAddress [] (java.util.ArrayList.
+ (strlib/split (str (:msgBusAddress config-asdc)) #",")))
(getUser [] (str (:user config-asdc)))
(getPassword [] (str (:password config-asdc)))
(getPollingInterval [] (int (:pollingInterval config-asdc)))
@@ -111,6 +114,7 @@
(activateServerTLSAuth [] (boolean (:activateServerTLSAuth config-asdc)))
(isFilterInEmptyResources [] (boolean (:isFilterInEmptyResources config-asdc)))
(isUseHttpsWithDmaap [] (boolean (:useHttpsWithDmaap config-asdc false)))
+ (isConsumeProduceStatusTopic [] (boolean (:isConsumeProduceStatusTopic config-asdc false)))
)))
(defn run-distribution-client!
diff --git a/test/sch/core_test.clj b/test/sch/core_test.clj
index c615f5d..4d0ee2b 100644
--- a/test/sch/core_test.clj
+++ b/test/sch/core_test.clj
@@ -50,6 +50,7 @@
(deftest test-create-distribution-client-config
(let [config { :asdcDistributionClient { :environmentName "ONAP-AMDOCS"
:asdcAddress "10.0.3.1:8443"
+ :msgBusAddress "message-router-hostname"
:keyStorePassword nil
:pollingInterval 20
:consumerGroup "dcae"
@@ -66,5 +67,7 @@
dcc (create-distribution-client-config config)
]
(is (= (. dcc isUseHttpsWithDmaap) true))
+ (is (= (. dcc getMsgBusAddress) ["message-router-hostname"]))
+ (is (= (. dcc isConsumeProduceStatusTopic) false))
)
)
diff --git a/version.properties b/version.properties
index 952a72c..bcf3556 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=1
minor=1
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT