From 92148caefffdee433e1ed9f1edc17858e6de1e49 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Tue, 12 Feb 2019 15:26:19 -0500 Subject: Add netconf script component function Change-Id: I094025fba5626bae0b4b13320f1cbbb76cda3bfd Issue-ID: CCSDK-790 Signed-off-by: Muthuramalingam, Brinda Santh --- .../functions/netconf/executor/ComponentNetconfExecutorTest.kt | 10 ++++------ .../functions/netconf/executor/NetconfSessionImplTest.kt | 9 +++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin') diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt index c33bfcfa8..d6f737fdd 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt @@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode import org.junit.Test import org.junit.runner.RunWith import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput -import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.BlueprintPythonService +import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.BlueprintJythonService import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.PythonExecutorProperty import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode @@ -35,10 +35,10 @@ import org.springframework.test.context.TestPropertySource import org.springframework.test.context.junit4.SpringRunner @RunWith(SpringRunner::class) -@ContextConfiguration(classes = [NetconfExecutorConfiguration::class, BlueprintPythonService::class, +@ContextConfiguration(classes = [NetconfExecutorConfiguration::class, BlueprintJythonService::class, PythonExecutorProperty::class]) @TestPropertySource(properties = -["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf;./../../../../components/scripts/python/ccsdk_blueprints", +["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf,./../../../../components/scripts/python/ccsdk_blueprints", "blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_netconf"]) class ComponentNetconfExecutorTest { @@ -70,9 +70,7 @@ class ComponentNetconfExecutorTest { componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService componentNetconfExecutor.stepName = "activate-netconf" - - //TODO to fix build issue - //componentNetconfExecutor.apply(executionServiceInput) + componentNetconfExecutor.apply(executionServiceInput) } } diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt index eefead21e..4ee48bc82 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt +++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt @@ -18,7 +18,6 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import org.junit.After import org.junit.Assert import org.junit.Before -import org.junit.Test import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces.DeviceInfo import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfDeviceSimulator @@ -31,7 +30,13 @@ class NetconfSessionImplTest { @Before fun before() { - deviceInfo =DeviceInfo("name", "password", "localhost", 2224, "10") + deviceInfo = DeviceInfo().apply { + name = "name" + pass = "password" + ipAddress = "localhost" + port = 2224 + connectTimeoutSec = 10 + } device = NetconfDeviceSimulator(deviceInfo!!.port) device!!.start() -- cgit 1.2.3-korg