Load the VLAN interfaces from the system

At start up Network Manager creates all the interfaces
by reading it from the system.This commit creates the
vlan interface after reading it from the system.

Change-Id: I38e6f3b776f834e33d17e4e88f700b4f52af4048
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 3b50d4e..30927f6 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -303,10 +303,35 @@
     {
         writeConfigurationFile();
         createIPAddressObjects();
+
     }
+
     return value;
 }
 
+void EthernetInterface::loadVLAN(VlanId id)
+{
+    std::string vlanInterfaceName = interfaceName() + "." +
+                                    std::to_string(id);
+    std::string path = objPath;
+    path += "_" + std::to_string(id);
+
+    auto vlanIntf = std::make_unique<phosphor::network::VlanInterface>(
+                        bus,
+                        path.c_str(),
+                        EthernetInterfaceIntf::dHCPEnabled(),
+                        id,
+                        *this,
+                        manager);
+
+   // Fetch the ip address from the system
+   // and create the dbus object.
+    vlanIntf->createIPAddressObjects();
+
+    this->vlanInterfaces.emplace(std::move(vlanInterfaceName),
+                                 std::move(vlanIntf));
+}
+
 void EthernetInterface::createVLAN(VlanId id)
 {
     std::string vlanInterfaceName = interfaceName() + "." +