summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/netconf-executor
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-29 13:39:32 -0400
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-04-01 12:47:33 -0400
commitfeb0214caf9d9dfcf3280c8c0f63137219aafabb (patch)
treedbef5cc1660c39e4e1ca8dd7db8e391a7adeeada /ms/blueprintsprocessor/functions/netconf-executor
parentcb74139eb31d5bdaa6eb390ae7eebaf49729b7e4 (diff)
Improve bulk processing
Change-Id: Ia8bd447563072284aa71e00eab0ef9b93e1776b1 Issue-ID: CCSDK-1127 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/netconf-executor')
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt14
1 files changed, 8 insertions, 6 deletions
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
index 4b08ce8e2..be7451aa9 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2018-2019 IBM, Bell Canada.
+ * Modifications Copyright © 2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +18,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor
import com.fasterxml.jackson.databind.JsonNode
+import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.functions.netconf.executor.api.DeviceInfo
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
@@ -38,17 +40,17 @@ abstract class NetconfComponentFunction : AbstractScriptComponentFunction() {
return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
}
- 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 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())
}