Pass the network conf dir to network manager constructor

when the network manager comes up,it should have its
conf dir path which caller wants,instead of calling one
more function to set the desired conf dir.

Change-Id: I282c1d5e1c6edb2b6e77d16518d2204a6ac41a45
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/network_manager.cpp b/network_manager.cpp
index bce6731..cdbaf45 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -27,17 +27,30 @@
 using namespace phosphor::logging;
 using namespace sdbusplus::xyz::openbmc_project::Common::Error;
 
-Manager::Manager(sdbusplus::bus::bus& bus, const char* objPath):
+Manager::Manager(sdbusplus::bus::bus& bus, const char* objPath,
+                 const std::string& path):
     details::VLANCreateIface(bus, objPath, true),
     bus(bus),
     objectPath(objPath)
 {
-    confDir = NETWORK_CONF_DIR;
+    fs::path confDir(path);
+    setConfDir(confDir);
 }
 
 void Manager::setConfDir(const fs::path& dir)
 {
     confDir = dir;
+
+    if (!fs::exists(confDir))
+    {
+        if (!fs::create_directories(confDir))
+        {
+            log<level::ERR>("Unable to create the network conf dir",
+                            entry("DIR=%s", confDir.c_str()));
+            elog<InternalFailure>();
+        }
+    }
+
 }
 
 void Manager::createInterfaces()