diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-05-08 03:29:18 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2019-05-08 03:29:18 +0000 |
commit | d80634ce2a300cd3256b789e9e0bb8df82db2b41 (patch) | |
tree | f44183baf93a830061e0a29c3e35ae75671acccd /share/starlingx_base | |
parent | faaca046de09ac2ca87824cde8e1100877e798dc (diff) |
Fix error http code
Change-Id: I5a77f92d8cc8a49fd027933bee3c2eedfe89caed
Issue-ID: MULTICLOUD-611
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'share/starlingx_base')
-rw-r--r-- | share/starlingx_base/resource/infra_workload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/share/starlingx_base/resource/infra_workload.py b/share/starlingx_base/resource/infra_workload.py index af5f5531..48990d28 100644 --- a/share/starlingx_base/resource/infra_workload.py +++ b/share/starlingx_base/resource/infra_workload.py @@ -125,7 +125,7 @@ class InfraWorkload(newton_infra_workload.InfraWorkload): else: progress = backlog_item.get( "status", - (13, "DELETE_FAILED", + (13, "UPDATE_FAILED", "Unexpected:status not found in backlog item") ) @@ -136,9 +136,10 @@ class InfraWorkload(newton_infra_workload.InfraWorkload): resp_template["workload_status"] = progress_status resp_template["workload_status_reason"] = progress_msg - status_code = status.HTTP_200_ACCEPTED\ + status_code = status.HTTP_202_ACCEPTED\ if progress_code == 0 else progress_code except Exception as e: + self._logger.warn("Exception: %s" % e.message) resp_template["workload_status_reason"] = progress return Response(data=resp_template, status=status_code) @@ -332,7 +333,7 @@ class InfraWorkload(newton_infra_workload.InfraWorkload): resp_template["workload_status"] = progress_status resp_template["workload_status_reason"] = progress_msg - status_code = status.HTTP_200_ACCEPTED \ + status_code = status.HTTP_202_ACCEPTED \ if progress_code == 0 else progress_code except Exception as e: resp_template["workload_status_reason"] = progress |