aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/netconf-executor/src/test
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-07-18 16:59:19 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-07-23 15:09:32 -0400
commita0140dea9c608d745767574ac621ca0060a2bddc (patch)
treee09a1a3f34b4d5c2c7988385a375d8f3cac64a1d /ms/blueprintsprocessor/functions/netconf-executor/src/test
parent4e7621ef49d87745df4eb05a4c7279eb2a1356ad (diff)
Refactor Netconf script component parent.
Change-Id: Ibbec8cd5785372a89e14a86d4e6ff7f9fed4aad2 Issue-ID: CCSDK-1499 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com> Signed-off-by: Steve Siani <alphonse.steve.siani.djissitchi@ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/netconf-executor/src/test')
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt17
1 files changed, 15 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
index 575117b15..8a08268d8 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
@@ -26,7 +26,7 @@ import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -61,8 +61,21 @@ class ComponentNetconfExecutorTest {
val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
- val executionContext = bluePrintRuntimeService.getExecutionContext()
+ val assignmentParams = "{\n" +
+ " \"ipAddress\": \"127.0.0.1\",\n" +
+ " \"hostName\": \"vnf-host\"\n" +
+ " }"
+
+ val json = """{
+ "hostname" : "127.0.0.1"
+ }
+ """.trimIndent()
+ bluePrintRuntimeService.assignInputs(json.asJsonType())
+ bluePrintRuntimeService.setNodeTemplateAttributeValue("resource-assignment", "assignment-params",
+ JacksonUtils.jsonNode(assignmentParams))
+
+ val executionContext = bluePrintRuntimeService.getExecutionContext()
componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService