PEL: Add getLocationCode call to inv callout

Instead of getting the location code, PN, SN, and CCIN all in one
function call, split getting the location code into its own function.
This way, if there is a location code but not the VPD fields, we can
still have the location code in the callout.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I02f1b18319c34fffce79ad31da74e2114ceb5c95
diff --git a/extensions/openpower-pels/data_interface.hpp b/extensions/openpower-pels/data_interface.hpp
index 6a3e326..d6153b0 100644
--- a/extensions/openpower-pels/data_interface.hpp
+++ b/extensions/openpower-pels/data_interface.hpp
@@ -215,18 +215,26 @@
      *        a callout on an inventory path.
      *
      * @param[in] inventoryPath - The item to get the data for
-     * @param[out] locationCode - Filled in with the  location code
      * @param[out] fruPartNumber - Filled in with the VINI/FN keyword
      * @param[out] ccin - Filled in with the VINI/CC keyword
      * @param[out] serialNumber - Filled in with the VINI/SN keyword
      */
     virtual void getHWCalloutFields(const std::string& inventoryPath,
-                                    std::string& locationCode,
                                     std::string& fruPartNumber,
                                     std::string& ccin,
                                     std::string& serialNumber) const = 0;
 
     /**
+     * @brief Get the location code for an inventory item.
+     *
+     * @param[in] inventoryPath - The item to get the data for
+     *
+     * @return std::string - The location code
+     */
+    virtual std::string
+        getLocationCode(const std::string& inventoryPath) const = 0;
+
+    /**
      * @brief Gets the system type from Entity Manager
      *
      * @param[in] std::string - The system type string
@@ -407,16 +415,27 @@
      *        a callout on an inventory path.
      *
      * @param[in] inventoryPath - The item to get the data for
-     * @param[out] locationCode - Filled in with the  location code
      * @param[out] fruPartNumber - Filled in with the VINI/FN keyword
      * @param[out] ccin - Filled in with the VINI/CC keyword
      * @param[out] serialNumber - Filled in with the VINI/SN keyword
      */
     void getHWCalloutFields(const std::string& inventoryPath,
-                            std::string& locationCode,
                             std::string& fruPartNumber, std::string& ccin,
                             std::string& serialNumber) const override;
 
+    /**
+     * @brief Get the location code for an inventory item.
+     *
+     * Throws an exception if the inventory item doesn't have the
+     * location code interface.
+     *
+     * @param[in] inventoryPath - The item to get the data for
+     *
+     * @return std::string - The location code
+     */
+    std::string
+        getLocationCode(const std::string& inventoryPath) const override;
+
   private:
     /**
      * @brief Reads the BMC firmware version string and puts it into