pimgen: Enable multiple interface files

Allow more than one interface file and put declared interface yaml
files in interfaces.d, to draw attention to the intent is for
packages to install their interface requirements there.

Change-Id: Iab0d85eca7c5c3370978dc692d6ab8807108a2f7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2 files changed
tree: e38e88c27fa5b728a4e3d3a26584e1e33aabe717
  1. example/
  2. test/
  3. xyz/
  4. actions.hpp
  5. app.cpp
  6. bootstrap.sh
  7. configure.ac
  8. filters.hpp
  9. generated.mako.cpp
  10. LICENSE
  11. Makefile.am
  12. manager.cpp
  13. manager.hpp
  14. pimgen.py
  15. README.md
  16. xyz.openbmc_project.Inventory.Manager.cpp
README.md

Phosphor Inventory Manager (PIM) is an implementation of the xyz.openbmc_project.Inventory.Manager DBus interface, and supporting tools. PIM uses a combination of build-time YAML files and run-time calls to the Notify method of the Manager interface to provide a generalized inventory state management solution.

YAML

PIM includes a YAML parser (pimgen.py). For PIM to do anything useful, a set of YAML files must be provided externally that tell it what to do. An example can be found in the examples directory.

The following top level YAML tags are supported:

  • description - An optional description of the file.
  • events - One or more events that PIM should monitor.

events

Supported event tags are:

  • name - A globally unique event name.
  • type - The event type. Supported types are: match.
  • action - The response to the event.

Subsequent tags are defined by the event type.


action

Supported action tags are:

  • type - The action to perform.
  • args - An optional list of arguments to pass to the action.
    • value - The argument value.
    • type - The argument type (defaults to string if unspecified).

The available actions provided by PIM are:

  • noop - A non-action.
  • destroyObject - Destroy the specified DBus object.

match

Supported match tags are:

  • signature - A DBus match specification.
  • filter - A filter to apply when a match occurs.

filter

Supported filter tags are:

  • type - The filter to use.
  • args - An optional list of arguments to pass to the filter.
    • value - The argument value.
    • type - The argument type (defaults to string if unspecified).

The available filters provided by PIM are:

  • none - A non-filter.
  • propertyChangedTo - Only match events when the specified property has the specified value.

Building

After running pimgen.py, build PIM using the following steps:

    ./bootstrap.sh
    ./configure ${CONFIGURE_FLAGS}
    make

To clean the repository run:

 ./bootstrap.sh clean