DBus calls to update VPD cache data for Interfaces
This commit implements required bus call to update vpd cache
once the data has been updated on the hardware.
It updates data for Common interface,Extra interface and COM
interface.
To test on simics use following procedure
- Hexdump the vpd file of EEPROM you want
to update in a .txt file.
- To update data of keyword for any record
make "busctl call" to WriteKeyword.
-After successful execution, agaim hexdump
VPD file of same EEPROM in another .txt
file.
-Difference can be observed in both the
file w.r.t. updated data and ECC.
once complete call has been made, updated
data in cache can be seen using following command
on simics.
- busctl intrsopect <service> <object_path>
- busctl introspect <service> <object_path>
<interface_name>
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I7997a027b631de25e254be9811c1926902fda8ec
diff --git a/vpd-manager/editor_impl.hpp b/vpd-manager/editor_impl.hpp
index ff94692..8e113b1 100644
--- a/vpd-manager/editor_impl.hpp
+++ b/vpd-manager/editor_impl.hpp
@@ -122,6 +122,18 @@
void processAndUpdateEI(const nlohmann::json& Inventory,
const inventory::Path& objPath);
+ /** @brief method to make busctl call
+ *
+ * @param[in] object - bus object path
+ * @param[in] interface - bus interface
+ * @param[in] property - property to update on BUS
+ * @param[in] data - data to be updayed on Bus
+ *
+ */
+ template <typename T>
+ void makeDbusCall(const std::string& object, const std::string& interface,
+ const std::string& property, const std::variant<T>& data);
+
// path to the VPD file to edit
const inventory::Path& vpdFilePath;