vlan: implement delete interface
Delete the in-memory vlan object,Also
deletes the associated device file and the
network file.
Change-Id: I613e31aaa4fa9172c6226765ac044481ffbd88ec
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/vlan_interface.cpp b/vlan_interface.cpp
index f4224d4..88e3c10 100644
--- a/vlan_interface.cpp
+++ b/vlan_interface.cpp
@@ -26,14 +26,14 @@
uint32_t vlanID,
EthernetInterface& intf,
Manager& parent ) :
- VlanIntfObject(bus, objPath.c_str(), true),
+ Interfaces(bus, objPath.c_str(), true),
EthernetInterface(bus, objPath, dhcpEnabled, parent, false),
parentInterface(intf)
{
id(vlanID);
VlanIface::interfaceName(EthernetInterface::interfaceName());
- VlanIntfObject::emit_object_added();
+ Interfaces::emit_object_added();
}
void VlanInterface::writeDeviceFile()
@@ -64,5 +64,10 @@
stream.close();
}
+void VlanInterface::delete_()
+{
+ parentInterface.deleteVLANObject(EthernetInterface::interfaceName());
+}
+
}//namespace network
}//namespace phosphor