summaryrefslogtreecommitdiffstats
path: root/daexim-offsite-backup/provider
diff options
context:
space:
mode:
Diffstat (limited to 'daexim-offsite-backup/provider')
-rwxr-xr-xdaexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java16
-rwxr-xr-xdaexim-offsite-backup/provider/src/main/resources/daexim-offsite-backup.properties24
-rwxr-xr-xdaexim-offsite-backup/provider/src/test/resources/daexim-offsite-backup.properties24
3 files changed, 59 insertions, 5 deletions
diff --git a/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java b/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
index cc16bf70..09c8f92f 100755
--- a/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
+++ b/daexim-offsite-backup/provider/src/main/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProvider.java
@@ -75,11 +75,11 @@ public class DaeximOffsiteBackupProvider implements AutoCloseable, DaeximOffsite
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";
@@ -122,6 +122,9 @@ public class DaeximOffsiteBackupProvider implements AutoCloseable, DaeximOffsite
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;
@@ -133,6 +136,9 @@ public class DaeximOffsiteBackupProvider implements AutoCloseable, DaeximOffsite
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);
}
@@ -147,6 +153,10 @@ public class DaeximOffsiteBackupProvider implements AutoCloseable, DaeximOffsite
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")));
}
diff --git a/daexim-offsite-backup/provider/src/main/resources/daexim-offsite-backup.properties b/daexim-offsite-backup/provider/src/main/resources/daexim-offsite-backup.properties
index bdfa8155..51efc1f1 100755
--- a/daexim-offsite-backup/provider/src/main/resources/daexim-offsite-backup.properties
+++ b/daexim-offsite-backup/provider/src/main/resources/daexim-offsite-backup.properties
@@ -1,6 +1,28 @@
+# ============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
diff --git a/daexim-offsite-backup/provider/src/test/resources/daexim-offsite-backup.properties b/daexim-offsite-backup/provider/src/test/resources/daexim-offsite-backup.properties
index 49dd133b..b6902790 100755
--- a/daexim-offsite-backup/provider/src/test/resources/daexim-offsite-backup.properties
+++ b/daexim-offsite-backup/provider/src/test/resources/daexim-offsite-backup.properties
@@ -1,4 +1,26 @@
+# ============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