Delete FRU VPD if FRU is not present
GPIO event handling continuously monitors the presence of the FRU. If it
detects any change, performs deletion of FRU VPD if FRU is not present,
otherwise performs VPD collection if FRU gets added.
This commit adds code to perform deletion of FRU VPD over DBus if FRU
is not present during GPIO event handling.
Change-Id: I80f31c9a6703d22f70901e885ab7074287cb8d9e
Signed-off-by: RekhaAparna01 <vrekhaaparna@ibm.com>
diff --git a/vpd-manager/src/gpio_monitor.cpp b/vpd-manager/src/gpio_monitor.cpp
index 521037c..2391ad6 100644
--- a/vpd-manager/src/gpio_monitor.cpp
+++ b/vpd-manager/src/gpio_monitor.cpp
@@ -42,7 +42,8 @@
}
else
{
- // TODO -- Add implementation to Delete FRU if FRU is not present.
+ m_worker->deleteFruVpd(jsonUtility::getInventoryObjPathFromJson(
+ m_worker->getSysCfgJsonObj(), m_fruPath));
}
}
catch (std::exception& l_ex)