Apply settings after resetting.

During the reset method call the service overwrites all the config
files, but does not apply these changes.

This commit adds the force restart network after the config files were
overwritten.

Tested:
```
busctl call xyz.openbmc_project.Network /xyz/openbmc_project/network \
            xyz.openbmc_project.Common.FactoryReset Reset
```
now leads to the `systemd-networkd.service` restarting and following
refreshing the objects inside the service.

Change-Id: Ifcc6c7194f2928ece766d87f63243fc3ab99c429
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index 751d1a1..9ae9c5b 100644
--- a/src/network_manager.cpp
+++ b/src/network_manager.cpp
@@ -99,6 +99,15 @@
     {
         log<level::ERR>("Unable to create the default network file");
     }
+
+    if (isCreated)
+    {
+        // if files created restart the network.
+        // don't need to call the create child objects as eventhandler
+        // will create it.
+        restartSystemdUnit(phosphor::network::networkdService);
+    }
+
     return isCreated;
 }
 
diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp
index b0d6d2e..983616f 100644
--- a/src/network_manager_main.cpp
+++ b/src/network_manager_main.cpp
@@ -249,7 +249,7 @@
 {
     if (manager)
     {
-        manager->restartSystemdUnit("systemd-networkd.service");
+        manager->restartSystemdUnit(phosphor::network::networkdService);
     }
 }
 
@@ -309,14 +309,7 @@
     // is not there for any interface.
     // Parameter false means don't create the network
     // files forcefully.
-    if (phosphor::network::manager->createDefaultNetworkFiles(false))
-    {
-        // if files created restart the network.
-        // don't need to call the create child objects as eventhandler
-        // will create it.
-        phosphor::network::restartNetwork();
-    }
-    else
+    if (!phosphor::network::manager->createDefaultNetworkFiles(false))
     {
         // this will add the additional fixes which is needed
         // in the existing network file.