SoftwareInventory: Implement Bios Related Item
Was a TODO here with the code commented out.
Bios was implemented here:
https://github.com/openbmc/bmcweb/commit/d82a3acd1abc04a13f90cef5234416c3e18da0e1
Tested: Ran validator
curl -k https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/9f75c5ad",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Host image",
"Id": "9f75c5ad",
"Members@odata.count": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/system/Bios"
}
],
Change-Id: Ifa6148731582cdc7f177e38b19f02fea966738fc
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 00e166e..a47aca2 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -604,12 +604,10 @@
}
else if (purpose == fw_util::biosPurpose)
{
- // TODO(geissonator) Need BIOS schema support added for this
- // to be valid
- // nlohmann::json &members = aResp->res.jsonValue["RelatedItem"];
- // members.push_back(
- // {{"@odata.id", "/redfish/v1/Systems/system/BIOS"}});
- // aResp->res.jsonValue["Members@odata.count"] = members.size();
+ nlohmann::json &members = aResp->res.jsonValue["RelatedItem"];
+ members.push_back(
+ {{"@odata.id", "/redfish/v1/Systems/system/Bios"}});
+ aResp->res.jsonValue["Members@odata.count"] = members.size();
}
else
{