summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/resource-dict
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2019-09-23 18:47:29 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2019-09-24 12:53:44 -0400
commite0e2aa06217ea5299e720e97f4275197551b3e68 (patch)
tree5744e56b68f0b27f9190c55f326a81bcb2040024 /ms/controllerblueprints/modules/resource-dict
parent7acab9f8a2f0da70ecdbf8d7850134fcbbbf46c2 (diff)
Refactoring ResourceAssignmentUtils
Changing isNull condition to isNullOrEmpty to make sure Empty value doesn't get assigned to resource Issue-ID: CCSDK-1748 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I0744537c7ddec80f20ffd7e6545b947439f63743
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict')
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt22
1 files changed, 13 insertions, 9 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt
index c222de9e5..2966d8b5d 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt
+++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt
@@ -84,15 +84,19 @@ open class ResourceAssignment {
var updatedBy: String? = null
override fun toString(): String {
- return StringBuilder()
- .append("[")
- .append("name=", name)
- .append(", status=", status)
- .append(", property=", property?.value ?: "")
- .append(", dictionaryName=", dictionaryName)
- .append(", dictionarySource=", dictionarySource)
- .append("]")
- .toString()
+ return """
+ [
+ name = $name
+ status = $status
+ property [
+ defaultValue = ${property?.defaultValue}
+ required = ${property?.required}
+ metadata = ${property?.metadata}
+ ]
+ dictionaryName = $dictionaryName
+ dictionarySource = $dictionarySource
+ ]
+ """.trimIndent()
}
}