PEL: Don't allow duplicate callouts

When adding callouts, check if the callout being added already exists.
If it does, don't add it and rather just update the priority of the
existing one to be the highest of the two.

Callouts are considered to be equal if their location code matches, or
if they have the same maintenance procedure, or if they have the same
symbolic FRU.

The change entails adding an operator== on the Callout object, as well
as an operator> so that the callout with the highest priority can be
determined.  Also use this new operator> in the sort of the callout list
that happens after a callout is added or changed.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5ee148cc12e92f67fb3da233c3615e9665e95355
diff --git a/extensions/openpower-pels/callout.hpp b/extensions/openpower-pels/callout.hpp
index 9c99494..7ac0727 100644
--- a/extensions/openpower-pels/callout.hpp
+++ b/extensions/openpower-pels/callout.hpp
@@ -198,6 +198,16 @@
     }
 
     /**
+     * @brief Set the priority of the callout
+     *
+     * @param[in] priority - The priority value
+     */
+    void setPriority(uint8_t priority)
+    {
+        _priority = priority;
+    }
+
+    /**
      * @brief Returns the location code of the callout
      *
      * @return std::string - The location code
@@ -253,6 +263,25 @@
         return _mru;
     }
 
+    /**
+     * @brief Operator == used for finding duplicate callouts
+     *
+     * Checks if the location codes then maintenance procedure
+     * value, then symbolic FRU value match.
+     *
+     * @param[in] right - The callout to compare to
+     * @return bool - true if they are the same
+     */
+    bool operator==(const Callout& right) const;
+
+    /**
+     * @brief Operator > used for sorting callouts by priority
+     *
+     * @param[in] right - The callout to compare to
+     * @return bool - true if callout has higher priority than other
+     */
+    bool operator>(const Callout& right) const;
+
   private:
     /**
      * @brief Sets the location code field