summaryrefslogtreecommitdiffstats
path: root/ethernet_interface.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-09-22 17:15:37 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-10-11 18:17:10 +0530
commite9c9b81c8c01e15306dad27a3281b582e775c44a (patch)
tree058292a2fb06c8070753dd34575e54993881262a /ethernet_interface.hpp
parentb610caf66122dfc7293e2b11192f98eea731e5db (diff)
downloadphosphor-networkd-e9c9b81c8c01e15306dad27a3281b582e775c44a.tar.gz
phosphor-networkd-e9c9b81c8c01e15306dad27a3281b582e775c44a.zip
Implement delete all interface.
deletes all the ipaddress object on the interface. Resolves openbmc/openbmc#2141 Change-Id: I6f045758ff29080cb4a4dec9e8b0d23d932c55b6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'ethernet_interface.hpp')
-rw-r--r--ethernet_interface.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
index 3a746d2..06a2e5f 100644
--- a/ethernet_interface.hpp
+++ b/ethernet_interface.hpp
@@ -6,6 +6,7 @@
#include "xyz/openbmc_project/Network/EthernetInterface/server.hpp"
#include "xyz/openbmc_project/Network/MACAddress/server.hpp"
#include "xyz/openbmc_project/Network/IP/Create/server.hpp"
+#include "xyz/openbmc_project/Collection/DeleteAll/server.hpp"
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
@@ -21,7 +22,8 @@ using Ifaces =
sdbusplus::server::object::object<
sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface,
sdbusplus::xyz::openbmc_project::Network::server::MACAddress,
- sdbusplus::xyz::openbmc_project::Network::IP::server::Create>;
+ sdbusplus::xyz::openbmc_project::Network::IP::server::Create,
+ sdbusplus::xyz::openbmc_project::Collection::server::DeleteAll>;
using IP = sdbusplus::xyz::openbmc_project::Network::server::IP;
@@ -136,18 +138,25 @@ class EthernetInterface : public Ifaces
*/
void writeConfigurationFile();
+ /** @brief delete all dbus objects.
+ */
+ void deleteAll();
+
using EthernetInterfaceIntf::dHCPEnabled;
using EthernetInterfaceIntf::interfaceName;
using MacAddressIntf::mACAddress;
protected:
-
/** @brief get the info of the ethernet interface.
* @return tuple having the link speed,autonegotiation,duplexmode .
*/
-
InterfaceInfo getInterfaceInfo() const;
+ /* @brief delete the vlan interface from system.
+ * @param[in] interface - vlan Interface.
+ */
+ void deleteVLANFromSystem(const std::string& interface);
+
/** @brief get the mac address of the interface.
* @param[in] interfaceName - Network interface name.
* @return macaddress on success
OpenPOWER on IntegriCloud