Convert all systemd-networkd service restarts to reloads
This removes all of the current invocations of managed service
restarting, and instead opts for targeted reloading of
configuration files.
It also happens to fix some bugs around NIC enabled setting, as the
systemd-networkd service now has up to date runtime configurations at
the time that objects are refreshed.
Change-Id: I64cd4f3fcd66eb2ad23b973eb86a71606e528e37
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/test_ethernet_interface.cpp b/test/test_ethernet_interface.cpp
index a84e0eb..a7e7302 100644
--- a/test/test_ethernet_interface.cpp
+++ b/test/test_ethernet_interface.cpp
@@ -172,7 +172,7 @@
TEST_F(TestEthernetInterface, addStaticNameServers)
{
ServerList servers = {"9.1.1.1", "9.2.2.2", "9.3.3.3"};
- EXPECT_CALL(manager, restartSystemdUnit(networkdService)).Times(1);
+ EXPECT_CALL(manager, reloadConfigs());
interface.staticNameServers(servers);
fs::path filePath = confDir;
filePath /= "00-bmc-test0.network";
@@ -201,7 +201,7 @@
TEST_F(TestEthernetInterface, addNTPServers)
{
ServerList servers = {"10.1.1.1", "10.2.2.2", "10.3.3.3"};
- EXPECT_CALL(manager, restartSystemdUnit(networkdService)).Times(1);
+ EXPECT_CALL(manager, reloadConfigs());
interface.ntpServers(servers);
fs::path filePath = confDir;
filePath /= "00-bmc-test0.network";