Move the implementation for writing conf to interface class

implementation of writing interface conf to the
ethernet interface class.

Change-Id: I279afff45a82ca92c4e50810664f7a7c69a66a61
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/network_manager.hpp b/network_manager.hpp
index df98104..4849faf 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -20,6 +20,9 @@
 namespace network
 {
 
+using SystemConfPtr = std::unique_ptr<SystemConfiguration>;
+using DHCPConfPtr = std::unique_ptr<dhcp::Configuration>;
+
 namespace fs = std::experimental::filesystem;
 namespace details
 {
@@ -81,16 +84,23 @@
          */
         fs::path getConfDir() { return confDir; }
 
-    private:
+        /** @brief gets the system conf object.
+         *
+         */
+        const SystemConfPtr& getSystemConf() { return systemConf; }
 
-        /** @brief write the dhcp section **/
-        void writeDHCPSection(std::fstream& stream);
+        /** @brief gets the dhcp conf object.
+         *
+         */
+        const DHCPConfPtr& getDHCPConf() { return dhcpConf; }
+
+    private:
 
         /** @brief Persistent sdbusplus DBus bus connection. */
         sdbusplus::bus::bus& bus;
 
         /** @brief Persistent map of EthernetInterface dbus objects and their names */
-        std::map<IntfName, std::unique_ptr<EthernetInterface>> interfaces;
+        std::map<IntfName, std::shared_ptr<EthernetInterface>> interfaces;
 
         /** @brief BMC network reset - resets network configuration for BMC. */
         void reset() override;
@@ -104,10 +114,10 @@
         std::string objectPath;
 
         /** @brief pointer to system conf object. */
-        std::unique_ptr<SystemConfiguration> systemConf = nullptr;
+        SystemConfPtr systemConf = nullptr;
 
         /** @brief pointer to dhcp conf object. */
-        std::unique_ptr<dhcp::Configuration> dhcpConf = nullptr;
+        DHCPConfPtr dhcpConf = nullptr;
 
         /** @brief Network Configuration directory. */
         fs::path confDir;