Get version directly on PSU plugged in

When PSU is plugged in, get the version directly instead of waiting for
the VERSION interface change on the inventory object.
This simplies the code a lot in onPsuInventoryChanged(), and it does not
depend on the VERSION interface on inventory object anymore.

Tested: Verify on Witherspoon that when PSU is plugged out and in, the
        PSU software object is removed and created as expected.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I2770049baf8ffa8f1d91391fd9225a237acb24dc
3 files changed
tree: 6b6ae4f5579c0a2b6f9bca77622ddfbafdbc3a33
  1. service/
  2. src/
  3. test/
  4. vendor-example/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. MAINTAINERS
  9. meson.build
  10. meson_options.txt
  11. README.md
README.md

phosphor-psu-code-mgmt

phosphor-psu-code-mgmt is a service to provide management for PSU code, including:

  • PSU code version
  • PSU code update

Building

meson build/ && ninja -C build

Unit test

  • Run it in OpenBMC CI, refer to local-ci-build.md
  • Run it in OE SDK, run below commands in a x86-64 SDK env:
    meson -Doe-sdk=enabled -Dtests=enabled build/
    ninja -C build/ test  # Meson skips running the case due to it thinks it's cross compiling
    # Manually run the tests
    for t in `find build/test/ -maxdepth 1 -name "test_*"`; do ./$t || break ; done