summaryrefslogtreecommitdiffstats
path: root/vlan_interface.cpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-07-25 18:29:57 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-08-13 11:32:44 +0000
commitbc8862927b05030b249175891dc338d044eb17dd (patch)
treedbc2289ff0c31d98f210565042206a2529f1f688 /vlan_interface.cpp
parent92bc2fe4663b8a9e2a38084692dc9587762926f9 (diff)
downloadphosphor-networkd-bc8862927b05030b249175891dc338d044eb17dd.tar.gz
phosphor-networkd-bc8862927b05030b249175891dc338d044eb17dd.zip
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>
Diffstat (limited to 'vlan_interface.cpp')
-rw-r--r--vlan_interface.cpp9
1 files changed, 7 insertions, 2 deletions
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 @@ VlanInterface::VlanInterface(sdbusplus::bus::bus& bus,
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 @@ void VlanInterface::writeDeviceFile()
stream.close();
}
+void VlanInterface::delete_()
+{
+ parentInterface.deleteVLANObject(EthernetInterface::interfaceName());
+}
+
}//namespace network
}//namespace phosphor
OpenPOWER on IntegriCloud