From feb0214caf9d9dfcf3280c8c0f63137219aafabb Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 29 Mar 2019 13:39:32 -0400 Subject: Improve bulk processing Change-Id: Ia8bd447563072284aa71e00eab0ef9b93e1776b1 Issue-ID: CCSDK-1127 Signed-off-by: Muthuramalingam, Brinda Santh --- .../restconf/executor/RestconfComponentFunction.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ms/blueprintsprocessor/functions/restconf-executor/src') diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt index b95879274..3895c39c8 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt +++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfComponentFunction.kt @@ -17,6 +17,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor +import kotlinx.coroutines.runBlocking import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants @@ -38,21 +39,21 @@ abstract class RestconfComponentFunction : AbstractScriptComponentFunction() { return bluePrintRestLibPropertyService().blueprintWebClientService(selector) } - fun resolveFromDatabase(resolutionKey: String, artifactName: String): String { - return resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey) + fun resolveFromDatabase(resolutionKey: String, artifactName: String): String = runBlocking { + resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey) } fun generateMessage(artifactName: String): String { return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName) } - fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String { - return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName, + fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String = runBlocking { + resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactMapping, artifactTemplate) } - fun resolveAndGenerateMessage(artifactPrefix: String): String { - return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName, + fun resolveAndGenerateMessage(artifactPrefix: String): String = runBlocking { + resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactPrefix, mapOf()) } } \ No newline at end of file -- cgit 1.2.3-korg