vlan:Remove the multiple implementation of sdbusplus object

This commit removes the multiple implementation of sdbus server
object from vlan_interface class,Due to this mapper doesn't recieve
the interface remove signal which leads to showing the dbus object
which is not there.
This commit also fixes the order of claiming the bus name.

Resolves openbmc/openbmc#2150
Resolves openbmc/openbmc#2152
Resolves openbmc/openbmc#2185

Change-Id: I00b0e9d70abbe1073d20fb0d0e2d8a9ef0300c31
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index 47d38a5..461ddd6 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -9,12 +9,12 @@
 
     // Add sdbusplus Object Manager for the 'root' path of the network manager.
     sdbusplus::server::manager::manager objManager(bus, OBJ_NETWORK);
+    bus.request_name(BUSNAME_NETWORK);
 
     phosphor::network::Manager manager(bus, OBJ_NETWORK, NETWORK_CONF_DIR);
 
     manager.createChildObjects();
 
-    bus.request_name(BUSNAME_NETWORK);
 
     while(true)
     {
diff --git a/vlan_interface.cpp b/vlan_interface.cpp
index acf66db..8684a73 100644
--- a/vlan_interface.cpp
+++ b/vlan_interface.cpp
@@ -26,7 +26,8 @@
                              uint32_t vlanID,
                              EthernetInterface& intf,
                              Manager& parent ) :
-        Interfaces(bus, objPath.c_str(), true),
+        VlanIface(bus,objPath.c_str()),
+        DeleteIface(bus,objPath.c_str()),
         EthernetInterface(bus, objPath, dhcpEnabled, parent, false),
         parentInterface(intf)
 {
@@ -34,7 +35,7 @@
     VlanIface::interfaceName(EthernetInterface::interfaceName());
     mACAddress(parentInterface.mACAddress());
 
-    Interfaces::emit_object_added();
+    emit_object_added();
 }
 
 void VlanInterface::writeDeviceFile()
diff --git a/vlan_interface.hpp b/vlan_interface.hpp
index 3a06614..d9ea078 100644
--- a/vlan_interface.hpp
+++ b/vlan_interface.hpp
@@ -22,14 +22,14 @@
 
 using DeleteIface = sdbusplus::xyz::openbmc_project::Object::server::Delete;
 using VlanIface = sdbusplus::xyz::openbmc_project::Network::server::VLAN;
-using Interfaces =
-        sdbusplus::server::object::object<DeleteIface, VlanIface>;
 
 /** @class VlanInterface
  *  @brief OpenBMC vlan Interface implementation.
  *  @details A concrete implementation for the vlan interface
  */
-class VlanInterface : public Interfaces, public EthernetInterface
+class VlanInterface : public VlanIface,
+                      public DeleteIface,
+                      public EthernetInterface
 {
     public:
         VlanInterface() = delete;