summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-07-11 00:57:24 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-11 00:57:24 +0000
commit1ce050ff0a830d95a65260ab18eb8094ed628dc1 (patch)
tree4aac69144e40ca862d35a7ec71680af285f62faa /ms
parent70d4da09c2495b2680ad2f477e75188416f27de6 (diff)
parent9b9db2f18c1fc16361154a55328304b6ffa9c49a (diff)
Merge "Handle blank reponse body for PUT capability"
Diffstat (limited to 'ms')
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
index 6cf1c0be7..3bf0b359a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
@@ -88,7 +88,11 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
val response = restClientService.exchangeResource(verb, urlPath, payload)
val responseStatusCode = response.status
val responseBody = response.body
- if (responseStatusCode in 200..299 && !responseBody.isBlank()) {
+ val outputKeyMapping = sourceProperties.outputKeyMapping
+ if (responseStatusCode in 200..299 && outputKeyMapping.isNullOrEmpty()) {
+ logger.info("AS>> outputKeyMapping==null, will not populateResource")
+ }
+ else if (responseStatusCode in 200..299 && !responseBody.isBlank()) {
populateResource(resourceAssignment, sourceProperties, responseBody, path)
} else {
val errMsg =