On Thu, Apr 26, 2018 at 04:54:08PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> > --- > data/org.libvirt.Connect.xml | 7 +++++++ > src/connect.c | 39 +++++++++++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > > diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml > index ee7bfdc..1502849 100644 > --- a/data/org.libvirt.Connect.xml > +++ b/data/org.libvirt.Connect.xml > @@ -166,6 +166,13 @@ > <arg name="uuid" type="s" direction="in"/> > <arg name="network" type="o" direction="out"/> > </method> > + <method name="NodeGetCellsFreeMemory"> > + <annotation name="org.gtk.GDBus.DocString" > + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCellsFreeMemory"/> > + <arg name="startCell" type="i" direction="in"/> > + <arg name="maxCells" type="i" direction="in"/> > + <arg name="freeMems" type="at" direction="out"/> > + </method> Another example of bad design of libvirt API. We can do a better job in libvirt-dbus to always return an array of free memory for all NUMA nodes. However, there is no other way how to get the number of NUMA nodes except for parsing XML output of virConnectGetCapabilities() API. That means that we need to use libxml2 library to parse the XML. Pavel
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list