@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
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);
+ }
+}