summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/blueprint-core
diff options
context:
space:
mode:
authorSerge Simard <serge@agilitae.com>2019-06-12 10:06:24 -0400
committerSerge Simard <serge@agilitae.com>2019-06-13 00:45:32 -0400
commit39167cccae3271603819aa39c6476e434c759533 (patch)
tree31dcacd8dd7409f3ee1cf6eb842991d70f678e94 /ms/controllerblueprints/modules/blueprint-core
parentbe4979c8ebd5e9df53b59dbca32d9703794fc500 (diff)
Various bug fixes encountered during remote ansible executor development.
- Upload CBA sometimes failed because Property files were left opened. - Default value were ignored on datatype elements. - Various erroneous error messages - Fixed job template lookup by name encoding when name contains blanks. Issue-ID: CCSDK-1357 Signed-off-by: Serge Simard <serge@agilitae.com> Change-Id: If9d4b0339d647e6c99121f5464a1b6da787761a0 Signed-off-by: Serge Simard <serge@agilitae.com>
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt3
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt4
2 files changed, 5 insertions, 2 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
index 8f39a5a5c..0819ed74b 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -547,7 +547,8 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
workflowDynamicInputs?.let {
bluePrintContext.dataTypeByName("dt-$dynamicInputPropertiesName")?.properties?.forEach { propertyName, property ->
- val valueNode: JsonNode = workflowDynamicInputs.at(BluePrintConstants.PATH_DIVIDER + propertyName)
+ val valueNode: JsonNode = workflowDynamicInputs.at(BluePrintConstants.PATH_DIVIDER + propertyName).returnNullIfMissing()
+ ?: property.defaultValue
?: NullNode.getInstance()
setInputValue(propertyName, property, valueNode)
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
index c51f48290..60ed6343a 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
@@ -65,7 +65,9 @@ class BluePrintMetadataUtils {
envDir.listFiles()
.filter { it.name.endsWith(".properties") }
.forEach {
- properties.load(it.inputStream())
+ val istream = it.inputStream()
+ properties.load(istream)
+ istream.close()
}
}
return properties