mapper: Support association property removes

When the org.openbmc.Associations.association property changes,
the change may entail removing entries from that property,
in which case association objects may need to be removed.

The existing code did not support this at all, it only
supported adding new associations.

This is done with the help of the associationOwners map, to
know which previous associations an object path and service
had so that it can tell when ones go away.

As a reminder, if an org.openbmc.Associations.associations
property under /path/A looks like:

    ['forward', 'reverse', '/path/B'],

then the mapper will create 2 new objects - /path/A/forward
and /path/B/reverse, with xyz.openbmc_project.Association.endpoints
property values on them of ['/path/B'], and ['/path/A'], respectively.

If that associations property is then cleared, the mapper
needs to remove the objects it created, assuming there is no
other service that also has an association that requires them.

Resolves openbmc/phosphor-objmgr#16

Change-Id: I28defa831e5aefe8dd09b96c1b104fc1610471d6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed
tree: a13d3daad517a41b04d3bc371c7cbfb12ce635df
  1. fail-monitor/
  2. libmapper/
  3. obmc/
  4. src/
  5. .clang-format
  6. .gitignore
  7. bootstrap.sh
  8. configure.ac
  9. LICENSE
  10. MAINTAINERS
  11. Makefile.am
  12. phosphor-mapper
  13. README.md
  14. setup.cfg
  15. setup.py.in
README.md

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.