Power restore policy to support multi-host platform.

Enable the power restore policy for the multi-host platform,
change the policy to one of the states as the last Power State,
always ON, and always OFF with default as the last power State.

Tested: Tested and verified with yosemitev2 multi-host platform.

Signed-off-by: Karthikeyan Pasupathi <pkarthikeyan1509@gmail.com>
Change-Id: I222ddaed8e47a9c386943444943e6eda7e3b0252
diff --git a/src/power_control.cpp b/src/power_control.cpp
index 514806a..f93a1fc 100644
--- a/src/power_control.cpp
+++ b/src/power_control.cpp
@@ -858,8 +858,6 @@
 }
 
 static constexpr char const* setingsService = "xyz.openbmc_project.Settings";
-static constexpr char const* powerRestorePolicyObject =
-    "/xyz/openbmc_project/control/host0/power_restore_policy";
 static constexpr char const* powerRestorePolicyIface =
     "xyz.openbmc_project.Control.Power.RestorePolicy";
 #ifdef USE_ACBOOT
@@ -915,6 +913,8 @@
 
 void PowerRestoreController::run()
 {
+    std::string powerRestorePolicyObject =
+        "/xyz/openbmc_project/control/host" + node + "/power_restore_policy";
     powerRestorePolicyLog();
     // this list only needs to be created once
     if (matches.empty())