summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/python-executor
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-16 12:13:32 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-16 12:13:32 -0400
commit01cbd5c7ea7b554f229ff3735d5352038f8b4419 (patch)
treee7e9bd7c6909d08c52b6ccf0496835097a8d1acb /ms/blueprintsprocessor/functions/python-executor
parent607c3e652400aa5f772bc353bb56f7e96869e383 (diff)
Add support to command to execute for remote python
Change-Id: I043ea301faf87fb487204180a3294de0a76d3543 Issue-ID: CCSDK-1164 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/python-executor')
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
index a243f44bf..6437cdf03 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
@@ -46,6 +46,7 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic
companion object {
const val INPUT_ENDPOINT_SELECTOR = "endpoint-selector"
const val INPUT_DYNAMIC_PROPERTIES = "dynamic-properties"
+ const val INPUT_COMMAND = "command"
}
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
@@ -73,9 +74,10 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic
val endPointSelector = getOperationInput(INPUT_ENDPOINT_SELECTOR)
val dynamicProperties = getOperationInput(INPUT_DYNAMIC_PROPERTIES)
+ val command = getOperationInput(INPUT_COMMAND).asText()
// TODO("Python execution command and Resolve some expressions with dynamic properties")
- val scriptCommand = pythonScript.absolutePath
+ val scriptCommand = command.replace(pythonScript.name, pythonScript.absolutePath)
val dependencies = operationAssignment.implementation?.dependencies