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/pfr_mgr.cpp b/service/src/pfr_mgr.cpp
index 479cf5f..5245075 100644
--- a/service/src/pfr_mgr.cpp
+++ b/service/src/pfr_mgr.cpp
@@ -61,7 +61,7 @@
 
     if ((imgType == ImageType::bmcActive) ||
         (imgType == ImageType::biosActive) ||
-        (imgType == ImageType::cpldActive))
+        (imgType == ImageType::cpldActive) || (imgType == ImageType::afmActive))
     {
         // Running images so set Activations to "Active"
         activation =
@@ -75,7 +75,8 @@
         // BIOS version is read from SMBIOS. Since it provides more
         // version information, Lets expose those as functional.
         // Down the line, Redundant inventory objects need to be addressed.
-        if (imgType == ImageType::cpldActive)
+        if ((imgType == ImageType::cpldActive) ||
+            (imgType == ImageType::afmActive))
         {
             associations.emplace("functional", "software_version", objPath);
         }