summaryrefslogtreecommitdiffstats
path: root/northbound/ueb-listener
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-02-17 15:25:45 -0500
committerDan Timoney <dtimoney@att.com>2021-02-18 16:05:55 -0500
commit69e393da4cce52a0491fffff2dc81fbe59aeca08 (patch)
tree404cc750fa69ba2a89c7a2fce921da34db5edda4 /northbound/ueb-listener
parent56c27daf1656fd6436f8c818c771cf803079e1ea (diff)
Add new EnvProperties class
Added new class EnvProperties, which extends java.util.Properties and supports property values containing embedded environment variable references. Updated code to use this class to load svclogic.properties, and updated dmaap listener to use that class to load dmaap listener configuration. Issue-ID: SDNC-1482 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: I7538b719631d8c10c27d059aeb4f70ce92760ebd
Diffstat (limited to 'northbound/ueb-listener')
-rw-r--r--northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java3
-rwxr-xr-xnorthbound/ueb-listener/src/test/resources/ueb-listener.properties8
2 files changed, 6 insertions, 5 deletions
diff --git a/northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java b/northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
index 0088a14a8..4efc29b77 100644
--- a/northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
+++ b/northbound/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebConfiguration.java
@@ -30,6 +30,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+import org.onap.ccsdk.sli.core.utils.common.EnvProperties;
import org.onap.sdc.api.consumer.IConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -119,7 +120,7 @@ public class SdncUebConfiguration implements IConfiguration{
+ propFile);
}
- Properties props = new Properties();
+ Properties props = new EnvProperties();
props.load(new FileInputStream(propFile));
asdcAddress = props.getProperty("org.onap.ccsdk.sli.northbound.uebclient.asdc-address");
diff --git a/northbound/ueb-listener/src/test/resources/ueb-listener.properties b/northbound/ueb-listener/src/test/resources/ueb-listener.properties
index c017cbd7b..9cce1a7ba 100755
--- a/northbound/ueb-listener/src/test/resources/ueb-listener.properties
+++ b/northbound/ueb-listener/src/test/resources/ueb-listener.properties
@@ -2,10 +2,10 @@ org.onap.ccsdk.sli.northbound.uebclient.asdc-address=localhost:1234
org.onap.ccsdk.sli.northbound.uebclient.consumer-group=ccsdk1
org.onap.ccsdk.sli.northbound.uebclient.consumer-id=localhost_ccsdk1
org.onap.ccsdk.sli.northbound.uebclient.environment-name=UNITTEST
-org.onap.ccsdk.sli.northbound.uebclient.password=123456
-org.onap.ccsdk.sli.northbound.uebclient.user=test
-org.onap.ccsdk.sli.northbound.uebclient.sdnc-user=test
-org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd=test
+org.onap.ccsdk.sli.northbound.uebclient.password=${ASDC_PASSWORD}
+org.onap.ccsdk.sli.northbound.uebclient.user=${ASDC_USER}
+org.onap.ccsdk.sli.northbound.uebclient.sdnc-user=${ODL_USER}
+org.onap.ccsdk.sli.northbound.uebclient.sdnc-passwd=${ODL_PASSWORD}
org.onap.ccsdk.sli.northbound.uebclient.asdc-api-base-url=http://localhost:8282/restconf/operations/
org.onap.ccsdk.sli.northbound.uebclient.asdc-api-namespace=org:onap:ccsdk
org.onap.ccsdk.sli.northbound.uebclient.spool.incoming=src/test/resources/incoming