diff options
Diffstat (limited to 'adaptors/mdsal-resource/provider/src/main')
3 files changed, 9 insertions, 8 deletions
diff --git a/adaptors/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java b/adaptors/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java index e9e006f17..eee5f099f 100755 --- a/adaptors/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java +++ b/adaptors/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java @@ -33,6 +33,7 @@ import org.onap.ccsdk.sli.core.utils.JREFileResolver; import org.onap.ccsdk.sli.core.utils.KarafRootFileResolver; import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver; import org.onap.ccsdk.sli.core.utils.common.CoreDefaultFileResolver; +import org.onap.ccsdk.sli.core.utils.common.EnvProperties; import org.onap.ccsdk.sli.core.utils.common.SdncConfigEnvVarFileResolver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -89,7 +90,7 @@ public class MdsalResourcePropertiesProviderImpl implements MdsalResourcePropert final File propertiesFile = determinePropertiesFile(this); if (propertiesFile != null) { try (FileInputStream fileInputStream = new FileInputStream(propertiesFile)) { - properties = new Properties(); + properties = new EnvProperties(); properties.load(fileInputStream); } catch (final IOException e) { LOG.error("Failed to load properties for file: {}", propertiesFile.toString(), @@ -101,7 +102,7 @@ public class MdsalResourcePropertiesProviderImpl implements MdsalResourcePropert InputStream propStr = getClass().getResourceAsStream("/" + MDSALRESOURCE_PROP_FILE_NAME); if (propStr != null) { - properties = new Properties(); + properties = new EnvProperties(); try { properties.load(propStr); propStr.close(); diff --git a/adaptors/mdsal-resource/provider/src/main/resources/mdsal-resource.properties b/adaptors/mdsal-resource/provider/src/main/resources/mdsal-resource.properties index 47c8ebf77..4e348b3c8 100644 --- a/adaptors/mdsal-resource/provider/src/main/resources/mdsal-resource.properties +++ b/adaptors/mdsal-resource/provider/src/main/resources/mdsal-resource.properties @@ -19,8 +19,8 @@ # ============LICENSE_END========================================================= ### -org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user=admin -org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user=${ODL_USER:-admin} +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd=${ODL_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-host=localhost org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-protocol=http org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-port=8181 diff --git a/adaptors/mdsal-resource/provider/src/main/resources/svclogic.properties b/adaptors/mdsal-resource/provider/src/main/resources/svclogic.properties index 0abadc5c8..2c91a05d0 100644 --- a/adaptors/mdsal-resource/provider/src/main/resources/svclogic.properties +++ b/adaptors/mdsal-resource/provider/src/main/resources/svclogic.properties @@ -20,7 +20,7 @@ ### org.onap.ccsdk.sli.adaptors.dbtype = jdbc -org.onap.ccsdk.sli.adaptors.jdbc.url = jdbc:mysql://dbhost:3306/sdnctl -org.onap.ccsdk.sli.adaptors.jdbc.database = sdnctl -org.onap.ccsdk.sli.adaptors.jdbc.user = sdnctl -org.onap.ccsdk.sli.adaptors.jdbc.password = gamma +org.onap.ccsdk.sli.adaptors.jdbc.url = jdbc:mysql://dbhost:3306/${MYSQL_DATABASE} +org.onap.ccsdk.sli.adaptors.jdbc.database = ${MYSQL_DATABASE} +org.onap.ccsdk.sli.adaptors.jdbc.user = ${MYSQL_USER} +org.onap.ccsdk.sli.adaptors.jdbc.password = ${MYSQL_PASSWORD} |