Sdbusplus-based Shared Library

Lei YU mine260309 at gmail.com
Wed Jul 18 18:36:29 AEST 2018


> I thought you were talking about extending the concept that was applied
> to sdbus (thin raii wrappers around sdbus) to sdevent.  I definitely think
> we need that.
>
> I think C++ bindings around sdevent could also have general utility to someone
> outside of OpenBMC so I’d again vote for not including OpenBMC-isms in a
> library for something like that.
>
> > My primary goal with pushing this
> > line of thought it to reduce code duplication in openbmc.  So many
> > daemons have the same methods that just talk to sdbusplus, etc.  So it
> > makes sense to me to have a utility library for interfacing with
> > sdbusplus for common tasks.  phosphor::util::getService(),
> > phosphor::util::get... etc, so they can be maintained in one place.
>
> I feel like a number of these are mapper related.  Could we add some
> client bindings for the mapper that help here and put them in the
> mapper repository?  Here is a possible example of how that could
> look:
>
> https://github.com/openbmc/phosphor-dbus-monitor/blob/master/src/sdbusplus.hpp
>

I would like to bring this topic *again*, that a shared util library is
*really* needed, either in a new repo, or in some existing repo.
Because we see so many service are implementing the same functions like
"getService" "getProperty", etc, which is so common, that it's preferred to
have a common library provide the implementation, as well as the mock
interfaces.

Then every service using such functions could easily call the library, and the
tests could easily use the mocked interface.

Could we get some progress on this?

Thanks!


More information about the openbmc mailing list