Rename getPSUInventoryPath to getPSUInventoryPaths
Rename the utils method/function getPSUInventoryPath() to
getPSUInventoryPaths(). The method/function returns multiple paths in a
vector, so the name should be plural. This will make the return type
more clear. Currently the name implies only one path will be returned.
Tested:
* Verified all automated tests build and run successfully
* Verified getPSUInventoryPaths() returns correct data
Change-Id: I7e215c37e3ce1eb27313bc51348c7f7335c8f67a
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/src/utils.hpp b/src/utils.hpp
index 3b033fc..020d528 100644
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -26,7 +26,7 @@
/**
* @brief Get PSU inventory object path from DBus
*/
-std::vector<std::string> getPSUInventoryPath(sdbusplus::bus_t& bus);
+std::vector<std::string> getPSUInventoryPaths(sdbusplus::bus_t& bus);
/** @brief Get service name from object path and interface
*
@@ -128,7 +128,7 @@
virtual ~UtilsInterface() = default;
virtual std::vector<std::string>
- getPSUInventoryPath(sdbusplus::bus_t& bus) const = 0;
+ getPSUInventoryPaths(sdbusplus::bus_t& bus) const = 0;
virtual std::string getService(sdbusplus::bus_t& bus, const char* path,
const char* interface) const = 0;
@@ -168,7 +168,7 @@
{
public:
std::vector<std::string>
- getPSUInventoryPath(sdbusplus::bus_t& bus) const override;
+ getPSUInventoryPaths(sdbusplus::bus_t& bus) const override;
std::string getService(sdbusplus::bus_t& bus, const char* path,
const char* interface) const override;
@@ -206,9 +206,9 @@
return getUtils().getServices(bus, path, interface);
}
-inline std::vector<std::string> getPSUInventoryPath(sdbusplus::bus_t& bus)
+inline std::vector<std::string> getPSUInventoryPaths(sdbusplus::bus_t& bus)
{
- return getUtils().getPSUInventoryPath(bus);
+ return getUtils().getPSUInventoryPaths(bus);
}
inline std::string getVersionId(const std::string& version)