Update IConfiguration impl 41/41241/1
authorMichael Hwang <mhwang@research.att.com>
Thu, 5 Apr 2018 18:20:44 +0000 (14:20 -0400)
committerMichael Hwang <mhwang@research.att.com>
Thu, 5 Apr 2018 18:25:25 +0000 (14:25 -0400)
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>
ChangeLog.md
pom.xml
src/sch/core.clj
test/sch/core_test.clj
version.properties

index 7ed2195..e657225 100644 (file)
@@ -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 (file)
--- 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>
 
index a1734fa..1852c76 100644 (file)
@@ -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)))
       (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!
index c615f5d..4d0ee2b 100644 (file)
@@ -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))
     )
   )
index 952a72c..bcf3556 100644 (file)
@@ -1,6 +1,6 @@
 major=1\r
 minor=1\r
-patch=2\r
+patch=3\r
 base_version=${major}.${minor}.${patch}\r
 release_version=${base_version}\r
 snapshot_version=${base_version}-SNAPSHOT\r