Enable CM for NVMe Drives

Since NVMe backplane is not CMable whereas NVMe drives are
CMable, code has been modified to loop through the list of
FRUs under an EEPROM path instead of just checking the base
FRU for CMable flag.

Test:
Trigger collectFRUVPD using busctl command for NVMe drive
and check if the parser has been re-trigerred and returns
successfully.

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I408bd3f9a68da0dd511da4dd0560cff2a36f80c6
diff --git a/vpd-manager/manager.cpp b/vpd-manager/manager.cpp
index bab9f8a..c4d9838 100644
--- a/vpd-manager/manager.cpp
+++ b/vpd-manager/manager.cpp
@@ -580,7 +580,16 @@
     const std::vector<nlohmann::json>& groupEEPROM =
         jsonFile["frus"][vpdFilePath].get_ref<const nlohmann::json::array_t&>();
 
-    const nlohmann::json& singleFru = groupEEPROM[0];
+    nlohmann::json singleFru{};
+    for (const auto& item : groupEEPROM)
+    {
+        if (item["inventoryPath"] == objPath)
+        {
+            // this is the inventory we are looking for
+            singleFru = item;
+            break;
+        }
+    }
 
     // check if the device qualifies for CM.
     if (singleFru.value("concurrentlyMaintainable", false))