| commit | 46f2a39857a03b6960b3a82ae786d522d38290fd | [log] [tgz] |
|---|---|---|
| author | Jagpal Singh Gill <paligill@gmail.com> | Mon Nov 04 18:02:28 2024 -0800 |
| committer | Jagpal Singh Gill <paligill@gmail.com> | Mon Nov 04 18:14:50 2024 -0800 |
| tree | 4cb324d9befe2afbc3afcbf998234dc3440484cb | |
| parent | 054954a051368f4aea567f9580084037da350fb1 [diff] |
verify the image purpose with updater type
Verify the image purpose with updater type to make sure the correct
image is targeted for a given updater type.
Tested:
```
> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T bios_image.tar https://${bmc}/redfish/v1/UpdateService/update
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}
Nov 05 01:51:54 romulus phosphor-software-manager[582]: Purpose (xyz.openbmc_project.Software.Version.VersionPurpose.Host) is not supported
Nov 05 01:51:54 romulus phosphor-software-manager[582]: An error occurred processing the image.
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",
"EndTime": "2024-11-05T01:51:54+00:00",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.3.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has completed with errors.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.3.TaskAborted",
"MessageSeverity": "Critical",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update"
},
"PercentComplete": 0,
"StartTime": "2024-11-05T01:51:25+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Exception",
"TaskStatus": "Warning"
}
```
Change-Id: I9eada7cc929a5518b44f28249a1cf8c5a55a5384
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps:
meson buildninja -C buildTo clean the repository run rm -r build.