[linux-lvm] How to get a list of all logical groups or volumes using dbus API

Michael Lipp mnl at mnl.de
Thu Jun 21 15:03:36 UTC 2018


> I think `object_manager.GetManagedObjects()` is one of supported ways
> (used by the test suite).

Thanks! I didn't try this one. It's still a bit of a hack, though.
According to https://dbus.freedesktop.org/doc/dbus-api-design.html:

"The specification also defines the org.freedesktop.DBus.ObjectManager
<http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager>
interface, which should be used whenever a service needs to expose a
variable number of objects of the same class..."

The objects I get are not of the same class (Manager, LV, PV). I still
have to "pattern match", only on a higher level ("instance/type match").

But it's a way to go.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20180621/5331ad62/attachment.htm>


More information about the linux-lvm mailing list