diff options
author | Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> | 2019-07-10 20:47:26 +0000 |
---|---|---|
committer | Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com> | 2019-07-10 20:49:42 +0000 |
commit | 9b9db2f18c1fc16361154a55328304b6ffa9c49a (patch) | |
tree | e6a3c4d42198c59ea1c676dbc7bf38b5a52e23c0 /ms/blueprintsprocessor/functions | |
parent | e827a3aee231453f704fef1a945d13de380a83c5 (diff) |
Handle blank reponse body for PUT capability
Issue-Id: CCSDK-1467
Signed-off-by: Abdelmuhaimen Seaudi <abdelmuhaimen.seaudi@orange.com>
Change-Id: Ibc50be0bf9986c49d2c7546f895c85c6851447bb
Diffstat (limited to 'ms/blueprintsprocessor/functions')
-rw-r--r-- | ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt | 6 |
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 = |