Process FRU only when present with specific CCIN

Some FRUs are only supported  with specific CCINs in case of PowerVS
configuration.
The commit implements changes to check for presence of the FRU based on
its Present property, if found checks for specific CCIN, if found
updates the PN else skips.

Change-Id: I1f3ff08f82788aed4d8153474cd38352e5cc2394
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/include/utility/dbus_utility.hpp b/vpd-manager/include/utility/dbus_utility.hpp
index 344a637..39a4bf3 100644
--- a/vpd-manager/include/utility/dbus_utility.hpp
+++ b/vpd-manager/include/utility/dbus_utility.hpp
@@ -685,5 +685,31 @@
         return std::string{};
     }
 }
+
+/**
+ * @brief API to read DBus present property for the given inventory.
+ *
+ * @param[in] i_invObjPath - Inventory path.
+ * @return Present property value, false in case of any error.
+ */
+inline bool isInventoryPresent(const std::string& i_invObjPath)
+{
+    if (i_invObjPath.empty())
+    {
+        return false;
+    }
+
+    const auto& l_retValue =
+        dbusUtility::readDbusProperty(constants::pimServiceName, i_invObjPath,
+                                      constants::inventoryItemInf, "Present");
+
+    auto l_ptrPresence = std::get_if<bool>(&l_retValue);
+    if (!l_ptrPresence)
+    {
+        return false;
+    }
+
+    return (*l_ptrPresence);
+}
 } // namespace dbusUtility
 } // namespace vpd