PEL: Restore Resolution property for existing PELs
The Resolution D-Bus property is filled in with PEL callouts, but this
wasn't being done on startup for existing PELs. This commit adds that
functionality.
With 2500 PELs this takes a second or less.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0d8f381d8f1db8e49cf6d46b5b88ee35c242a509
diff --git a/extensions/openpower-pels/manager.hpp b/extensions/openpower-pels/manager.hpp
index 8d0079d..bfe01a1 100644
--- a/extensions/openpower-pels/manager.hpp
+++ b/extensions/openpower-pels/manager.hpp
@@ -63,6 +63,10 @@
// Create PELEntry interface and setup properties with their values
createPELEntry(entry.first, true);
}
+
+ _repo.for_each(
+ std::bind(&Manager::updateResolution, this, std::placeholders::_1));
+
setupPELDeleteWatch();
}
@@ -409,8 +413,10 @@
* Update the resolution property of D-bus with callouts extracted from PEL
*
* @param[in] pel - The PEL to use
+ *
+ * @return bool - false for Repositor::for_each().
*/
- void updateResolution(std::unique_ptr<openpower::pels::PEL>& pel);
+ bool updateResolution(const openpower::pels::PEL& pel);
/**
* @brief Create PELEntry Interface with supported properties