From 1fdaf4953daf15970afe6ee10491dfa2d0a76753 Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Fri, 27 Dec 2019 15:43:53 -0500 Subject: Runtime services for Relationship Type and Templates Added and improved blueprint runtime service property resolution api. Relationship template CBA sample Performance improvement on Artifact resolutions. Added connection config DSL for DB, GRPC connections. Added starter relationship connection config models. Issue-ID: CCSDK-1054 Signed-off-by: Brinda Santh Change-Id: I73e1deed708dc924352867ddd1d1b2271c8ea106 --- .../functions/netconf/executor/NetconfComponentFunction.kt | 4 ++-- .../functions/python/executor/ComponentJythonExecutor.kt | 2 +- .../functions/python/executor/scripts/BlueprintJythonServiceImpl.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ms/blueprintsprocessor/functions') 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 58e6151f0..bb3538168 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 @@ -55,8 +55,8 @@ abstract class NetconfComponentFunction : AbstractScriptComponentFunction() { "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.artifactContent" ) ) - fun generateMessage(artifactName: String): String { - return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName) + fun generateMessage(artifactName: String): String = runBlocking { + bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName) } @Deprecated( diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt index 99e6c6c62..03daf2aa9 100644 --- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt +++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt @@ -60,7 +60,7 @@ open class ComponentJythonExecutor( .addError("Failed in ComponentJythonExecutor : ${runtimeException.message}") } - private fun populateJythonComponentInstance() { + private suspend fun populateJythonComponentInstance() { val bluePrintContext = bluePrintRuntimeService.bluePrintContext() val operationAssignment: OperationAssignment = bluePrintContext diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt index 7f4afe699..9000d65d8 100644 --- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt +++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt @@ -85,7 +85,7 @@ class BlueprintJythonServiceImpl( ) } - fun jythonComponentInstance(abstractComponentFunction: AbstractComponentFunction): AbstractComponentFunction { + suspend fun jythonComponentInstance(abstractComponentFunction: AbstractComponentFunction): AbstractComponentFunction { val bluePrintRuntimeService = abstractComponentFunction.bluePrintRuntimeService val bluePrintContext = bluePrintRuntimeService.bluePrintContext() -- cgit 1.2.3-korg