Persist the snmp manager configuration
This commit persist the manager configuration D-Bus objects
and restores it once service starts.
This commit also deletes the associated persistent file whenever
snmp client D-Bus object gets deleted.
Change-Id: I1526b52870ee5dfea30e6527bad3fd12d1191a13
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/snmp_client.hpp b/snmp_client.hpp
index 5b27f1b..fbc76fb 100644
--- a/snmp_client.hpp
+++ b/snmp_client.hpp
@@ -46,6 +46,16 @@
Client(sdbusplus::bus::bus &bus, const char *objPath, ConfManager &parent,
const std::string &address, uint16_t port);
+ /** @brief Constructor to put object onto bus at a dbus path.
+ * @param[in] bus - Bus to attach to.
+ * @param[in] objPath - Path to attach at.
+ * @param[in] parent - Parent D-bus Object.
+ */
+ Client(sdbusplus::bus::bus &bus, const char *objPath, ConfManager &parent) :
+ Ifaces(bus, objPath, true), parent(parent)
+ {
+ }
+
/** @brief Delete this d-bus object.
*/
void delete_() override;