[libvirt] [dbus PATCH 2/2] Add 'NumOfDomains' property for virConnectGetNumOfDomains
Katerina Koukiou
kkoukiou at redhat.com
Mon Mar 26 15:15:35 UTC 2018
On Mon, 2018-03-26 at 16:07 +0100, Daniel P. Berrangé wrote:
> On Mon, Mar 26, 2018 at 04:58:09PM +0200, Katerina Koukiou wrote:
> > ---
> > data/org.libvirt.Connect.xml | 4 ++++
> > src/connect.c | 20 ++++++++++++++++++++
> > test/test_connect.py | 1 +
> > 3 files changed, 25 insertions(+)
> >
> > diff --git a/data/org.libvirt.Connect.xml
> > b/data/org.libvirt.Connect.xml
> > index 56a1126..a58504d 100644
> > --- a/data/org.libvirt.Connect.xml
> > +++ b/data/org.libvirt.Connect.xml
> > @@ -7,6 +7,10 @@
> > <annotation name="org.gtk.GDBus.DocString"
> > value="See https://libvirt.org/html/libvirt-libvirt-domain
> > .html#virConnectGetVersion"/>;
> > </property>
> > + <property name="NumOfDomains" type="u" access="read">
> > + <annotation name="org.gtk.GDBus.DocString"
> > + value="See https://libvirt.org/html/libvirt-libvirt-domain
> > .html#virConnectNumOfDomains"/>;
> > + </property>
>
> I'm not convinced this makes sense to expose. This is part of the old
> way, very inefficient way, of of listing guests.
>
> The new virConnectListAllDomains() method is much more efficient
> approach in general.
Thanks for pointing this out. I will remove the patch and I will not
implement any other similar *ConnectNumOf* API in the future.
>
> Regards,
> Daniel
Regards,
Katerina
More information about the libvir-list
mailing list