From 69e393da4cce52a0491fffff2dc81fbe59aeca08 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 17 Feb 2021 15:25:45 -0500 Subject: 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 Change-Id: I7538b719631d8c10c27d059aeb4f70ce92760ebd --- adaptors/netbox-client/provider/pom.xml | 20 ++++++++++---------- .../adaptors/netbox/property/NetboxProperties.java | 4 +++- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'adaptors/netbox-client') diff --git a/adaptors/netbox-client/provider/pom.xml b/adaptors/netbox-client/provider/pom.xml index 483e80868..93eedd92d 100644 --- a/adaptors/netbox-client/provider/pom.xml +++ b/adaptors/netbox-client/provider/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.parent binding-parent 2.1.1-SNAPSHOT - + org.onap.ccsdk.sli.adaptors @@ -33,15 +33,15 @@ ccsdk-sli-adaptors :: netbox-client :: ${project.artifactId} - - - org.onap.ccsdk.sli.core - sli-core-artifacts - ${project.version} - pom - import - - + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${project.version} + pom + import + + diff --git a/adaptors/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java b/adaptors/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java index 9b4751e64..643a2dbed 100644 --- a/adaptors/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java +++ b/adaptors/netbox-client/provider/src/main/java/org/onap/ccsdk/sli/adaptors/netbox/property/NetboxProperties.java @@ -20,6 +20,8 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties; + +import org.onap.ccsdk.sli.core.utils.common.EnvProperties; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.FrameworkUtil; @@ -52,7 +54,7 @@ public class NetboxProperties { } private void loadProps() { - properties = new Properties(); + properties = new EnvProperties(); // Try to load config from dir final String ccsdkConfigDir = System.getProperty(PROPERTIES_DIR_KEY, DEFAULT_PROPERTIES_DIR) + "/" + NETBOX_PROPERTY_FILE_NAME; -- cgit 1.2.3-korg