Fix for Update LED State in case of forceRefresh

Issue: RetriggerLEDUpdate does not revert system ready and fault led
 xyz.openbmc_project.Led.Physical State to initial state in case of
   forceRefresh.

Tested:
LED State:
1. busctl call xyz.openbmc_project.LED.Controller.status_green
 /xyz/openbmc_project/led/physical/status_green
 org.freedesktop.DBus.Properties Get ss
 xyz.openbmc_project.Led.Physical State

v s "xyz.openbmc_project.Led.Physical.Action.Blink"

busctl call xyz.openbmc_project.LED.Controller.status_amber
 /xyz/openbmc_project/led/physical/status_amber
org.freedesktop.DBus.Properties Get ss
xyz.openbmc_project.Led.Physical State

v s "xyz.openbmc_project.Led.Physical.Action.Off"

2. Execute command in manufacturing mode:
          ipmitool raw 0x30 0x15 0x0f 0x00 0x00
              OR
           ipmitool raw 0x30 0x15 0x01 0x00 0x01

3.  busctl call xyz.openbmc_project.CallbackManager
   /xyz/openbmc_project/CallbackManager
   xyz.openbmc_project.CallbackManager RetriggerLEDUpdate

4. busctl call xyz.openbmc_project.LED.Controller.status_green
 /xyz/openbmc_project/led/physical/status_green
 org.freedesktop.DBus.Properties Get ss
 xyz.openbmc_project.Led.Physical State

v s "xyz.openbmc_project.Led.Physical.Action.Blink"

busctl call xyz.openbmc_project.LED.Controller.status_amber
 /xyz/openbmc_project/led/physical/status_amber
org.freedesktop.DBus.Properties Get ss
xyz.openbmc_project.Led.Physical State

v s "xyz.openbmc_project.Led.Physical.Action.Off"

Signed-off-by: sunitakx <sunitax.kumari@linux.intel.com>
Change-Id: I2f66fbddcd8fd0a9fc0825d44f8cd41c640d7882
diff --git a/callback-manager/src/callback_manager.cpp b/callback-manager/src/callback_manager.cpp
index 15e96b0..fbac190 100644
--- a/callback-manager/src/callback_manager.cpp
+++ b/callback-manager/src/callback_manager.cpp
@@ -99,7 +99,35 @@
                                              warningVector);
 
     StatusSetting last = currentPriority;
-
+    std::vector<std::pair<std::string, std::variant<bool>>> ledsToSet;
+    if (forceRefresh)
+    {
+        ledsToSet.push_back(std::make_pair(fatalLedPath, false));
+        ledsToSet.push_back(std::make_pair(criticalLedPath, false));
+        ledsToSet.push_back(std::make_pair(warningLedPath, false));
+        ledsToSet.push_back(std::make_pair(okLedPath, false));
+        for (const auto& ledPair : ledsToSet)
+        {
+            conn->async_method_call(
+                [ledPair](const boost::system::error_code ec) {
+                    if (ec)
+                    {
+                        std::cerr << "Cannot set " << ledPair.first << " to "
+                                  << std::boolalpha
+                                  << std::get<bool>(ledPair.second) << "\n";
+                    }
+                    if constexpr (debug)
+                    {
+                        std::cerr << "Set " << ledPair.first << " to "
+                                  << std::boolalpha
+                                  << std::get<bool>(ledPair.second) << "\n";
+                    }
+                },
+                ledManagerBusname, ledPair.first,
+                "org.freedesktop.DBus.Properties", "Set", ledIface,
+                ledAssertProp, ledPair.second);
+        }
+    }
     if (fatal)
     {
         currentPriority = StatusSetting::fatal;
@@ -117,8 +145,6 @@
         currentPriority = StatusSetting::ok;
     }
 
-    std::vector<std::pair<std::string, std::variant<bool>>> ledsToSet;
-
     if (last != currentPriority || forceRefresh)
     {
         switch (currentPriority)