- credentials
- nexusUrl
- podName
+- file.operational
+- file.models
+- file.config
+
+> Refer to the example properties file
If the module cannot find the properties file it will default to generic values and attempt to move forward.
private static String CREDENTIALS;
private static String NEXUS_URL;
private static String POD_NAME;
+ private static String OPERATIONAL_JSON;
+ private static String MODELS_JSON;
+ private static String CONFIG_JSON;
private static String PROPERTIES_FILE = System.getenv("SDNC_CONFIG_DIR") + "/daexim-offsite-backup.properties";
- private static final String OPERATIONAL_JSON = "odl_backup_operational.json";
- private static final String MODELS_JSON = "odl_backup_models.json";
- private static final String CONFIG_JSON = "odl_backup_config.json";
private static final String BACKUP_ARCHIVE = "odl_backup.zip";
private static final String appName = "daexim-offsite-backup";
properties.put("credentials", "admin:enc:YWRtaW4xMjM=");
properties.put("nexusUrl", "http://localhost:8081/nexus/content/repositories/");
properties.put("podName", "UNKNOWN_ODL");
+ properties.put("file.operational", "odl_backup_operational.json");
+ properties.put("file.models", "odl_backup_models.json");
+ properties.put("file.config", "odl_backup_config.json");
return;
}
FileInputStream fileInputStream;
LOG.info("daeximDirectory: " + properties.getProperty("daeximDirectory"));
LOG.info("nexusUrl: " + properties.getProperty("nexusUrl"));
LOG.info("podName: " + properties.getProperty("podName"));
+ LOG.info("file.operational: " + properties.getProperty("file.operational"));
+ LOG.info("file.models: " + properties.getProperty("file.models"));
+ LOG.info("file.config: " + properties.getProperty("file.config"));
} catch(IOException e) {
LOG.error("Error loading properties.", e);
}
DAEXIM_DIR = properties.getProperty("daeximDirectory");
NEXUS_URL = properties.getProperty("nexusUrl");
+ OPERATIONAL_JSON = properties.getProperty("file.operational");
+ MODELS_JSON = properties.getProperty("file.models");
+ CONFIG_JSON = properties.getProperty("file.config");
+
if(!properties.getProperty("credentials").contains(":")) { //Entire thing is encoded
CREDENTIALS = new String(Base64.getDecoder().decode(properties.getProperty("credentials")));
}
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
# Example properties file
daeximDirectory=/opt/opendaylight/current/daexim/
credentials=admin:enc:YWRtaW4xMjM=
nexusUrl=http://localhost:8081/nexus/content/repositories/
-podName=UNKNOWN_ODL
\ No newline at end of file
+podName=UNKNOWN_ODL
+file.operational=odl_backup_operational.json
+file.models=odl_backup_models.json
+file.config=odl_backup_config.json
\ No newline at end of file
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
daeximDirectory=/opt/opendaylight/current/daexim/
credentials=admin:admin123
nexusUrl=http://localhost:8081/nexus/content/repositories/
-podName=UNKNOWN_ODL
\ No newline at end of file
+podName=UNKNOWN_ODL
+file.operational=odl_backup_operational.json
+file.models=odl_backup_models.json
+file.config=odl_backup_config.json
\ No newline at end of file