diff options
author | Albert Zhang <zhanghaodi@inspur.com> | 2021-01-20 11:39:12 +0300 |
---|---|---|
committer | George Liu <liuxiwei@inspur.com> | 2021-01-25 03:48:06 +0300 |
commit | d7a596bd7e449cdbfb92e961cc7049f80775e61f (patch) | |
tree | 33d49b6b85844bbb48735a2392c4761562e3fc4b /redfish-core/lib/update_service.hpp | |
parent | a90daf182891521fcc7c3e99ba266e6a55d4b4dd (diff) | |
download | bmcweb-d7a596bd7e449cdbfb92e961cc7049f80775e61f.tar.xz |
Tasks for TFTP upload
This is to change the existing TFTP update into an asynchronous service
that uses Redfish Tasks.
Tested:
TFTP Firmware update through redfish,and get the task to create.
curl -k -H "X-Auth-Token: $token" -X POST
https://${bmc}/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate
-d '{"TransferProtocol":"TFTP","ImageURI":"xx.xx.xx.xx/obmc-phosphor-xxxxx"}'
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}
Signed-off-by: Albert Zhang <zhanghaodi@inspur.com>
Change-Id: I5d8683f38bf3e29177d90606c5c9fe747a26a876
Diffstat (limited to 'redfish-core/lib/update_service.hpp')
-rw-r--r-- | redfish-core/lib/update_service.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp index 9e382ce396..6d4417166f 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -478,7 +478,7 @@ class UpdateServiceActionsSimpleUpdate : public Node // Setup callback for when new software detected // Give TFTP 10 minutes to complete monitorForSoftwareAvailable( - nullptr, req, + asyncResp, req, "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate", 600); |