Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 61ac52e..12b5aa0 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -457,6 +457,12 @@ <arg name="uri" type="s" direction="in"/> <arg name="flags" type="u" direction="in"/> </method> + <method name="SetNumaParameters"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSetNumaParameters"/> + <arg name="params" type="a{sv}" direction="in"/> + <arg name="flags" type="u" direction="in"/> + </method> <method name="SetPerfEvents"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSetPerfEvents"/> diff --git a/src/domain.c b/src/domain.c index 0202a92..5d3b810 100644 --- a/src/domain.c +++ b/src/domain.c @@ -2348,6 +2348,38 @@ virtDBusDomainSetMetadata(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } +static void +virtDBusDomainSetNumaParameters(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs G_GNUC_UNUSED, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect = userData; + g_autoptr(virDomain) domain = NULL; + g_autoptr(GVariantIter) iter = NULL; + g_auto(virtDBusUtilTypedParams) params = { 0 }; + guint flags; + + g_variant_get(inArgs, "(a{sv}u)", &iter, &flags); + + if (!virtDBusUtilGVariantToTypedParams(iter, ¶ms.params, + ¶ms.nparams, error)) { + return; + } + + domain = virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainSetNumaParameters(domain, params.params, + params.nparams, flags) < 0) { + virtDBusUtilSetLastVirtError(error); + } +} + static void virtDBusDomainSetPerfEvents(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -2626,6 +2658,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodTable[] = { { "SetMemoryParameters", virtDBusDomainSetMemoryParameters }, { "SetMemoryStatsPeriod", virtDBusDomainSetMemoryStatsPeriod }, { "SetMetadata", virtDBusDomainSetMetadata }, + { "SetNumaParameters", virtDBusDomainSetNumaParameters }, { "SetPerfEvents", virtDBusDomainSetPerfEvents }, { "SetTime", virtDBusDomainSetTime }, { "SetUserPassword", virtDBusDomainSetUserPassword }, -- 2.15.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list