X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ms%2Fblueprintsprocessor%2Ffunctions%2Fcli-executor%2Fsrc%2Fmain%2Fkotlin%2Finternal%2Fscripts%2FInternalSimpleCli.kt;h=b3708a09254b4f75e013706f0e6fb2c154e5a60a;hb=341db21b2ac0a14a1ed2b8bf7930914dda054bfe;hp=4c1d92ae630649f705ed69c70d261a3265f0e251;hpb=b4c8e75823486a54b3b2e9cf5bcb960a23f2ebde;p=ccsdk%2Fcds.git diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/internal/scripts/InternalSimpleCli.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/internal/scripts/InternalSimpleCli.kt index 4c1d92ae6..b3708a092 100644 --- a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/internal/scripts/InternalSimpleCli.kt +++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/internal/scripts/InternalSimpleCli.kt @@ -19,11 +19,11 @@ package internal.scripts import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput +import org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.cliDeviceInfo +import org.onap.ccsdk.cds.blueprintsprocessor.functions.cli.executor.getSshClientService import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor -import org.onap.ccsdk.cds.blueprintsprocessor.ssh.sshClientService import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive -import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService import org.slf4j.LoggerFactory open class TestCliScriptFunction : AbstractScriptComponentFunction() { @@ -43,7 +43,6 @@ open class TestCliScriptFunction : AbstractScriptComponentFunction() { } } - open class Check : AbstractScriptComponentFunction() { private val log = LoggerFactory.getLogger(AbstractScriptComponentFunction::class.java)!! @@ -54,10 +53,10 @@ open class Check : AbstractScriptComponentFunction() { override suspend fun processNB(executionRequest: ExecutionServiceInput) { // Get the Device Information from the DSL Model - val deviceInformation = bluePrintRuntimeService.resolveDSLExpression("device-properties") + val deviceInformation = cliDeviceInfo("device-properties") // Get the Client Service - val sshClientService = BluePrintDependencyService.sshClientService(deviceInformation) + val sshClientService = getSshClientService(deviceInformation) sshClientService.startSessionNB() @@ -71,7 +70,7 @@ open class Check : AbstractScriptComponentFunction() { sshClientService.closeSessionNB() // Set the Response Data - setAttribute(ComponentScriptExecutor.RESPONSE_DATA, responseLog.asJsonPrimitive()) + setAttribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, responseLog.asJsonPrimitive()) log.info("Executing process") }