summaryrefslogtreecommitdiff
path: root/redfish-core/lib/update_service.hpp
diff options
context:
space:
mode:
authorGeorge Liu <liuxiwei@inspur.com>2021-01-02 06:37:41 +0300
committerEd Tanous <ed@tanous.net>2021-01-04 22:04:33 +0300
commit6868ff503529feceba217da7a223b0dfd83628b8 (patch)
tree37e6212484be1cb0f21b4076ffec29f37b932bcc /redfish-core/lib/update_service.hpp
parent1149cbfeb4275bbb145e82261c46004b2bdfc562 (diff)
downloadbmcweb-6868ff503529feceba217da7a223b0dfd83628b8.tar.xz
Implement PercentComplete for code update
In order to implement full task support for code update, the PercentComplete property is added to the task service. Testd: Validator passes. curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/TaskService/Tasks/0 { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", ... ... "PercentComplete": 100, "TaskMonitor": "/redfish/v1/TaskService/Tasks/0/Monitor", "TaskState": "Completed", "TaskStatus": "OK" } Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I030bf0bbff098dec2f45158642f149711554285d
Diffstat (limited to 'redfish-core/lib/update_service.hpp')
-rw-r--r--redfish-core/lib/update_service.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 87933fa2d6..9e382ce396 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -215,6 +215,8 @@ static void softwareInterfaceAdded(const std::shared_ptr<AsyncResp>& asyncResp,
messages::internalError());
return task::completed;
}
+ taskData->percentComplete =
+ static_cast<int>(*progress);
taskData->messages.emplace_back(
messages::taskProgressChanged(
index, static_cast<size_t>(