From d73e0d5ba6a2b3968f57cf474832c6e32fa683bf Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Thu, 5 Apr 2018 14:20:44 -0400 Subject: 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 --- ChangeLog.md | 4 ++++ pom.xml | 2 +- src/sch/core.clj | 4 ++++ test/sch/core_test.clj | 3 +++ version.properties | 2 +- 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. org.onap.dcaegen2.platform servicechange-handler - 1.1.2 + 1.1.3 jar 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 -- cgit 1.2.3-korg