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_main.cpp b/snmp_main.cpp
index d11ed1e..123c05e 100644
--- a/snmp_main.cpp
+++ b/snmp_main.cpp
@@ -45,5 +45,7 @@
auto manager = std::make_unique<phosphor::network::snmp::ConfManager>(
bus, OBJ_NETWORK_SNMP);
+ manager->restoreClients();
+
return sd_event_loop(eventPtr.get());
}