aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuldipr <kuldip.rai@amdocs.com>2020-12-08 19:30:52 -0500
committerkuldipr <kuldip.rai@amdocs.com>2020-12-17 14:45:15 -0500
commitaa2f03b310d1e46cb6047bad7864e3d6b839fb8b (patch)
tree8e02dffa93d5d11b4b2424d57372f5aa0b4639a4
parent7b47df386f4e3a44b421f4f30e457af90fe7a5ab (diff)
ResourceResolution should fail if required resource did not resolve -edge casefrankfurt
Issue-ID: CCSDK-3022 Signed-off-by: kuldipr <kuldip.rai@amdocs.com> Change-Id: Ia88a86f13c693a7bcd2d61cdfb5c2e39041b5a31 Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
index 3b0eda01e..f9dfd864d 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
@@ -150,8 +150,11 @@ open class ResourceResolutionServiceImpl(
val failedResolution = resourceAssignmentList.filter { it.status != "success" && it.property?.required == true }.map { it.name }
if (failedResolution.isNotEmpty()) {
- log.error("Failed to resolve required resources($failedResolution)")
- bluePrintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError())
+ // The following error message is returned by default to handle a scenario when
+ // error message comes empty even when resolution has actually failed.
+ // Example: input-source type resolution seems to fail with no error code.
+ bluePrintRuntimeService.getBluePrintError().errors.add("Failed to resolve required resources($failedResolution)")
+ bluePrintRuntimeService.getBluePrintError().errors.addAll(resourceAssignmentRuntimeService.getBluePrintError().errors)
}
}
return ResourceResolutionResult(templateMap, assignmentMap)