Set Presence as False for all the FRUs
While priming the inventory all the frus (except the System), presence state should be false
It will be set as true when vpd collection done for that fru.
Test-
By code I could change the value of Present
root@rain148bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/pcie_cable_card8|more
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
xyz.openbmc_project.Inventory.Item interface - - -
.Present property b true emits-change writable
.PrettyName property s "DBG_TESTING" emits-change writable
root@rain148bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/pcie_cable_card8
xyz.openbmc_project.Inventory.Item interface - - -
.Present property b false
root@rain147bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/pcie_cable_card8
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
xyz.openbmc_project.Inventory.Item interface - - -
.Present property b false emits-change writable
root@rain147bmc:/tmp# busctl introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/lcd_op_panel_hill
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
xyz.openbmc_project.Inventory.Item interface - - -
.Present property b false emits-change writable
Change-Id: I8f60c453761cd5d524b5f47aaf0228f72560d6a7
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index f723613..d865ba5 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -473,6 +473,11 @@
if (!isSystemVpd && !itemEEPROM.value("noprime", false))
{
+ inventory::PropertyMap presProp;
+ presProp.emplace("Present", false);
+ interfaces.emplace("xyz.openbmc_project.Inventory.Item",
+ move(presProp));
+
if (itemEEPROM.find("extraInterfaces") != itemEEPROM.end())
{
for (const auto& eI : itemEEPROM["extraInterfaces"].items())