From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966743611788.4728912906904; Tue, 17 Apr 2018 05:05:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15B51445E2; Tue, 17 Apr 2018 12:05:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96B347E6DF; Tue, 17 Apr 2018 12:05:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 40D6462D1C; Tue, 17 Apr 2018 12:04:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4l9v004044 for ; Tue, 17 Apr 2018 08:04:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 11FD1215CDCB; Tue, 17 Apr 2018 12:04:47 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8C55215CDC8 for ; Tue, 17 Apr 2018 12:04:46 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:20 +0200 Message-Id: <20180417120444.17541-2-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 01/25] Implement GetControlInfo method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 17 Apr 2018 12:05:42 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 6 +++++ src/domain.c | 54 +++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 60 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 98e2873..74b0a62 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -76,6 +76,12 @@ + + + + + diff --git a/src/domain.c b/src/domain.c index 8a25ae1..5ec7686 100644 --- a/src/domain.c +++ b/src/domain.c @@ -3,6 +3,22 @@ =20 #include =20 +VIRT_DBUS_ENUM_DECL(virtDBusDomainControlState) +VIRT_DBUS_ENUM_IMPL(virtDBusDomainControlState, + VIR_DOMAIN_CONTROL_LAST, + "ok", + "job", + "occupied", + "error") + +VIRT_DBUS_ENUM_DECL(virtDBusDomainControlErrorReason) +VIRT_DBUS_ENUM_IMPL(virtDBusDomainControlErrorReason, + VIR_DOMAIN_CONTROL_ERROR_REASON_LAST, + "none", + "unknown", + "monitor", + "internal") + VIRT_DBUS_ENUM_DECL(virtDBusDomainJob) VIRT_DBUS_ENUM_IMPL(virtDBusDomainJob, VIR_DOMAIN_JOB_LAST, @@ -472,6 +488,43 @@ virtDBusDomainGetBlkioParameters(GVariant *inArgs, *outArgs =3D g_variant_new_tuple(&grecords, 1); } =20 +static void +virtDBusDomainGetControlInfo(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + g_autofree virDomainControlInfoPtr controlInfo =3D NULL; + const gchar *stateStr; + const gchar *errorReasonStr; + guint flags; + + g_variant_get(inArgs, "(u)", &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + controlInfo =3D g_new0(virDomainControlInfo, 1); + if (virDomainGetControlInfo(domain, controlInfo, flags) =3D=3D -1) + return virtDBusUtilSetLastVirtError(error); + + stateStr =3D virtDBusDomainControlStateTypeToString(controlInfo->state= ); + if (!stateStr) + return; + errorReasonStr =3D virtDBusDomainControlErrorReasonTypeToString(contro= lInfo->details); + if (!errorReasonStr) + return; + + *outArgs =3D g_variant_new("((sst))", stateStr, + errorReasonStr, controlInfo->stateTime); +} + static void virtDBusDomainGetJobInfo(GVariant *inArgs G_GNUC_UNUSED, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1086,6 +1139,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, { "GetBlkioParameters", virtDBusDomainGetBlkioParameters }, + { "GetControlInfo", virtDBusDomainGetControlInfo }, { "GetJobInfo", virtDBusDomainGetJobInfo }, { "GetMemoryParameters", virtDBusDomainGetMemoryParameters }, { "GetSchedulerParameters", virtDBusDomainGetSchedulerParameters }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966717042416.66903741008707; Tue, 17 Apr 2018 05:05:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BA0A7FDDE; Tue, 17 Apr 2018 12:05:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1897C66D6B; Tue, 17 Apr 2018 12:05:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A9E462D17; Tue, 17 Apr 2018 12:04:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4lRV004052 for ; Tue, 17 Apr 2018 08:04:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id C9B96215CDCB; Tue, 17 Apr 2018 12:04:47 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F18D215CDC8 for ; Tue, 17 Apr 2018 12:04:47 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:21 +0200 Message-Id: <20180417120444.17541-3-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 02/25] Implement SendKey method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 17 Apr 2018 12:05:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 8 ++++++++ src/domain.c | 46 +++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 54 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 74b0a62..0b23e75 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -178,6 +178,14 @@ + + + + + + + diff --git a/src/domain.c b/src/domain.c index 5ec7686..0c8e1ce 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1002,6 +1002,51 @@ virtDBusDomainResume(GVariant *inArgs G_GNUC_UNUSED, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainSendKey(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint codeset; + guint holdtime; + const guint *keycodes; + gsize nkeycodes =3D 0; + gint ret; + guint flags; + GVariant *v; + + v =3D g_variant_get_child_value(inArgs, 0); + codeset =3D g_variant_get_uint32(v); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 1); + holdtime =3D g_variant_get_uint32(v); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 2); + keycodes =3D g_variant_get_fixed_array(v, &nkeycodes, sizeof(guint)); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 3); + flags =3D g_variant_get_uint32(v); + g_variant_unref(v); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + ret =3D virDomainSendKey(domain, codeset, holdtime, (guint *)keycodes,= nkeycodes, flags); + if (ret < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainSetMemory(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1157,6 +1202,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Reboot", virtDBusDomainReboot }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, + { "SendKey", virtDBusDomainSendKey }, { "SetVcpus", virtDBusDomainSetVcpus }, { "SetMemory", virtDBusDomainSetMemory }, { "Shutdown", virtDBusDomainShutdown }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966706984748.3900604015238; Tue, 17 Apr 2018 05:05:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D2CF3135AE2; Tue, 17 Apr 2018 12:05:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BCBA7D658; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5CF227F1E1; Tue, 17 Apr 2018 12:04:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4mXm004061 for ; Tue, 17 Apr 2018 08:04:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 70731215CDCB; Tue, 17 Apr 2018 12:04:48 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12B5D215CDC8 for ; Tue, 17 Apr 2018 12:04:47 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:22 +0200 Message-Id: <20180417120444.17541-4-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 03/25] Implement InjectNMI method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Apr 2018 12:05:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko --- data/org.libvirt.Domain.xml | 5 +++++ src/domain.c | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 0b23e75..48b8a95 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -124,6 +124,11 @@ + + + + diff --git a/src/domain.c b/src/domain.c index 0c8e1ce..9197755 100644 --- a/src/domain.c +++ b/src/domain.c @@ -752,6 +752,29 @@ virtDBusDomainHasManagedSaveImage(GVariant *inArgs, *outArgs =3D g_variant_new("(b)", managedSaveImage); } =20 +static void +virtDBusDomainInjectNMI(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint flags; + + g_variant_get(inArgs, "(u)", &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainInjectNMI(domain, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainManagedSave(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1192,6 +1215,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "GetVcpus", virtDBusDomainGetVcpus }, { "GetXMLDesc", virtDBusDomainGetXMLDesc }, { "HasManagedSaveImage", virtDBusDomainHasManagedSaveImage }, + { "InjectNMI", virtDBusDomainInjectNMI }, { "ManagedSave", virtDBusDomainManagedSave }, { "ManagedSaveRemove", virtDBusDomainManagedSaveRemove }, { "MemoryStats", virtDBusDomainMemoryStats }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966711982647.2771074573651; Tue, 17 Apr 2018 05:05:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D2C131694BB; Tue, 17 Apr 2018 12:05:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B9CD66D77; Tue, 17 Apr 2018 12:05:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C5BD51864DC1; Tue, 17 Apr 2018 12:04:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4nDV004073 for ; Tue, 17 Apr 2018 08:04:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 16F75215CDCF; Tue, 17 Apr 2018 12:04:49 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD2E7215CDC8 for ; Tue, 17 Apr 2018 12:04:48 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:23 +0200 Message-Id: <20180417120444.17541-5-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 04/25] Implement BlockPeek metohd for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 17 Apr 2018 12:05:11 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 9 +++++++++ src/domain.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 48b8a95..85e2cf6 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -54,6 +54,15 @@ + + + + + + + + diff --git a/src/domain.c b/src/domain.c index 9197755..c02e289 100644 --- a/src/domain.c +++ b/src/domain.c @@ -383,6 +383,44 @@ virtDBusDomainAttachDevice(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainBlockPeek(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + gulong offset; + guint size; + guint flags; + g_autofree guchar *buffer =3D NULL; + GVariantBuilder *builder; + GVariant *res; + + g_variant_get(inArgs, "(&stuu)", &disk, &offset, &size, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + buffer =3D g_new0(guchar, size); + if (virDomainBlockPeek(domain, disk, offset, size, buffer, flags) < 0) + virtDBusUtilSetLastVirtError(error); + + builder =3D g_variant_builder_new(G_VARIANT_TYPE("ay")); + for (unsigned int i =3D 0; i < size; i++) + g_variant_builder_add(builder, "y", buffer[i]); + + res =3D g_variant_builder_end(builder); + + *outArgs =3D g_variant_new_tuple(&res, 1); +} + static void virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1203,6 +1241,7 @@ static virtDBusGDBusPropertyTable virtDBusDomainPrope= rtyTable[] =3D { static virtDBusGDBusMethodTable virtDBusDomainMethodTable[] =3D { { "AbortJob", virtDBusDomainAbortJob }, { "AttachDevice", virtDBusDomainAttachDevice }, + { "BlockPeek", virtDBusDomainBlockPeek }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966705427450.93857579552787; Tue, 17 Apr 2018 05:05:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99AA13130F8D; Tue, 17 Apr 2018 12:05:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44E76182F2; Tue, 17 Apr 2018 12:05:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C7D3B181D0B6; Tue, 17 Apr 2018 12:04:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4nTQ004079 for ; Tue, 17 Apr 2018 08:04:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id B1572215CDCF; Tue, 17 Apr 2018 12:04:49 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54553215CDC8 for ; Tue, 17 Apr 2018 12:04:49 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:24 +0200 Message-Id: <20180417120444.17541-6-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 05/25] Implement MemoryPeek method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 17 Apr 2018 12:05:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 8 ++++++++ src/domain.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 85e2cf6..bd30ad4 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -148,6 +148,14 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virDomainManagedSaveRemove"/> + + + + + + + diff --git a/src/domain.c b/src/domain.c index c02e289..01f120d 100644 --- a/src/domain.c +++ b/src/domain.c @@ -859,6 +859,43 @@ virtDBusDomainManagedSaveRemove(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainMemoryPeek(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + gulong offset; + guint size; + guint flags; + g_autofree guchar *buffer =3D NULL; + GVariantBuilder *builder; + GVariant *res; + + g_variant_get(inArgs, "(tuu)", &offset, &size, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + buffer =3D g_new0(guchar, size); + if (virDomainMemoryPeek(domain, offset, size, buffer, flags) < 0) + virtDBusUtilSetLastVirtError(error); + + builder =3D g_variant_builder_new(G_VARIANT_TYPE("ay")); + for (unsigned int i =3D 0; i < size; i++) + g_variant_builder_add(builder, "y", buffer[i]); + + res =3D g_variant_builder_end(builder); + + *outArgs =3D g_variant_new_tuple(&res, 1); +} + static void virtDBusDomainMemoryStats(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1257,6 +1294,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "InjectNMI", virtDBusDomainInjectNMI }, { "ManagedSave", virtDBusDomainManagedSave }, { "ManagedSaveRemove", virtDBusDomainManagedSaveRemove }, + { "MemoryPeek", virtDBusDomainMemoryPeek }, { "MemoryStats", virtDBusDomainMemoryStats }, { "MigrateGetMaxDowntime", virtDBusDomainMigrateGetMaxDowntime }, { "MigrateGetMaxSpeed", virtDBusDomainMigrateGetMaxSpeed }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966706632550.943944309683; Tue, 17 Apr 2018 05:05:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F22AD3262261; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 329AA7D65E; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 948E6181D0C2; Tue, 17 Apr 2018 12:05:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4oFf004092 for ; Tue, 17 Apr 2018 08:04:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 57798215CDCF; Tue, 17 Apr 2018 12:04:50 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDFD5215CDC8 for ; Tue, 17 Apr 2018 12:04:49 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:25 +0200 Message-Id: <20180417120444.17541-7-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 06/25] Add AddIOThread method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 17 Apr 2018 12:05:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index bd30ad4..10ce15a 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -48,6 +48,12 @@ + + + + + diff --git a/src/domain.c b/src/domain.c index 01f120d..1edad05 100644 --- a/src/domain.c +++ b/src/domain.c @@ -359,6 +359,30 @@ virtDBusDomainAbortJob(GVariant *inArgs G_GNUC_UNUSED, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainAddIOThread(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint iothreadId; + guint flags; + + g_variant_get(inArgs, "(uu)", &iothreadId, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainAddIOThread(domain, iothreadId, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainAttachDevice(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1277,6 +1301,7 @@ static virtDBusGDBusPropertyTable virtDBusDomainPrope= rtyTable[] =3D { =20 static virtDBusGDBusMethodTable virtDBusDomainMethodTable[] =3D { { "AbortJob", virtDBusDomainAbortJob }, + { "AddIOThread", virtDBusDomainAddIOThread }, { "AttachDevice", virtDBusDomainAttachDevice }, { "BlockPeek", virtDBusDomainBlockPeek }, { "Create", virtDBusDomainCreate }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966706614959.6518447775348; Tue, 17 Apr 2018 05:05:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DBACF3130384; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 169A87D656; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 18EB91864DC9; Tue, 17 Apr 2018 12:05:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4ptX004101 for ; Tue, 17 Apr 2018 08:04:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id F0F6D215CDCF; Tue, 17 Apr 2018 12:04:50 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93FE2215CDC8 for ; Tue, 17 Apr 2018 12:04:50 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:26 +0200 Message-Id: <20180417120444.17541-8-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 07/25] Implement BlockCommit method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 17 Apr 2018 12:05:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko --- data/org.libvirt.Domain.xml | 9 +++++++++ src/domain.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 10ce15a..3d8e7b1 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -60,6 +60,15 @@ + + + + + + + + diff --git a/src/domain.c b/src/domain.c index 1edad05..f482bb9 100644 --- a/src/domain.c +++ b/src/domain.c @@ -407,6 +407,33 @@ virtDBusDomainAttachDevice(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainBlockCommit(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + const gchar *base; + const gchar *top; + gulong bandwidth; + guint flags; + + g_variant_get(inArgs, "(&s&s&stu)", &disk, &base, &top, &bandwidth, &f= lags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainBlockCommit(domain, disk, base, top, bandwidth, flags) < = 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainBlockPeek(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1303,6 +1330,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "AbortJob", virtDBusDomainAbortJob }, { "AddIOThread", virtDBusDomainAddIOThread }, { "AttachDevice", virtDBusDomainAttachDevice }, + { "BlockCommit", virtDBusDomainBlockCommit }, { "BlockPeek", virtDBusDomainBlockPeek }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966730911110.63227780976706; Tue, 17 Apr 2018 05:05:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BAC9313774E; Tue, 17 Apr 2018 12:05:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D422917D5A; Tue, 17 Apr 2018 12:05:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DBC48ADAB8; Tue, 17 Apr 2018 12:05:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4p4G004108 for ; Tue, 17 Apr 2018 08:04:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 96CF5215CDCF; Tue, 17 Apr 2018 12:04:51 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39B44215CDC8 for ; Tue, 17 Apr 2018 12:04:51 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:27 +0200 Message-Id: <20180417120444.17541-9-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 08/25] Implement BlockJobAbort method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 17 Apr 2018 12:05:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 3d8e7b1..480499c 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -69,6 +69,12 @@ + + + + + diff --git a/src/domain.c b/src/domain.c index f482bb9..fee4a2c 100644 --- a/src/domain.c +++ b/src/domain.c @@ -434,6 +434,30 @@ virtDBusDomainBlockCommit(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainBlockJobAbort(GVariant *inArgs G_GNUC_UNUSED, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs G_GNUC_UNUSED, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + guint flags; + + g_variant_get(inArgs, "(&su)", &disk, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainBlockJobAbort(domain, disk, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainBlockPeek(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1331,6 +1355,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "AddIOThread", virtDBusDomainAddIOThread }, { "AttachDevice", virtDBusDomainAttachDevice }, { "BlockCommit", virtDBusDomainBlockCommit }, + { "BlockJobAbort", virtDBusDomainBlockJobAbort }, { "BlockPeek", virtDBusDomainBlockPeek }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152396670519144.85852925627523; Tue, 17 Apr 2018 05:05:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64B523187147; Tue, 17 Apr 2018 12:05:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E06765B52; Tue, 17 Apr 2018 12:05:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2F4CE181D0BE; Tue, 17 Apr 2018 12:04:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4qHb004121 for ; Tue, 17 Apr 2018 08:04:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D39F215CDCF; Tue, 17 Apr 2018 12:04:52 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3ECA215CDC8 for ; Tue, 17 Apr 2018 12:04:51 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:28 +0200 Message-Id: <20180417120444.17541-10-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 09/25] Implement BlockPull method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Apr 2018 12:05:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 480499c..46a6632 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -84,6 +84,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index fee4a2c..af8cc73 100644 --- a/src/domain.c +++ b/src/domain.c @@ -496,6 +496,31 @@ virtDBusDomainBlockPeek(GVariant *inArgs, *outArgs =3D g_variant_new_tuple(&res, 1); } =20 +static void +virtDBusDomainBlockPull(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + gulong bandwidth; + guint flags; + + g_variant_get(inArgs, "(&stu)", &disk, &bandwidth, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainBlockPull(domain, disk, bandwidth, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1357,6 +1382,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "BlockCommit", virtDBusDomainBlockCommit }, { "BlockJobAbort", virtDBusDomainBlockJobAbort }, { "BlockPeek", virtDBusDomainBlockPeek }, + { "BlockPull", virtDBusDomainBlockPull }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966709707403.36863143990365; Tue, 17 Apr 2018 05:05:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DEE3C04C273; Tue, 17 Apr 2018 12:05:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 278AB17D3E; Tue, 17 Apr 2018 12:05:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9F2B6ADA7F; Tue, 17 Apr 2018 12:05:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4qm6004131 for ; Tue, 17 Apr 2018 08:04:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6881215CDCB; Tue, 17 Apr 2018 12:04:52 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79965215CDC8 for ; Tue, 17 Apr 2018 12:04:52 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:29 +0200 Message-Id: <20180417120444.17541-11-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 10/25] Implement BlockRebase method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 Apr 2018 12:05:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 8 ++++++++ src/domain.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 46a6632..f5c7fb0 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -91,6 +91,14 @@ + + + + + + + diff --git a/src/domain.c b/src/domain.c index af8cc73..107355e 100644 --- a/src/domain.c +++ b/src/domain.c @@ -521,6 +521,34 @@ virtDBusDomainBlockPull(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainBlockRebase(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + const gchar *base; + gulong bandwidth; + guint flags; + + g_variant_get(inArgs, "(&s&stu)", &disk, &base, &bandwidth, &flags); + if (g_strcmp0(base, "") =3D=3D 0) + base =3D NULL; + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainBlockRebase(domain, disk, base, bandwidth, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1383,6 +1411,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "BlockJobAbort", virtDBusDomainBlockJobAbort }, { "BlockPeek", virtDBusDomainBlockPeek }, { "BlockPull", virtDBusDomainBlockPull }, + { "BlockRebase", virtDBusDomainBlockRebase }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966752175330.71735654134113; Tue, 17 Apr 2018 05:05:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF51F3137734; Tue, 17 Apr 2018 12:05:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A1B117C4A; Tue, 17 Apr 2018 12:05:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 730A9ADABE; Tue, 17 Apr 2018 12:05:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4rll004136 for ; Tue, 17 Apr 2018 08:04:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7BE76215CDCF; Tue, 17 Apr 2018 12:04:53 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F279215CDC8 for ; Tue, 17 Apr 2018 12:04:52 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:30 +0200 Message-Id: <20180417120444.17541-12-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 11/25] Implement BlockResize method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 17 Apr 2018 12:05:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index f5c7fb0..c7fb637 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -99,6 +99,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 107355e..191d9e8 100644 --- a/src/domain.c +++ b/src/domain.c @@ -549,6 +549,31 @@ virtDBusDomainBlockRebase(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainBlockResize(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *disk; + gulong size; + guint flags; + + g_variant_get(inArgs, "(&stu)", &disk, &size, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainBlockResize(domain, disk, size, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1412,6 +1437,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "BlockPeek", virtDBusDomainBlockPeek }, { "BlockPull", virtDBusDomainBlockPull }, { "BlockRebase", virtDBusDomainBlockRebase }, + { "BlockResize", virtDBusDomainBlockResize }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966731407843.2876948661785; Tue, 17 Apr 2018 05:05:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C25F45F7AD; Tue, 17 Apr 2018 12:05:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F94069CA9; Tue, 17 Apr 2018 12:05:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 141B31864DD7; Tue, 17 Apr 2018 12:05:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4sOR004147 for ; Tue, 17 Apr 2018 08:04:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2C38E215CDCB; Tue, 17 Apr 2018 12:04:54 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id C30AD215CDC8 for ; Tue, 17 Apr 2018 12:04:53 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:31 +0200 Message-Id: <20180417120444.17541-13-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 12/25] Implement CoreDumpWithFormat method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 17 Apr 2018 12:05:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: J=EF=BF=BDn Tomko --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index c7fb637..05f4da9 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -106,6 +106,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 191d9e8..7c87133 100644 --- a/src/domain.c +++ b/src/domain.c @@ -574,6 +574,31 @@ virtDBusDomainBlockResize(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainCoreDumpWithFormat(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *to; + guint dumpformat; + guint flags; + + g_variant_get(inArgs, "(&suu)", &to, &dumpformat, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainCoreDumpWithFormat(domain, to, dumpformat, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1438,6 +1463,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "BlockPull", virtDBusDomainBlockPull }, { "BlockRebase", virtDBusDomainBlockRebase }, { "BlockResize", virtDBusDomainBlockResize }, + { "CoreDumpWithFormat", virtDBusDomainCoreDumpWithFormat }, { "Create", virtDBusDomainCreate }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966716009243.15078905186715; Tue, 17 Apr 2018 05:05:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7168313064E; Tue, 17 Apr 2018 12:05:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77D2869C88; Tue, 17 Apr 2018 12:05:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08C5F1864DCE; Tue, 17 Apr 2018 12:05:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4sWY004156 for ; Tue, 17 Apr 2018 08:04:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id C5A9D215CDCB; Tue, 17 Apr 2018 12:04:54 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68FF5215CDC8 for ; Tue, 17 Apr 2018 12:04:54 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:32 +0200 Message-Id: <20180417120444.17541-14-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 13/25] Implement DelIOThread method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 17 Apr 2018 12:05:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 05f4da9..fb2bcce 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -118,6 +118,12 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virDomainCreateWithFlags"/> + + + + + diff --git a/src/domain.c b/src/domain.c index 7c87133..2fd8343 100644 --- a/src/domain.c +++ b/src/domain.c @@ -622,6 +622,30 @@ virtDBusDomainCreate(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainDelIOThread(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint iothreadId; + guint flags; + + g_variant_get(inArgs, "(uu)", &iothreadId, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainDelIOThread(domain, iothreadId, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainDestroy(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1465,6 +1489,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "BlockResize", virtDBusDomainBlockResize }, { "CoreDumpWithFormat", virtDBusDomainCoreDumpWithFormat }, { "Create", virtDBusDomainCreate }, + { "DelIOThread", virtDBusDomainDelIOThread }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, { "GetBlkioParameters", virtDBusDomainGetBlkioParameters }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966738156391.37967263383894; Tue, 17 Apr 2018 05:05:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB0A1312AC7B; Tue, 17 Apr 2018 12:05:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 793C26A237; Tue, 17 Apr 2018 12:05:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7F250B349A; Tue, 17 Apr 2018 12:05:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4tV2004180 for ; Tue, 17 Apr 2018 08:04:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6ACA0215CDCB; Tue, 17 Apr 2018 12:04:55 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E27B215CDC8 for ; Tue, 17 Apr 2018 12:04:54 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:33 +0200 Message-Id: <20180417120444.17541-15-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 14/25] Implement FSFreeze method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 17 Apr 2018 12:05:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index fb2bcce..66cf5e2 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -135,6 +135,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 2fd8343..04115d1 100644 --- a/src/domain.c +++ b/src/domain.c @@ -693,6 +693,45 @@ virtDBusDomainDetachDevice(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainFSFreeze(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + g_autofree const gchar **mountpoints =3D NULL; + GVariantIter *iter; + gsize nmountpoints =3D 0; + guint flags; + gint ret; + + g_variant_get(inArgs, "(asu)", &iter, &flags); + + nmountpoints =3D g_variant_iter_n_children(iter); + if (nmountpoints) { + mountpoints =3D g_new0(const gchar*, nmountpoints + 1); + while (g_variant_iter_loop(iter, "s", &mountpoints[nmountpoints-1]= )) + nmountpoints++; + nmountpoints--; + g_variant_iter_free(iter); + } + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + ret =3D virDomainFSFreeze(domain, (const gchar **)mountpoints, nmountp= oints, flags); + if (ret < 0) + virtDBusUtilSetLastVirtError(error); + + *outArgs =3D g_variant_new("(u)", ret); +} + static void virtDBusDomainGetBlkioParameters(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1492,6 +1531,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "DelIOThread", virtDBusDomainDelIOThread }, { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, + { "FSFreeze", virtDBusDomainFSFreeze }, { "GetBlkioParameters", virtDBusDomainGetBlkioParameters }, { "GetControlInfo", virtDBusDomainGetControlInfo }, { "GetJobInfo", virtDBusDomainGetJobInfo }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966708994578.6556801692012; Tue, 17 Apr 2018 05:05:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4A79C01CB71; Tue, 17 Apr 2018 12:05:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 993E47D64E; Tue, 17 Apr 2018 12:05:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0EFF8181D0B4; Tue, 17 Apr 2018 12:05:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4uLe004188 for ; Tue, 17 Apr 2018 08:04:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 10538215CDCB; Tue, 17 Apr 2018 12:04:56 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7A3D215CDC8 for ; Tue, 17 Apr 2018 12:04:55 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:34 +0200 Message-Id: <20180417120444.17541-16-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 15/25] Implement FSThaw method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 Apr 2018 12:05:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 66cf5e2..367bc00 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -142,6 +142,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 04115d1..a0feea9 100644 --- a/src/domain.c +++ b/src/domain.c @@ -732,6 +732,45 @@ virtDBusDomainFSFreeze(GVariant *inArgs, *outArgs =3D g_variant_new("(u)", ret); } =20 +static void +virtDBusDomainFSThaw(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + g_autofree const gchar **mountpoints =3D NULL; + GVariantIter *iter; + guint nmountpoints; + guint flags; + gint ret; + + g_variant_get(inArgs, "(asu)", &iter, &flags); + + nmountpoints =3D g_variant_iter_n_children(iter); + if (nmountpoints) { + mountpoints =3D g_new0(const gchar*, nmountpoints + 1); + while (g_variant_iter_loop(iter, "s", &mountpoints[nmountpoints-1]= )) + nmountpoints++; + nmountpoints--; + g_variant_iter_free(iter); + } + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + ret =3D virDomainFSThaw(domain, (const gchar **)mountpoints, nmountpoi= nts, flags); + if (ret < 0) + virtDBusUtilSetLastVirtError(error); + + *outArgs =3D g_variant_new("(u)", ret); +} + static void virtDBusDomainGetBlkioParameters(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1532,6 +1571,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Destroy", virtDBusDomainDestroy }, { "DetachDevice", virtDBusDomainDetachDevice }, { "FSFreeze", virtDBusDomainFSFreeze }, + { "FSThaw", virtDBusDomainFSThaw }, { "GetBlkioParameters", virtDBusDomainGetBlkioParameters }, { "GetControlInfo", virtDBusDomainGetControlInfo }, { "GetJobInfo", virtDBusDomainGetJobInfo }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966754285645.1922110802203; Tue, 17 Apr 2018 05:05:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7C23C008B1B; Tue, 17 Apr 2018 12:05:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 713C16B245; Tue, 17 Apr 2018 12:05:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E45C2181D0B9; Tue, 17 Apr 2018 12:05:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4ua1004197 for ; Tue, 17 Apr 2018 08:04:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id A93B1215CDCB; Tue, 17 Apr 2018 12:04:56 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C902215CDC8 for ; Tue, 17 Apr 2018 12:04:56 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:35 +0200 Message-Id: <20180417120444.17541-17-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 16/25] Implement FSTrim method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 17 Apr 2018 12:05:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 367bc00..6d4ffa5 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -149,6 +149,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index a0feea9..f0e7f28 100644 --- a/src/domain.c +++ b/src/domain.c @@ -771,6 +771,33 @@ virtDBusDomainFSThaw(GVariant *inArgs, *outArgs =3D g_variant_new("(u)", ret); } =20 +static void +virtDBusDomainFSTrim(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *mountpoint; + gulong minimum; + guint flags; + + g_variant_get(inArgs, "(stu)", &mountpoint, &minimum, &flags); + if (g_strcmp0(mountpoint, "") =3D=3D 0) + mountpoint =3D NULL; + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainFSTrim(domain, mountpoint, minimum, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainGetBlkioParameters(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1572,6 +1599,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "DetachDevice", virtDBusDomainDetachDevice }, { "FSFreeze", virtDBusDomainFSFreeze }, { "FSThaw", virtDBusDomainFSThaw }, + { "FSTrim", virtDBusDomainFSTrim }, { "GetBlkioParameters", virtDBusDomainGetBlkioParameters }, { "GetControlInfo", virtDBusDomainGetControlInfo }, { "GetJobInfo", virtDBusDomainGetJobInfo }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966747965859.7853616676381; Tue, 17 Apr 2018 05:05:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CE557F7A2; Tue, 17 Apr 2018 12:05:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCC8369CA6; Tue, 17 Apr 2018 12:05:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B421EB34A1; Tue, 17 Apr 2018 12:05:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4vKv004205 for ; Tue, 17 Apr 2018 08:04:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4F86A215CDCB; Tue, 17 Apr 2018 12:04:57 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6277215CDC8 for ; Tue, 17 Apr 2018 12:04:56 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:36 +0200 Message-Id: <20180417120444.17541-18-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 17/25] Implement MigrateStartPostCopy method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 17 Apr 2018 12:05:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 5 +++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 6d4ffa5..f2ef3dd 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -263,6 +263,11 @@ + + + + diff --git a/src/domain.c b/src/domain.c index f0e7f28..f50043d 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1339,6 +1339,30 @@ virtDBusDomainMigrateSetMaxSpeed(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainMigrateStartPostCopy(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint flags; + + g_variant_get(inArgs, "(u)", &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainMigrateStartPostCopy(domain, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainReboot(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1618,6 +1642,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "MigrateGetMaxSpeed", virtDBusDomainMigrateGetMaxSpeed }, { "MigrateSetMaxDowntime", virtDBusDomainMigrateSetMaxDowntime }, { "MigrateSetMaxSpeed", virtDBusDomainMigrateSetMaxSpeed }, + { "MigrateStartPostCopy", virtDBusDomainMigrateStartPostCopy }, { "Reboot", virtDBusDomainReboot }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966716419119.22155280057348; Tue, 17 Apr 2018 05:05:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 811AA28144; Tue, 17 Apr 2018 12:05:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C8B667F1E; Tue, 17 Apr 2018 12:05:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 093211864DCF; Tue, 17 Apr 2018 12:05:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4wgo004216 for ; Tue, 17 Apr 2018 08:04:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id E819A215CDCB; Tue, 17 Apr 2018 12:04:57 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B2D8215CDC8 for ; Tue, 17 Apr 2018 12:04:57 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:37 +0200 Message-Id: <20180417120444.17541-19-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 18/25] Implement PinEmulator method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 17 Apr 2018 12:05:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index f2ef3dd..97c5471 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -268,6 +268,12 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virDomainMigrateStartPostCopy"/> + + + + + diff --git a/src/domain.c b/src/domain.c index f50043d..92799ac 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1363,6 +1363,39 @@ virtDBusDomainMigrateStartPostCopy(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainPinEmulator(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + g_autofree const guchar *cpumap =3D NULL; + gsize maplen; + guint flags; + GVariant *v; + + v =3D g_variant_get_child_value(inArgs, 0); + cpumap =3D g_variant_get_fixed_array(v, &maplen, sizeof(guchar)); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 1); + flags =3D g_variant_get_uint32(v); + g_variant_unref(v); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainPinEmulator(domain, (guchar *)cpumap, maplen, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainReboot(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1643,6 +1676,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "MigrateSetMaxDowntime", virtDBusDomainMigrateSetMaxDowntime }, { "MigrateSetMaxSpeed", virtDBusDomainMigrateSetMaxSpeed }, { "MigrateStartPostCopy", virtDBusDomainMigrateStartPostCopy }, + { "PinEmulator", virtDBusDomainPinEmulator }, { "Reboot", virtDBusDomainReboot }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966748627731.3156546926401; Tue, 17 Apr 2018 05:05:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6627C04D2AD; Tue, 17 Apr 2018 12:05:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5DDA15F716; Tue, 17 Apr 2018 12:05:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 91C87B34A9; Tue, 17 Apr 2018 12:05:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4wd7004225 for ; Tue, 17 Apr 2018 08:04:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8C2AF215CDCB; Tue, 17 Apr 2018 12:04:58 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 300B7215CDC8 for ; Tue, 17 Apr 2018 12:04:58 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:38 +0200 Message-Id: <20180417120444.17541-20-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 19/25] Implement PinIOThread method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 17 Apr 2018 12:05:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 97c5471..9490654 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -274,6 +274,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 92799ac..60dab7e 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1396,6 +1396,44 @@ virtDBusDomainPinEmulator(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainPinIOThread(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + guint iothreadId; + g_autofree const guchar *cpumap =3D NULL; + gsize maplen; + guint flags; + GVariant *v; + + v =3D g_variant_get_child_value(inArgs, 0); + iothreadId =3D g_variant_get_uint32(v); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 1); + cpumap =3D g_variant_get_fixed_array(v, &maplen, sizeof(guchar)); + g_variant_unref(v); + + v =3D g_variant_get_child_value(inArgs, 2); + flags =3D g_variant_get_uint32(v); + g_variant_unref(v); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainPinIOThread(domain, iothreadId, (guchar *)cpumap, maplen,= flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainReboot(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1677,6 +1715,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "MigrateSetMaxSpeed", virtDBusDomainMigrateSetMaxSpeed }, { "MigrateStartPostCopy", virtDBusDomainMigrateStartPostCopy }, { "PinEmulator", virtDBusDomainPinEmulator }, + { "PinIOThread", virtDBusDomainPinIOThread }, { "Reboot", virtDBusDomainReboot }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966743908706.8961471796736; Tue, 17 Apr 2018 05:05:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 832F53133E77; Tue, 17 Apr 2018 12:05:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5576B182F2; Tue, 17 Apr 2018 12:05:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 437CD181D0C1; Tue, 17 Apr 2018 12:05:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4xHO004241 for ; Tue, 17 Apr 2018 08:04:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 31947215CDC8; Tue, 17 Apr 2018 12:04:59 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8E1A215CDCF for ; Tue, 17 Apr 2018 12:04:58 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:39 +0200 Message-Id: <20180417120444.17541-21-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 20/25] Implement Rename method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Apr 2018 12:05:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 9490654..f68cc39 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -286,6 +286,12 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virDomainReboot"/> + + + + + diff --git a/src/domain.c b/src/domain.c index 60dab7e..2a27667 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1458,6 +1458,31 @@ virtDBusDomainReboot(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainRename(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *name; + guint flags; + + g_variant_get(inArgs, "(&su)", &name, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainRename(domain, name, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainReset(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1717,6 +1742,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "PinEmulator", virtDBusDomainPinEmulator }, { "PinIOThread", virtDBusDomainPinIOThread }, { "Reboot", virtDBusDomainReboot }, + { "Rename", virtDBusDomainRename }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, { "SendKey", virtDBusDomainSendKey }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966754008834.3349043969697; Tue, 17 Apr 2018 05:05:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5BF6312CD21; Tue, 17 Apr 2018 12:05:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 048A47D650; Tue, 17 Apr 2018 12:05:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 79A6E187520B; Tue, 17 Apr 2018 12:05:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC4xKg004255 for ; Tue, 17 Apr 2018 08:05:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB259215CDC8; Tue, 17 Apr 2018 12:04:59 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E3BC215CDCB for ; Tue, 17 Apr 2018 12:04:59 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:40 +0200 Message-Id: <20180417120444.17541-22-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 21/25] Implement DomainRestore method for Connect Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 17 Apr 2018 12:05:53 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Connect.xml | 7 +++++++ src/connect.c | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 55260cc..04ac2de 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -56,6 +56,13 @@ + + + + + + diff --git a/src/connect.c b/src/connect.c index a8ff43c..97e4d9c 100644 --- a/src/connect.c +++ b/src/connect.c @@ -347,6 +347,32 @@ virtDBusConnectDomainLookupByUUID(GVariant *inArgs, *outArgs =3D g_variant_new("(o)", path); } =20 +static void +virtDBusConnectDomainRestoreFlags(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **outArgs G_GNUC_UNUSED, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *from; + const gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&s&su)", &from, &xml, &flags); + if (g_strcmp0(xml, "") =3D=3D 0) + xml =3D NULL; + + if (!virtDBusConnectOpen(connect, error)) + return; + + if (virDomainRestoreFlags(connect->connection, from, xml, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusConnectGetSysinfo(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -580,6 +606,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTa= ble[] =3D { { "DomainLookupByID", virtDBusConnectDomainLookupByID }, { "DomainLookupByName", virtDBusConnectDomainLookupByName }, { "DomainLookupByUUID", virtDBusConnectDomainLookupByUUID }, + { "DomainRestore", virtDBusConnectDomainRestoreFlags }, { "GetCapabilities", virtDBusConnectGetCapabilities }, { "GetSysinfo", virtDBusConnectGetSysinfo }, { "ListDomains", virtDBusConnectListDomains }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966752443526.1852177498603; Tue, 17 Apr 2018 05:05:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 019DA31343CB; Tue, 17 Apr 2018 12:05:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1C3E18210; Tue, 17 Apr 2018 12:05:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 87ACEB34B3; Tue, 17 Apr 2018 12:05:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC50Gl004261 for ; Tue, 17 Apr 2018 08:05:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6F431215CDC8; Tue, 17 Apr 2018 12:05:00 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12A0F215CDCB for ; Tue, 17 Apr 2018 12:04:59 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:41 +0200 Message-Id: <20180417120444.17541-23-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 22/25] Implement Save method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Apr 2018 12:05:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index f68cc39..bc8a6eb 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -301,6 +301,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index 2a27667..c30e9b5 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1527,6 +1527,33 @@ virtDBusDomainResume(GVariant *inArgs G_GNUC_UNUSED, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainSave(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *to; + const gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&s&su)", &to, &xml, &flags); + if (g_strcmp0(xml, "") =3D=3D 0) + xml =3D NULL; + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainSaveFlags(domain, to, xml, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainSendKey(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1745,6 +1772,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Rename", virtDBusDomainRename }, { "Reset", virtDBusDomainReset }, { "Resume", virtDBusDomainResume }, + { "Save", virtDBusDomainSave }, { "SendKey", virtDBusDomainSendKey }, { "SetVcpus", virtDBusDomainSetVcpus }, { "SetMemory", virtDBusDomainSetMemory }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966750910102.16292823427284; Tue, 17 Apr 2018 05:05:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5173A62E86; Tue, 17 Apr 2018 12:05:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 134D518021; Tue, 17 Apr 2018 12:05:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1C33418521CC; Tue, 17 Apr 2018 12:05:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC51dJ004275 for ; Tue, 17 Apr 2018 08:05:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 13073215CDC8; Tue, 17 Apr 2018 12:05:01 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB0F2215CDCB for ; Tue, 17 Apr 2018 12:05:00 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:42 +0200 Message-Id: <20180417120444.17541-24-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 23/25] Implement DomainSaveImageDefineXML method for Connect Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 17 Apr 2018 12:05:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Connect.xml | 7 +++++++ src/connect.c | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 04ac2de..d2c77c1 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -63,6 +63,13 @@ + + + + + + diff --git a/src/connect.c b/src/connect.c index 97e4d9c..af3d460 100644 --- a/src/connect.c +++ b/src/connect.c @@ -373,6 +373,30 @@ virtDBusConnectDomainRestoreFlags(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusConnectDomainSaveImageDefineXML(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath G_GNUC_UNU= SED, + gpointer userData, + GVariant **outArgs G_GNUC_UNUSED, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *file; + const gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&s&su)", &file, &xml, &flags); + + if (!virtDBusConnectOpen(connect, error)) + return; + + if (virDomainSaveImageDefineXML(connect->connection, file, xml, flags)= < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusConnectGetSysinfo(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -607,6 +631,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTa= ble[] =3D { { "DomainLookupByName", virtDBusConnectDomainLookupByName }, { "DomainLookupByUUID", virtDBusConnectDomainLookupByUUID }, { "DomainRestore", virtDBusConnectDomainRestoreFlags }, + { "DomainSaveImageDefineXML", virtDBusConnectDomainSaveImageDefineXML = }, { "GetCapabilities", virtDBusConnectGetCapabilities }, { "GetSysinfo", virtDBusConnectGetSysinfo }, { "ListDomains", virtDBusConnectListDomains }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966729453442.21841454787557; Tue, 17 Apr 2018 05:05:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F0683160E53; Tue, 17 Apr 2018 12:05:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C8D4A7BCB8; Tue, 17 Apr 2018 12:05:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0F2971864DD5; Tue, 17 Apr 2018 12:05:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC51hR004289 for ; Tue, 17 Apr 2018 08:05:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC385215CDC8; Tue, 17 Apr 2018 12:05:01 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FB04215CDCB for ; Tue, 17 Apr 2018 12:05:01 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:43 +0200 Message-Id: <20180417120444.17541-25-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 24/25] Implement SendProcessSignal method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 17 Apr 2018 12:05:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 7 +++++++ src/domain.c | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index bc8a6eb..5c08756 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -316,6 +316,13 @@ + + + + + + diff --git a/src/domain.c b/src/domain.c index c30e9b5..1cca5df 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1599,6 +1599,32 @@ virtDBusDomainSendKey(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainSendProcessSignal(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + gint64 pidValue; + guint sigNum; + guint flags; + + g_variant_get(inArgs, "(xuu)", &pidValue, &sigNum, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainSendProcessSignal(domain, pidValue, sigNum, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainSetMemory(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1774,6 +1800,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Resume", virtDBusDomainResume }, { "Save", virtDBusDomainSave }, { "SendKey", virtDBusDomainSendKey }, + { "SendProcessSignal", virtDBusDomainSendProcessSignal }, { "SetVcpus", virtDBusDomainSetVcpus }, { "SetMemory", virtDBusDomainSetMemory }, { "Shutdown", virtDBusDomainShutdown }, --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 19:08:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523966756357345.26669534016924; Tue, 17 Apr 2018 05:05:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9EAFB31343A0; Tue, 17 Apr 2018 12:05:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F6F9691FE; Tue, 17 Apr 2018 12:05:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6E0CE1864DD4; Tue, 17 Apr 2018 12:05:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HC54sN004311 for ; Tue, 17 Apr 2018 08:05:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 05BE4215CDCB; Tue, 17 Apr 2018 12:05:04 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.34.245.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D844215CDC8 for ; Tue, 17 Apr 2018 12:05:01 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Tue, 17 Apr 2018 14:04:44 +0200 Message-Id: <20180417120444.17541-26-kkoukiou@redhat.com> In-Reply-To: <20180417120444.17541-1-kkoukiou@redhat.com> References: <20180417120444.17541-1-kkoukiou@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 25/25] Implement UpdateDevice method for Domain Interface X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 17 Apr 2018 12:05:54 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Katerina Koukiou Reviewed-by: Pavel Hrdina --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 5c08756..60d01d4 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -349,6 +349,12 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virDomainUndefineFlags"/> + + + + + diff --git a/src/domain.c b/src/domain.c index 1cca5df..b1343aa 100644 --- a/src/domain.c +++ b/src/domain.c @@ -1741,6 +1741,30 @@ virtDBusDomainUndefine(GVariant *inArgs, virtDBusUtilSetLastVirtError(error); } =20 +static void +virtDBusDomainUpdateDevice(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 =3D userData; + g_autoptr(virDomain) domain =3D NULL; + const gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&su)", &xml, &flags); + + domain =3D virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainUpdateDeviceFlags(domain, xml, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static virtDBusGDBusPropertyTable virtDBusDomainPropertyTable[] =3D { { "Active", virtDBusDomainGetActive, NULL }, { "Autostart", virtDBusDomainGetAutostart, virtDBusDomainSetAutostart = }, @@ -1806,6 +1830,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodT= able[] =3D { { "Shutdown", virtDBusDomainShutdown }, { "Suspend", virtDBusDomainSuspend }, { "Undefine", virtDBusDomainUndefine }, + { "UpdateDevice", virtDBusDomainUpdateDevice }, { 0 } }; =20 --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list