From d39772eaeb2c6e6665c4a6d41f6af84f63151184 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Tue, 10 Sep 2019 15:41:13 -0400 Subject: Provide ongoing occurrence value for scripting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes this for template https://gerrit.onap.org/r/#/c/ccsdk/cds/+/95081/ but not for script, where the occurrence value might be needed. In reality, this overall occurrence thing is a mistacke, but it's solving an issue that I yet don't know how to properly solve. Change-Id: I7f8579ad2bde3f96b06aaf09c8b8c67d4b97e7b0 Issue-ID: CCSDK-1693 Signed-off-by: Alexis de Talhouët Signed-off-by: Shaaban Ebrahim --- .../functions/resource/resolution/ResourceResolutionService.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin') 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 ca623aa3b..28e7d395a 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 @@ -198,6 +198,7 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica blueprintRuntimeService } + exposeOccurrencePropertyInResourceAssignments(resourceAssignmentRuntimeService, properties) coroutineScope { bulkSequenced.forEach { batchResourceAssignments -> @@ -352,4 +353,9 @@ open class ResourceResolutionServiceImpl(private var applicationContext: Applica && resourceResolution.dictionaryVersion == resourceAssignment.version) } + private fun exposeOccurrencePropertyInResourceAssignments(raRuntimeService: ResourceAssignmentRuntimeService, + properties: Map) { + raRuntimeService.putResolutionStore(ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_OCCURRENCE, + properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_OCCURRENCE].asJsonPrimitive()) + } } -- cgit 1.2.3-korg