Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Connect.xml | 6 ++++++
src/connect.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index 2e65f8b..62a65ae 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -190,6 +190,12 @@
value="See
https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetInfo"/>
<arg name="info" type="(stuuuuuu)"
direction="out"/>
</method>
+ <method name="NodeGetMemoryParameters">
+ <annotation name="org.gtk.GDBus.DocString"
+ value="See
https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryParame...
+ <arg name="flags" type="u" direction="in"/>
+ <arg name="memoryParameters" type="a{sv}"
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 bb9bd46..8a168f4 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -968,6 +968,41 @@ virtDBusConnectNodeGetInfo(GVariant *inArgs G_GNUC_UNUSED,
info.cores, info.threads);
}
+static void
+virtDBusConnectNodeGetMemoryParameters(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;
+ g_auto(virtDBusUtilTypedParams) params = { 0 };
+ guint flags;
+ gint ret;
+ GVariant *grecords;
+
+ g_variant_get(inArgs, "(u)", &flags);
+
+ if (!virtDBusConnectOpen(connect, error))
+ return;
+
+ ret = virNodeGetMemoryParameters(connect->connection, NULL,
+ ¶ms.nparams, flags);