diff options
author | Dan Timoney <dtimoney@att.com> | 2019-06-18 15:13:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-06-18 15:13:31 +0000 |
commit | 856021afc2b0a8260fa2f498b7bc17b55a0f4b0a (patch) | |
tree | d8717b2b89ec2725ffe7d78d3cd99123eaee817c | |
parent | b8e4095db0157cf12ce78da64234d0bf75f0286a (diff) | |
parent | 3e7b00f9f2915dfe66b0e1825fd120ceba4cce65 (diff) |
Merge "Python executor: Execution command and prepare environment log Also fix error messages return when something goes wrong."
2 files changed, 28 insertions, 0 deletions
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json new file mode 100644 index 000000000..950c4a2df --- /dev/null +++ b/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json @@ -0,0 +1,26 @@ +{
+ "name": "properties-capability-source",
+ "updated-by": "Steve Alphonse Siani, alphonse.steve.siani.djissitchi@ibm.com",
+ "tags": "properties-capability-source",
+ "property" :{
+ "description": "Data dictionary used to read properties.",
+ "type": "string"
+ },
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "capability": {
+ "type": "source-capability",
+ "properties" : {
+ "script-type" : "jython",
+ "script-class-reference" : "Scripts/python/ResolvProperties.py",
+ "instance-dependencies" : []
+ }
+ }
+ }
+}
\ No newline at end of file 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 4642a7c13..4ef1cfbb3 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 @@ -95,6 +95,7 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic packages = packages ) val prepareEnvOutput = remoteScriptExecutionService.prepareEnv(prepareEnvInput) + log.info("$ATTRIBUTE_PREPARE_ENV_LOG - ${prepareEnvOutput.response}") setAttribute(ATTRIBUTE_PREPARE_ENV_LOG, prepareEnvOutput.response.asJsonPrimitive()) setAttribute(ATTRIBUTE_EXEC_CMD_LOG, "N/A".asJsonPrimitive()) check(prepareEnvOutput.status == StatusType.SUCCESS) { @@ -110,6 +111,7 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic command = scriptCommand, properties = properties) val remoteExecutionOutput = remoteScriptExecutionService.executeCommand(remoteExecutionInput) + log.info("$ATTRIBUTE_EXEC_CMD_LOG - ${remoteExecutionOutput.response}") setAttribute(ATTRIBUTE_EXEC_CMD_LOG, remoteExecutionOutput.response.asJsonPrimitive()) check(remoteExecutionOutput.status == StatusType.SUCCESS) { "failed to get prepare remote command response status for requestId(${remoteExecutionOutput.requestId})" |