summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/config-snapshots
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions/config-snapshots')
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt5
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt1
-rw-r--r--ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt6
3 files changed, 7 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
index 311e95bc2..af3753e1a 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutor.kt
@@ -56,6 +56,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
AbstractComponentFunction() {
companion object {
+
private val log = LoggerFactory.getLogger(ComponentConfigSnapshotsExecutor::class.java)
// input fields names accepted by this executor
@@ -128,7 +129,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
setNodeOutputProperties(OUTPUT_STATUS_SUCCESS, cfgSnapshotValue)
} catch (er: NoSuchElementException) {
val message = "No Resource config snapshot identified by resourceId={$resourceId}, " +
- "resourceType={$resourceType} does not exists"
+ "resourceType={$resourceType} does not exists"
setNodeOutputErrors(OUTPUT_STATUS_ERROR, message)
}
}
@@ -217,7 +218,7 @@ open class ComponentConfigSnapshotsExecutor(private val cfgSnapshotService: Reso
val output = StringBuilder()
output.append(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
- "<diff>"
+ "<diff>"
)
val diffIterator = differences.getDifferences().iterator()
while (diffIterator.hasNext()) {
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
index 73c9e22f3..31d84e60d 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshot.kt
@@ -75,6 +75,7 @@ class ResourceConfigSnapshot : Serializable {
var createdDate = Date()
companion object {
+
private const val serialVersionUID = 1L
}
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
index 2383f2c64..06146c200 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
@@ -97,7 +97,7 @@ open class ResourceConfigSnapshotService(private val resourceConfigSnapshotRepos
?.let {
log.info(
"Overwriting configuration snapshot entry for resourceId=($resId), " +
- "resourceType=($resType), status=($status)"
+ "resourceType=($resType), status=($status)"
)
resourceConfigSnapshotRepository.deleteByResourceIdAndResourceTypeAndStatus(resId, resType, status)
}
@@ -107,8 +107,8 @@ open class ResourceConfigSnapshotService(private val resourceConfigSnapshotRepos
storedSnapshot = resourceConfigSnapshotRepository.saveAndFlush(resourceConfigSnapshotEntry)
log.info(
"Stored configuration snapshot for resourceId=($resId), " +
- "resourceType=($resType), status=($status), " +
- "dated=(${storedSnapshot.createdDate})"
+ "resourceType=($resType), status=($status), " +
+ "dated=(${storedSnapshot.createdDate})"
)
} catch (ex: DataIntegrityViolationException) {
throw BluePrintException("Failed to store configuration snapshot entry.", ex)