inventory.decorator: Add slot number interface

This interface provides a slot number property for an inventory item.

The initial use case is to hang this on certain
phosphor-inventory-manager paths so that when entity-manager probes on
them it can have $SlotNumber available as a variable to give a stable
sensor name, such as 'PCIe Card $SlotNumber Temp'.

Without this, if say the $index variable is used instead, and then there
is no guarantee which device will have which sensor name, especially for
cards that can be added in any order when the BMC is running.

Stable sensor names are important in the
phosphor-inventory-manager/entity-manager hybrid model where PIM is used
for inventory and EM is just used for config.

There is a LocationCode property already that could possibly be used on
some systems, but on IBM systems at least it contains the system serial
number so would vary from system to system which isn't desired either.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iea95d7ad123672909799244b0d80f564cb40d425
3 files changed
tree: 8d989a3cefa374d9f67d6ee55eececc289088cce
  1. gen/
  2. subprojects/
  3. yaml/
  4. .editorconfig
  5. .gitignore
  6. .markdownlint.yaml
  7. .prettierrc.yaml
  8. .shellcheck
  9. LICENSE
  10. MAINTAINERS
  11. meson.build
  12. meson_options.txt
  13. OWNERS
  14. README.md
README.md

phosphor-dbus-interfaces

YAML descriptors of standard D-Bus interfaces. The format is described by the sdbusplus binding generation tool sdbus++.

Building

This project can be built with meson. The typical meson workflow is: meson builddir && ninja -C builddir.

The meson files used to handle the YAML files are automatically generated and found under the gen subdirectory. When adding or removing YAML files, this must be regenerated. This can be done with the helper script found in the gen subdirectory: cd gen && ./regenerate-meson.

Configuration

Only the xyz/openbmc_project and org/freedesktop interfaces are built by default. Other interfaces can be enabled by meson options:

  • com/ibm - -Ddata_com_ibm=true
  • org/open_power - -Ddata_org_open_power=true

Example: meson builddir -Ddata_com_ibm=true && ninja -C builddir

References