Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Connect.xml | 7 +++++++
src/connect.c | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index 1502849..0dcc6e8 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -173,6 +173,13 @@
<arg name="maxCells" type="i"
direction="in"/>
<arg name="freeMems" type="at"
direction="out"/>
</method>
+ <method name="NodeGetCPUStats">
+ <annotation name="org.gtk.GDBus.DocString"
+ value="See
https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUStats&quo...
+ <arg name="cpuNum" type="i" direction="in"/>
+ <arg name="flags" type="u" direction="in"/>
+ <arg name="cpuStats" type="a{st}"
direction="out"/>
+ </method>
<signal name="DomainEvent">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEven...
diff --git a/src/connect.c b/src/connect.c
index 78b438e..80b5c67 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -880,6 +880,47 @@ virtDBusConnectNodeGetCellsFreeMemory(GVariant *inArgs,
*outArgs = g_variant_new_tuple(&res, 1);
}
+static void
+virtDBusConnectNodeGetCPUStats(GVariant *inArgs,
+ GUnixFDList *inFDs G_GNUC_UNUSED,
+ const gchar *objectPath G_GNUC_UNUSED,
+ gpointer userData,
+ GVariant **outArgs,
+ GUnixFDList **outFDs G_GNUC_UNUSED,
+ GError **error)
+{
+ virtDBusConnect *connect = userData;
+