Remove setting Functional property of OperationalStatus interface

Current approach was doing this:
  - Get the associated Inventory D-Bus object for the LED group D-Bus
    object
  - Set Functional property of State.Decorator.OperationalStatus
    interface on the Inventory D-Bus object.

 However, this approach would enforce the LED associations to be there
 in order to set the Operational Status. There is a change in direction
 now. With the new direction, LED Manager would :
     - Watch for PropertyChanged signal from Inventory.Manager on the
      xyz.openbmc_project.State.Decorator.OperationalStatus interface
    - Look for the associated LED Group D-Bus object
    - Set the asserted property mapping to Functional value.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Iee25acbba8262057a5b4e4f0d93c0b6629c8eb4b
diff --git a/group.cpp b/group.cpp
index a52bd90..33c64f6 100644
--- a/group.cpp
+++ b/group.cpp
@@ -39,11 +39,6 @@
     // Store asserted state
     serialize.storeGroups(path, result);
 
-    // Set OperationalStatus according to the status of asserted property.
-    // If the group is asserted, then the functional status is false and
-    // vice-versa.
-    manager.setOperationalStatus(path, !value);
-
     // If something does not go right here, then there should be an sdbusplus
     // exception thrown.
     manager.driveLEDs(ledsAssert, ledsDeAssert);
diff --git a/manager.cpp b/manager.cpp
index eccbc36..6f286df 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -200,57 +200,5 @@
     }
 }
 
-// Set OperationalStatus functional according to the asserted state of the group
-void Manager::setOperationalStatus(const std::string& path, bool value) const
-{
-    using namespace phosphor::logging;
-
-    // Get endpoints from the rType
-    std::string fru = path + "/fru_fault";
-
-    // endpoint contains the vector of strings, where each string is a Inventory
-    // D-Bus object that this, associated with this LED Group D-Bus object
-    // pointed to by fru_fault
-    PropertyValue endpoint{};
-
-    try
-    {
-        endpoint = dBusHandler.getProperty(
-            fru, "xyz.openbmc_project.Association", "endpoints");
-    }
-    catch (const sdbusplus::exception::SdBusError& e)
-    {
-        log<level::ERR>("Failed to get endpoints property",
-                        entry("ERROR=%s", e.what()),
-                        entry("PATH=%s", fru.c_str()));
-        return;
-    }
-
-    auto& endpoints = std::get<std::vector<std::string>>(endpoint);
-    if (endpoints.empty())
-    {
-        return;
-    }
-
-    for (const auto& fruInstancePath : endpoints)
-    {
-        // Set OperationalStatus by fru instance path
-        try
-        {
-            PropertyValue functionalValue{value};
-            dBusHandler.setProperty(
-                fruInstancePath,
-                "xyz.openbmc_project.State.Decorator.OperationalStatus",
-                "Functional", functionalValue);
-        }
-        catch (const sdbusplus::exception::SdBusError& e)
-        {
-            log<level::ERR>("Failed to set Functional property",
-                            entry("ERROR=%s", e.what()),
-                            entry("PATH=%s", fruInstancePath.c_str()));
-        }
-    }
-}
-
 } // namespace led
 } // namespace phosphor
diff --git a/manager.hpp b/manager.hpp
index 6e6ef48..20f8aaa 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -108,16 +108,6 @@
      */
     void driveLEDs(group& ledsAssert, group& ledsDeAssert);
 
-    /** @brief Set OperationalStatus according to the status of asserted
-     *         property
-     *
-     *  @param[in]  path          -  D-Bus path of group
-     *  @param[in]  value         -  Could be true or false
-     *
-     *  @return: None
-     */
-    void setOperationalStatus(const std::string& path, bool value) const;
-
     /** @brief Chooses appropriate action to be triggered on physical LED
      *  and calls into function that applies the actual action.
      *