Add power-utils
The power-utils is added to support psu code manager as vendor-specifc
tool.
In this commit, the util returns the PSU version based on the PSU
inventory path, where the inventory path are mapped to the PSU sysfs
device directory based on a json config.
Tested: Verify the version is returned correctly on Witherspoon:
$ ./psutils --getversion \
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
01100110
And it returns non-zero when it fails to get the version without
throwing exception.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ib60f3aa50ce581d55fe4cd62642f30398e25be83
7 files changed