summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/netconf-executor/src/main
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-07 11:23:17 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-07 16:24:14 +0000
commit3b55bf8ce76b38c83916fd3a6570e0bfbc697ab8 (patch)
tree75f09caa8256ad9a12484c36bb6255097969c5a3 /ms/blueprintsprocessor/functions/netconf-executor/src/main
parent68d8bda8229f89c9d120489baa7b1b228e0340fb (diff)
Add support for resource-resolution storage
Change-Id: I0113191075804f6b77ce54c741bf0a1ccd356c77 Issue-ID: CCSDK-338 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/netconf-executor/src/main')
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt13
1 files changed, 10 insertions, 3 deletions
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
index 26e51ec09..05a97c393 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfComponentFunction.kt
@@ -25,9 +25,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
abstract class NetconfComponentFunction : AbstractComponentFunction() {
-
open fun resourceResolutionService(): ResourceResolutionService =
- functionDependencyInstanceAsType(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
+ functionDependencyInstanceAsType(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
// Called from python script
fun initializeNetconfConnection(requirementName: String): NetconfDevice {
@@ -39,6 +38,14 @@ abstract class NetconfComponentFunction : AbstractComponentFunction() {
return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
}
+ fun getDynamicProperties(key: String): JsonNode {
+ return operationInputs["dynamic-properties"]!!.get(key)
+ }
+
+ fun resolveFromDatabase(resolutionKey: String, artifactName: String): String {
+ return resourceResolutionService().resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
+ }
+
fun resolveAndGenerateMessage(artifactMapping: String, artifactTemplate: String): String {
return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
artifactMapping, artifactTemplate)
@@ -46,7 +53,7 @@ abstract class NetconfComponentFunction : AbstractComponentFunction() {
fun resolveAndGenerateMessage(artifactPrefix: String): String {
return resourceResolutionService().resolveResources(bluePrintRuntimeService, nodeTemplateName,
- artifactPrefix)
+ artifactPrefix, mapOf())
}
private fun deviceProperties(requirementName: String): DeviceInfo {