PEL: LightPath: Choose callout location codes

LightPath uses the following rules to pick the location codes to turn on
LEDs for:

* If the PEL wasn't created by the BMC or Hostboot, and doesn't have the
  Service Action action flag set, then don't even check it and don't
  turn on the System Attention Indicator.

* Choose all location codes in the first group of callouts, where a
  group can be:
  * a single medium priority callout
  * one or more high priority callouts
  * one or more medium group A priority callouts

* All callouts in that group must be hardware callouts, meaning the FRU
  identity section's failing component type flag must either be hardware
  callout or symbolic FRU callout with trusted location code.  If there
  is a callout in the group that doesn't meet this requirement, then
  nothing in that group can be used.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ifbe7bddee14b69dc565a405e2f120fb5545f69e5
diff --git a/extensions/openpower-pels/service_indicators.hpp b/extensions/openpower-pels/service_indicators.hpp
index 36eacf8..292c30d 100644
--- a/extensions/openpower-pels/service_indicators.hpp
+++ b/extensions/openpower-pels/service_indicators.hpp
@@ -94,13 +94,30 @@
     void activate(const PEL& pel) override;
 
     /**
-     * @brief Description TODO
+     * @brief Returns the location codes for the FRU callouts in the
+     *        callouts list that need their LEDs turned on.
+     *
+     * This is public so it can be tested.
+     *
+     * @param[in] callouts - The Callout list from a PEL
+     *
+     * @return std::vector<std::string> - The location codes
      */
     std::vector<std::string> getLocationCodes(
         const std::vector<std::unique_ptr<src::Callout>>& callouts) const;
 
     /**
-     * @brief Description TODO
+     * @brief Function called to check if the code even needs to
+     *        bother looking in the callouts to find LEDs to turn on.
+     *
+     * It will ignore all PELs except for those created by the BMC or
+     * hostboot that have the Serviceable action flag set.
+     *
+     * This is public so it can be tested.
+     *
+     * @param[in] pel - The PEL
+     *
+     * @return bool - If the PEL should be ignored or not.
      */
     bool ignore(const PEL& pel) const;
 
@@ -115,6 +132,32 @@
      * @brief Description TODO
      */
     void assertLEDs(const std::vector<std::string>& ledGroups) const;
+
+    /**
+     * @brief Checks if the callout priority is one that the policy
+     *        may turn on an LED for.
+     *
+     * The priorities it cares about are high, medium, and medium
+     * group A.
+     *
+     * @param[in] priority - The priority value from the PEL
+     *
+     * @return bool - If LightPath cares about a callout with this
+     *                priority.
+     */
+    bool isRequiredPriority(uint8_t priority) const;
+
+    /**
+     * @brief Checks if the callout is either a normal FRU
+     *        callout or a symbolic FRU callout with a trusted
+     *        location code, which is one of the requirements for
+     *        LightPath to turn on an LED.
+     *
+     * @param[in] - callout - The Callout object
+     *
+     * @return bool - If the callout is a hardware callout
+     */
+    bool isHardwareCallout(const src::Callout& callout) const;
 };
 
 /**