diff options
author | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2020-01-23 12:39:50 -0500 |
---|---|---|
committer | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2020-01-23 13:00:15 -0500 |
commit | 87b00f3a63482fe21ab468541d6f89b8348422a0 (patch) | |
tree | 4d39b4470f3a66f3f6d005231db4a16cd498f5aa /ms/command-executor/src | |
parent | 7d6baeb4b4a0f49ef05ef2744cd96130afbd9f83 (diff) |
cmd-exec 0-return is success; env.prep.fix.
Issue-ID: CCSDK-1855
This is cherry-pick of https://gerrit.onap.org/r/c/ccsdk/cds/+/98609
rev2. pasted wrong file, modified back...
rev3. added catch-all.
Change-Id: I30eccc3b18b428970bfa873b9f0ce359a1f5e97d
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
Diffstat (limited to 'ms/command-executor/src')
-rw-r--r-- | ms/command-executor/src/main/python/command_executor_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ms/command-executor/src/main/python/command_executor_server.py b/ms/command-executor/src/main/python/command_executor_server.py index 577c8a0ca..9f6fb8fa3 100644 --- a/ms/command-executor/src/main/python/command_executor_server.py +++ b/ms/command-executor/src/main/python/command_executor_server.py @@ -53,12 +53,12 @@ class CommandExecutorServer(CommandExecutor_pb2_grpc.CommandExecutorServiceServi payload_result = {} handler = CommandExecutorHandler(request) payload_result = handler.execute_command(request, log_results) - if not payload_result["cds_return_code"]: + if payload_result["cds_return_code"] != 0: self.logger.info("{} - Failed to executeCommand. {}".format(blueprint_id, log_results)) else: self.logger.info("{} - Execution finished successfully.".format(blueprint_id)) - ret = utils.build_response(request, log_results, payload_result, payload_result["cds_return_code"]) + ret = utils.build_response(request, log_results, payload_result, payload_result["cds_return_code"] == 0) self.logger.info("Payload returned %s" % payload_result) - return ret
\ No newline at end of file + return ret |