host_bios_upgrade: Add Updateable Association
Let BIOS Object make updateable association, so that
Redfish would show "Updateable": true just like other
Testing:
curl https://*/UpdateService/FirmwareInventory/bios_active
{
"@odata.id": "/*/UpdateService/FirmwareInventory/bios_active",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Host image",
"Id": "bios_active",
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/system/Bios"
}
],
"RelatedItem@odata.count": 1,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "null"
}
Change-Id: I22614f7e5bf55764c785ad6c085162c5a3a45cc2
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index 9cb9467..9bbd6c8 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -859,6 +859,7 @@
createActiveAssociation(path);
createFunctionalAssociation(path);
+ createUpdateableAssociation(path);
auto versionId = path.substr(pos + 1);
auto version = "null";