bmcweb: tolerate missing deprecated Software Purpose
The xyz.openbmc_project.Software.Version interface marks the Purpose
property as deprecated in favor of Compatible strings and inventory
associations, so a conforming object may publish only Version. The
FirmwareInventory handler treated a missing Purpose as an internal
error and returned HTTP 500 for every such object. Added this patch\
to skip the optional Description and RelatedItem links rather
than failing the resource. Objects that publish Purpose keep their
existing output.
Tested: Build an image for nvl32-obmc machine with the following
patches cherry-picked:
1. Align with upstream u-boot dts tree:
https://gerrit.openbmc.org/c/openbmc/openbmc/+/89932
2. mctpd configuration:
https://gerrit.openbmc.org/c/openbmc/openbmc/+/87390
3. Enable nvidia-gpu sensor:
https://gerrit.openbmc.org/c/openbmc/openbmc/+/89933
4. dbus-sensors expose GPU inventory interfaces:
https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/88990
$ curl -sk https://{BMC_IP}/redfish/v1/UpdateService/\
FirmwareInventory/Nvidia_GPU_10_Firmware
{
"@odata.id":
"/redfish/v1/UpdateService/FirmwareInventory/\
Nvidia_GPU_10_Firmware",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Id": "Nvidia_GPU_10_Firmware",
"Name": "Software Inventory",
"Status": {
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "98.02.AF.00.01"
}
Depends-On: Id0c09f4ced40dbe505ca7cbd99f6de0e847afe3b
Change-Id: I2a9562e461ffd39fcbdc176413a1bf2cb6fdbc22
Signed-off-by: JY Voon <jvoon@nvidia.com> J
JY Voon committed
1a972a358c0b5b7affd46ad9db683d40511a293c
Parent: d1c098f