diff options
author | Dan Timoney <dtimoney@att.com> | 2019-11-01 20:23:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-01 20:23:09 +0000 |
commit | f68617405e85856cadac9266deb27323ad77c611 (patch) | |
tree | 493b6b9dd9e469bcf9aff224dd038fe0f51b619b /components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts | |
parent | adf43b13681ec31ed1faa24815499a34b7de629f (diff) | |
parent | adf475f6ad5b821f9985f6df28968c9ce68443ac (diff) |
Merge "Improve Remote Python Executor error handling and" into elalto
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts')
-rw-r--r-- | components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py index 5e20e2291..fae5855cf 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py @@ -2,4 +2,14 @@ import sys -print(sys.argv[1])
\ No newline at end of file +#Optional : import this utility class if returning payload +from cds_utils.payload_coder import send_response_data_payload + +# Do your work... using try .. except to handle errors and return False if error +print(sys.argv[1]) + +# Optional : return a JSON payload to the be published under the response-data output attribute +send_response_data_payload({"étudiant": ["Mélanie", "Joséphine"]}) + +# Always return a boolean indicating success or not.. +sys.exit(True)
\ No newline at end of file |