psu-ng: Updates to get VPD data to inventory
Add in code to retrieve the VPD data and populate that data to the D-Bus
inventory properties.
Use the PMBus utilities to retrieve the model (CCIN for IBM power
supplies), part number, serial number, and firmware version information
from the sysfs "files" provided via the device driver.
Only build in IBM VPD data collection and reporting if meson ran with
-Dibm-vpd=true.
Tested:
Copied SDK build of phospor-psu-monitor with -Dibm-vpd=true to
Rainier hardware system, verified inventory properties updated/added.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I61688b154ead570e9d9390342596bf7d840f4dce
diff --git a/phosphor-power-supply/test/mock.hpp b/phosphor-power-supply/test/mock.hpp
index c4c2c9d..63afffe 100644
--- a/phosphor-power-supply/test/mock.hpp
+++ b/phosphor-power-supply/test/mock.hpp
@@ -17,6 +17,8 @@
MOCK_METHOD(uint64_t, read, (const std::string& name, Type type),
(override));
+ MOCK_METHOD(std::string, readString, (const std::string& name, Type type),
+ (override));
MOCK_METHOD(void, writeBinary,
(const std::string& name, std::vector<uint8_t> data, Type type),
(override));