psu-ng: Move model validation to its own function

Move the model validation to a separate function so that it can be used
in a subsequent commit to get the psu count from the supported
configurations map. The supported configurations maps a psu model name
to the expected psu characteristics, so by knowing the model name, it
can be used to get the expected psu information for that system.

Tested: The validation function works as before.

Change-Id: I3494f68721131b4a42af2ad9e1889ad2e340d4e2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/phosphor-power-supply/psu_manager.hpp b/phosphor-power-supply/psu_manager.hpp
index 085f11e..e54f536 100644
--- a/phosphor-power-supply/psu_manager.hpp
+++ b/phosphor-power-supply/psu_manager.hpp
@@ -263,6 +263,17 @@
     bool hasRequiredPSUs(std::map<std::string, std::string>& additionalData);
 
     /**
+     * @brief Helper function to validate that all PSUs have the same model name
+     *
+     * @param[out] model - The model name. Empty if there is a mismatch.
+     * @param[out] additionalData - If there is a mismatch, it contains debug
+     *             information such as the mismatched model name.
+     * @return true if all the PSUs have the same model name, false otherwise.
+     */
+    bool validateModelName(std::string& model,
+                           std::map<std::string, std::string>& additionalData);
+
+    /**
      * @brief Map of supported PSU configurations that include the model name
      * and their properties.
      */