// find aaiclient config file
File[] files = findFiles(configDirectory, DEFAULT_CONFIG_FILE_NAME);
// find aaiclient config file
File[] files = findFiles(configDirectory, DEFAULT_CONFIG_FILE_NAME);
// read the aai config data
if(files != null && files.length > 0) {
LOG.debug("AAIService config file exists and it is named :" + files[0].getAbsolutePath() );
// read the aai config data
if(files != null && files.length > 0) {
LOG.debug("AAIService config file exists and it is named :" + files[0].getAbsolutePath() );
properties.load(input);
LOG.debug("Loaded AAI Client properties from " + files[0].getAbsolutePath());
} catch (IOException exc) {
LOG.warn("Problem loading AAI Client properties from " + files[0].getAbsolutePath(), exc);
} finally {
properties.load(input);
LOG.debug("Loaded AAI Client properties from " + files[0].getAbsolutePath());
} catch (IOException exc) {
LOG.warn("Problem loading AAI Client properties from " + files[0].getAbsolutePath(), exc);
} finally {
int size = properties.keySet().size() ;
if(size == 0) {
LOG.debug(files[0].getAbsolutePath() + " contained no entries. Adding the default entry");
int size = properties.keySet().size() ;
if(size == 0) {
LOG.debug(files[0].getAbsolutePath() + " contained no entries. Adding the default entry");
if (sdnConfigDirectory == null || sdnConfigDirectory.isEmpty()) {
String filename = DEFAULT_SDNC_PROPERTY_FILE;
File file = new File(filename);
if (sdnConfigDirectory == null || sdnConfigDirectory.isEmpty()) {
String filename = DEFAULT_SDNC_PROPERTY_FILE;
File file = new File(filename);
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);
propertiesPath = filename;
LOG.info("Using property file (1): " + propertiesPath);
} else {
filename = BVC_PROPERTY_FILE;
file = new File(filename);