aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java3
-rwxr-xr-xsli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java13
2 files changed, 14 insertions, 2 deletions
diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
index 818077fb..4d17f873 100755
--- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
+++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
@@ -1325,7 +1325,8 @@ public class MdsalHelper {
@Deprecated
public static String getFullPropertiesPath(String propertiesFileName) {
- return "/opt/bvc/controller/configuration/" + propertiesFileName;
+ String karafHome = System.getProperty("karaf.home","/opt/lsc/controller");
+ return karafHome + "/configuration/" + propertiesFileName;
}
// This is called when mapping a valid java enumeration back to the yang model value
diff --git a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
index 56d0369e..744d48d7 100755
--- a/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
+++ b/sli/provider/src/test/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelperTest.java
@@ -349,4 +349,15 @@ public class MdsalHelperTest extends TestCase {
MdsalHelper.toProperties(props, address);
assertEquals("/cafe:0:0:0:0:0:0:8888", props.getProperty(""));
}
-} \ No newline at end of file
+
+ public void testGetFullPropertiesPath() {
+ String propertiesName = "l3ucpe.properties";
+ String path = MdsalHelper.getFullPropertiesPath(propertiesName);
+ //verify the default works
+ assertEquals("/opt/lsc/controller/configuration/l3ucpe.properties",path);
+ System.setProperty("karaf.home", "/opt/opendaylight/current");
+ path = MdsalHelper.getFullPropertiesPath(propertiesName);
+ //verify the system property is read
+ assertEquals("/opt/opendaylight/current/configuration/l3ucpe.properties",path);
+ }
+}