Restructure the code so that it is unit testable
Change-Id: I2af7a26d054522beae82f58769f8c2420a22eca2
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/network_manager.hpp b/network_manager.hpp
index 553951c..e8dfa8e 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -74,18 +74,31 @@
void vLAN(IntfName interfaceName, uint16_t id) override;
+ /** @brief Fetch the interface and the ipaddress details
+ * from the system and create the ethernet interraces
+ * dbus object.
+ */
+ void createInterfaces();
+
+
private:
/** @brief Get all the interfaces from the system.
* @returns list of interface names.
*/
IntfAddrMap getInterfaceAddrs() const;
+ /** @brief Persistent sdbusplus DBus bus connection. */
+ sdbusplus::bus::bus& bus;
+
/** @brief Persistent map of EthernetInterface dbus objects and their names */
std::map<IntfName, std::unique_ptr<EthernetInterface>> interfaces;
/** @brief BMC network reset - resets network configuration for BMC. */
void reset() override;
+ /** @brief Path of Object. */
+ std::string objectPath;
+
};
} // namespace network