linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] How to get a list of all logical groups or volumes using dbus API
@ 2018-06-21  7:26 Michael Lipp
  2018-06-21  9:51 ` Marian Csontos
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Lipp @ 2018-06-21  7:26 UTC (permalink / raw)
  To: linux-lvm

Hi,

I searched, but I cannot find the "root hook". Using the Manager
interface, I can lookup a LV if I have some id (LookUpByLvmId). But how
can I achieve the same results as vgs/lvs using the dbus API? I *could*
get the list of paths and pattern match them, but IMHO this would be a hack.

 - Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] How to get a list of all logical groups or volumes using dbus API
  2018-06-21  7:26 [linux-lvm] How to get a list of all logical groups or volumes using dbus API Michael Lipp
@ 2018-06-21  9:51 ` Marian Csontos
  2018-06-21 15:03   ` Michael Lipp
  0 siblings, 1 reply; 3+ messages in thread
From: Marian Csontos @ 2018-06-21  9:51 UTC (permalink / raw)
  To: LVM general discussion and development, Michael Lipp

On 06/21/2018 09:26 AM, Michael Lipp wrote:
> Hi,
> 
> I searched, but I cannot find the "root hook". Using the Manager
> interface, I can lookup a LV if I have some id (LookUpByLvmId). But how
> can I achieve the same results as vgs/lvs using the dbus API? I *could*
> get the list of paths and pattern match them, but IMHO this would be a hack.

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

Not sure there is simpler way.



> 
>   - Michael
> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] How to get a list of all logical groups or volumes using dbus API
  2018-06-21  9:51 ` Marian Csontos
@ 2018-06-21 15:03   ` Michael Lipp
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Lipp @ 2018-06-21 15:03 UTC (permalink / raw)
  To: Marian Csontos, LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]


> 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.



[-- Attachment #2: Type: text/html, Size: 1395 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-21 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21  7:26 [linux-lvm] How to get a list of all logical groups or volumes using dbus API Michael Lipp
2018-06-21  9:51 ` Marian Csontos
2018-06-21 15:03   ` Michael Lipp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).