regulators: Complete compare_vpd action

Complete implementation of the compare_vpd action in the JSON
configuration file.  For more information about this action see
https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/docs/config_file/compare_vpd.md

Implement the execute() method of the CompareVPDAction class.  Obtain
the actual VPD keyword value from the VPD service and compare it with
the expected value.

Also improve doxygen for the execute() method of the
ComparePresenceAction class.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ieb93806245babe6782fef95209bed8eed5b32578
diff --git a/phosphor-regulators/src/actions/compare_vpd_action.hpp b/phosphor-regulators/src/actions/compare_vpd_action.hpp
index 7dc5136..af7e085 100644
--- a/phosphor-regulators/src/actions/compare_vpd_action.hpp
+++ b/phosphor-regulators/src/actions/compare_vpd_action.hpp
@@ -18,7 +18,6 @@
 #include "action.hpp"
 #include "action_environment.hpp"
 
-#include <sstream>
 #include <string>
 
 namespace phosphor::power::regulators
@@ -62,16 +61,15 @@
     /**
      * Executes this action.
      *
-     * TODO: Not implemented yet
+     * Compares the actual VPD keyword value to the expected value.
      *
-     * @param environment Action execution environment.
-     * @return true
+     * Throws an exception if an error occurs.
+     *
+     * @param environment action execution environment
+     * @return true if the keyword value equals the expected value, otherwise
+     *         returns false
      */
-    virtual bool execute(ActionEnvironment& /* environment */) override
-    {
-        // TODO: Not implemented yet
-        return true;
-    }
+    virtual bool execute(ActionEnvironment& environment) override;
 
     /**
      * Returns the Field-Replaceable Unit (FRU).
@@ -108,20 +106,13 @@
      *
      * @return description of action
      */
-    virtual std::string toString() const override
-    {
-        std::ostringstream ss;
-        ss << "compare_vpd: { ";
-        ss << "fru: " << fru << ", ";
-        ss << "keyword: " << keyword << ", ";
-        ss << "value: " << value << " }";
-
-        return ss.str();
-    }
+    virtual std::string toString() const override;
 
   private:
     /**
-     * Field-Replaceable Unit (FRU) that contains the VPD.
+     * Field-Replaceable Unit (FRU) for this action.
+     *
+     * The D-Bus inventory path of the FRU.
      */
     const std::string fru{};