Add version support for AFM
This change adds AFM version support under FirmwareInventory.
Tested: D-Bus version objects are created and also it's shown
up under FirmwareInventory.
root@intel-obmc:/tmp# busctl tree xyz.openbmc_project.PFR.Manager
└─/xyz
└─/xyz/openbmc_project
├─/xyz/openbmc_project/pfr
└─/xyz/openbmc_project/software
├─/xyz/openbmc_project/software/afm_active
├─/xyz/openbmc_project/software/afm_recovery
├─/xyz/openbmc_project/software/bios_recovery
├─/xyz/openbmc_project/software/bmc_recovery
└─/xyz/openbmc_project/software/cpld_recovery
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/afm_active",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Other image",
"Id": "afm_active",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": ""
}
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@linux.intel.com>
Change-Id: I4233803354d686a736a2614e9f205b294d39f8d6
diff --git a/service/src/mainapp.cpp b/service/src/mainapp.cpp
index ba714fe..dfbf582 100644
--- a/service/src/mainapp.cpp
+++ b/service/src/mainapp.cpp
@@ -51,6 +51,10 @@
versionPurposeHost),
std::make_tuple("cpld_recovery", ImageType::cpldRecovery,
versionPurposeOther),
+ std::make_tuple("afm_active", ImageType::afmActive,
+ versionPurposeOther),
+ std::make_tuple("afm_recovery", ImageType::afmRecovery,
+ versionPurposeOther),
};
// Recovery reason map.