From 366286371bfa76884b163e84928c31d6a4776439 Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Tue, 10 Oct 2017 16:24:20 -0400 Subject: Use the latest distribution client Also address Docker build issue Issue-Id: DCAEGEN2-150 Change-Id: I2db297eed1c9c1c97cc440703cf4309fae8e8906 Signed-off-by: Michael Hwang --- pom.xml | 8 +++++--- src/sch/asdc_client.clj | 2 +- src/sch/core.clj | 25 +++++++++++++------------ test/sch/parse_test.clj | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 5552875..0157788 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ org.openecomp.sdc.sdc-distribution-client sdc-distribution-client - 1.1.0-SNAPSHOT + 1.1.50 com.taoensso @@ -194,13 +194,15 @@ latest java:8-jre - ["java", "-jar", "/opt/${project.build.finalName}.jar", "prod", "http://consul:8500/v1/kv/service-change-handler?raw=true"] + + ["java", "-jar", "/opt/servicechange-handler.jar", "prod", "http://consul:8500/v1/kv/service-change-handler?raw=true"] /opt ${project.build.directory} - ${project.build.finalName}.jar + servicechange-handler.jar ${onap.nexus.dockerregistry.daily} diff --git a/src/sch/asdc_client.clj b/src/sch/asdc_client.clj index 702c571..a9742b3 100644 --- a/src/sch/asdc_client.clj +++ b/src/sch/asdc_client.clj @@ -44,7 +44,7 @@ (defn construct-service-path [service-uuid] - (str "/asdc/v1/catalog/services/" service-uuid "/metadata")) + (str "/sdc/v1/catalog/services/" service-uuid "/metadata")) (defn get-artifact! diff --git a/src/sch/core.clj b/src/sch/core.clj index 8684576..a5e1998 100644 --- a/src/sch/core.clj +++ b/src/sch/core.clj @@ -92,24 +92,25 @@ [config] (let [config-asdc (:asdcDistributionClient config)] (proxy [IConfiguration] [] - (getAsdcAddress [] (:asdcAddress config-asdc)) - (getUser [] (:user config-asdc)) - (getPassword [] (:password config-asdc)) - (getPollingInterval [] (:pollingInterval config-asdc)) - (getPollingTimeout [] (:pollingTimeout config-asdc)) + (getAsdcAddress [] (str (:asdcAddress config-asdc))) + (getUser [] (str (:user config-asdc))) + (getPassword [] (str (:password config-asdc))) + (getPollingInterval [] (int (:pollingInterval config-asdc))) + (getPollingTimeout [] (int (:pollingTimeout config-asdc))) ; Note: The following didn't work ; (. Arrays asList (. ArtifactTypeEnum values)) ; Also, cannot just use a narrow list of artifact types in order ; to handle the deletion scenario. (getRelevantArtifactTypes [] (java.util.ArrayList. (get-dcae-artifact-types))) - (getConsumerGroup [] (:consumerGroup config-asdc)) - (getConsumerID [] (:consumerId config-asdc)) - (getEnvironmentName [] (:environmentName config-asdc)) - (getKeyStorePath [] (:keyStorePath config-asdc)) - (getKeyStorePassword [] (:keyStorePassword config-asdc)) - (activateServerTLSAuth [] (:activateServerTLSAuth config-asdc)) - (isFilterInEmptyResources [] (:isFilterInEmptyResources config-asdc)) + (getConsumerGroup [] (str (:consumerGroup config-asdc))) + (getConsumerID [] (str (:consumerId config-asdc))) + (getEnvironmentName [] (str (:environmentName config-asdc))) + (getKeyStorePath [] (str (:keyStorePath config-asdc))) + (getKeyStorePassword [] (str (:keyStorePassword config-asdc))) + (activateServerTLSAuth [] (boolean (:activateServerTLSAuth config-asdc))) + (isFilterInEmptyResources [] (boolean (:isFilterInEmptyResources config-asdc))) + (isUseHttpsWithDmaap [] (contains? config-asdc :useHttpsWithDmaap) (Boolean/valueOf(str (:useHttpsWithDmaap config-asdc))) true) ))) (defn run-distribution-client! diff --git a/test/sch/parse_test.clj b/test/sch/parse_test.clj index 06b5734..107f1a1 100644 --- a/test/sch/parse_test.clj +++ b/test/sch/parse_test.clj @@ -46,7 +46,7 @@ :typeName "sample-blueprint", :typeVersion 2, :blueprintTemplate "Fake blueprint", - :asdcServiceURL "/asdc/v1/catalog/services/9eaf59ee-2fe0-48a9-8d20-6f9b09ba807b/metadata" + :asdcServiceURL "/sdc/v1/catalog/services/9eaf59ee-2fe0-48a9-8d20-6f9b09ba807b/metadata" :serviceLocations ["CLLI1" "CLL2"] } ] -- cgit 1.2.3-korg