psutils: Move utility functions to utils.*pp

The files named version.hpp and version.cpp implement the --get-version
option of the psutils tool.

However, the files also contain some utility functions that would be
helpful for implementing other command line options, such as --update or
the planned new option --get-model.

Move the utility functions into new files named utils.hpp and utils.cpp.
The functions will be defined within a namespace named 'utils'.

Tested:
* Verified automated testcases ran successfully
* Verified --get-version option worked correctly
  * When using a psu.json file
  * When using D-Bus information

Change-Id: If902ee4581fce000af37073ac2e7a7b0ade01f78
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/tools/power-utils/version.hpp b/tools/power-utils/version.hpp
index 534d113..4770a71 100644
--- a/tools/power-utils/version.hpp
+++ b/tools/power-utils/version.hpp
@@ -19,22 +19,18 @@
 
 #include <sdbusplus/bus.hpp>
 
-#include <memory>
 #include <string>
 #include <tuple>
 #include <vector>
 
 namespace version
 {
-namespace utils
+namespace internal
 {
 // PsuInfo contains the device path, pmbus read type, and the version string
 using PsuVersionInfo =
     std::tuple<std::string, phosphor::pmbus::Type, std::string>;
 
-// PsuI2cInfo contains the device i2c bus and i2c address
-using PsuI2cInfo = std::tuple<std::uint64_t, std::uint64_t>;
-
 /**
  * @brief Get PSU version information
  *
@@ -53,57 +49,7 @@
  */
 std::string getLatestDefault(const std::vector<std::string>& versions);
 
-/**
- * @brief Get i2c bus and address
- *
- * @param[in] bus - Systemd bus connection
- * @param[in] psuInventoryPath - The PSU inventory path.
- *
- * @return tuple - i2cBus and i2cAddr.
- */
-PsuI2cInfo getPsuI2c(sdbusplus::bus_t& bus,
-                     const std::string& psuInventoryPath);
-
-/**
- * @brief Get PMBus interface pointer
- *
- * @param[in] i2cBus - PSU i2c bus
- * @param[in] i2cAddr - PSU i2c address
- *
- * @return Pointer to PSU PMBus interface
- */
-std::unique_ptr<phosphor::pmbus::PMBusBase>
-    getPmbusIntf(std::uint64_t i2cBus, std::uint64_t i2cAddr);
-
-/**
- * @brief Reads a VPD value from PMBus, corrects size, and contents.
- *
- * If the VPD data read is not the passed in size, resize and fill with
- * spaces. If the data contains a non-alphanumeric value, replace any of
- * those values with spaces.
- *
- * @param[in] pmbusIntf - PMBus Interface.
- * @param[in] vpdName - The name of the sysfs "file" to read data from.
- * @param[in] type - The HWMON file type to read from.
- * @param[in] vpdSize - The expected size of the data for this VPD/property
- *
- * @return A string containing the VPD data read, resized if necessary
- */
-std::string readVPDValue(phosphor::pmbus::PMBusBase& pmbusIntf,
-                         const std::string& vpdName,
-                         const phosphor::pmbus::Type& type,
-                         const std::size_t& vpdSize);
-
-/**
- * @brief Check for file existence
- *
- * @param[in] filePath - File path
- *
- * @return bool
- */
-bool checkFileExists(const std::string& filePath);
-
-} // namespace utils
+} // namespace internal
 
 /**
  * Get the software version of the PSU using sysfs