From nobody Sun May 5 11:56:26 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 1525973183566769.713231925866; Thu, 10 May 2018 10:26:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B4B50820EB; Thu, 10 May 2018 17:26:21 +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 7C0853001B8D; Thu, 10 May 2018 17:26:21 +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 8375A180B536; Thu, 10 May 2018 17:26:20 +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 w4AHQHhg020499 for ; Thu, 10 May 2018 13:26:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 808662166BB2; Thu, 10 May 2018 17:26:17 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24E122166BAD for ; Thu, 10 May 2018 17:26:17 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:53 +0200 Message-Id: <20180510172614.11687-2-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] Implement StoragePoolCreateXML 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 10 May 2018 17:26:22 +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 | 31 +++++++++++++++++++++++++++++++ tests/test_connect.py | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 243ef35..2f88d42 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -251,6 +251,13 @@ + + + + + + diff --git a/src/connect.c b/src/connect.c index 0b33bc5..a6163d2 100644 --- a/src/connect.c +++ b/src/connect.c @@ -1276,6 +1276,36 @@ virtDBusConnectSecretLookupByUsage(GVariant *inArgs, *outArgs =3D g_variant_new("(o)", path); } =20 +static void +virtDBusConnectStoragePoolCreateXML(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virStoragePool) storagePool =3D NULL; + g_autofree gchar *path =3D NULL; + gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&su)", &xml, &flags); + + if (!virtDBusConnectOpen(connect, error)) + return; + + storagePool =3D virStoragePoolCreateXML(connect->connection, xml, flag= s); + if (!storagePool) + return virtDBusUtilSetLastVirtError(error); + + path =3D virtDBusUtilBusPathForVirStoragePool(storagePool, + connect->storagePoolPath); + + *outArgs =3D g_variant_new("(o)", path); +} + static void virtDBusConnectStoragePoolLookupByName(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1379,6 +1409,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethod= Table[] =3D { { "SecretDefineXML", virtDBusConnectSecretDefineXML }, { "SecretLookupByUUID", virtDBusConnectSecretLookupByUUID }, { "SecretLookupByUsage", virtDBusConnectSecretLookupByUsage }, + { "StoragePoolCreateXML", virtDBusConnectStoragePoolCreateXML }, { "StoragePoolLookupByName", virtDBusConnectStoragePoolLookupByName }, { "StoragePoolLookupByUUID", virtDBusConnectStoragePoolLookupByUUID }, { 0 } diff --git a/tests/test_connect.py b/tests/test_connect.py index 8104a30..6e28b81 100755 --- a/tests/test_connect.py +++ b/tests/test_connect.py @@ -30,6 +30,24 @@ class TestConnect(libvirttest.BaseTestClass): ''' =20 + minimal_storage_pool_xml =3D ''' + + foo + 35bb2ad9-388a-cdfe-461a-b8907f6e53fe + 107374182400 + 0 + 107374182400 + + /foo + + 0700 + 10736 + 10736 + + + + ''' + def test_connect_domain_create_xml(self): def domain_started(path, event, detail): if event !=3D libvirttest.DomainEvent.STARTED: @@ -190,6 +208,21 @@ class TestConnect(libvirttest.BaseTestClass): info =3D self.connect.NodeGetCPUMap(0) assert isinstance(info, dbus.Array) =20 + def test_connect_storage_pool_create_xml(self): + def storage_pool_started(path, event, _detail): + if event !=3D libvirttest.StoragePoolEvent.STARTED: + return + assert isinstance(path, dbus.ObjectPath) + self.loop.quit() + + self.connect.connect_to_signal('StoragePoolEvent', storage_pool_st= arted) + + path =3D self.connect.StoragePoolCreateXML( + self.minimal_storage_pool_xml, 0) + assert isinstance(path, dbus.ObjectPath) + + self.main_loop() + @pytest.mark.parametrize("lookup_method_name,lookup_item", [ ("StoragePoolLookupByName", 'Name'), ("StoragePoolLookupByUUID", 'UUID'), --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973186112950.7312446612682; Thu, 10 May 2018 10:26:26 -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 52DA731524C9; Thu, 10 May 2018 17:26:24 +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 1A59460C9A; Thu, 10 May 2018 17:26:24 +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 BCED64CA94; Thu, 10 May 2018 17:26: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 w4AHQI2J020511 for ; Thu, 10 May 2018 13:26:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 710D42166BB2; Thu, 10 May 2018 17:26:18 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id BAF062166BAD for ; Thu, 10 May 2018 17:26:17 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:54 +0200 Message-Id: <20180510172614.11687-3-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] Implement StoragePoolDefineXML 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 10 May 2018 17:26:25 +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 | 31 +++++++++++++++++++++++++++++++ tests/test_connect.py | 15 +++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 2f88d42..7b0a73e 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -258,6 +258,13 @@ + + + + + + diff --git a/src/connect.c b/src/connect.c index a6163d2..0ee532e 100644 --- a/src/connect.c +++ b/src/connect.c @@ -1306,6 +1306,36 @@ virtDBusConnectStoragePoolCreateXML(GVariant *inArgs, *outArgs =3D g_variant_new("(o)", path); } =20 +static void +virtDBusConnectStoragePoolDefineXML(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **outArgs, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect =3D userData; + g_autoptr(virStoragePool) storagePool =3D NULL; + g_autofree gchar *path =3D NULL; + gchar *xml; + guint flags; + + g_variant_get(inArgs, "(&su)", &xml, &flags); + + if (!virtDBusConnectOpen(connect, error)) + return; + + storagePool =3D virStoragePoolDefineXML(connect->connection, xml, flag= s); + if (!storagePool) + return virtDBusUtilSetLastVirtError(error); + + path =3D virtDBusUtilBusPathForVirStoragePool(storagePool, + connect->storagePoolPath); + + *outArgs =3D g_variant_new("(o)", path); +} + static void virtDBusConnectStoragePoolLookupByName(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1410,6 +1440,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethod= Table[] =3D { { "SecretLookupByUUID", virtDBusConnectSecretLookupByUUID }, { "SecretLookupByUsage", virtDBusConnectSecretLookupByUsage }, { "StoragePoolCreateXML", virtDBusConnectStoragePoolCreateXML }, + { "StoragePoolDefineXML", virtDBusConnectStoragePoolDefineXML }, { "StoragePoolLookupByName", virtDBusConnectStoragePoolLookupByName }, { "StoragePoolLookupByUUID", virtDBusConnectStoragePoolLookupByUUID }, { 0 } diff --git a/tests/test_connect.py b/tests/test_connect.py index 6e28b81..4becf4e 100755 --- a/tests/test_connect.py +++ b/tests/test_connect.py @@ -223,6 +223,21 @@ class TestConnect(libvirttest.BaseTestClass): =20 self.main_loop() =20 + def test_connect_storage_pool_define_xml(self): + def storage_pool_defined(path, event, _detail): + if event !=3D libvirttest.StoragePoolEvent.DEFINED: + return + assert isinstance(path, dbus.ObjectPath) + self.loop.quit() + + self.connect.connect_to_signal('StoragePoolEvent', storage_pool_de= fined) + + path =3D self.connect.StoragePoolDefineXML( + self.minimal_storage_pool_xml, 0) + assert isinstance(path, dbus.ObjectPath) + + self.main_loop() + @pytest.mark.parametrize("lookup_method_name,lookup_item", [ ("StoragePoolLookupByName", 'Name'), ("StoragePoolLookupByUUID", 'UUID'), --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973192367806.2066576157641; Thu, 10 May 2018 10:26:32 -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 C9634C05166B; Thu, 10 May 2018 17:26:30 +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 7AF465E7CC; Thu, 10 May 2018 17:26:30 +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 264B64BB78; Thu, 10 May 2018 17:26:30 +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 w4AHQJ1V020530 for ; Thu, 10 May 2018 13:26:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 159502166BB2; Thu, 10 May 2018 17:26:19 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADA552166BAD for ; Thu, 10 May 2018 17:26:18 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:55 +0200 Message-Id: <20180510172614.11687-4-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_STORAGE_POOL_EVENT_ID_REFRESH 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.31]); Thu, 10 May 2018 17:26:31 +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.StoragePool.xml | 4 ++++ src/events.c | 27 +++++++++++++++++++++++++++ tests/test_storage.py | 10 ++++++++++ 3 files changed, 41 insertions(+) diff --git a/data/org.libvirt.StoragePool.xml b/data/org.libvirt.StoragePoo= l.xml index f33ed38..01ab39d 100644 --- a/data/org.libvirt.StoragePool.xml +++ b/data/org.libvirt.StoragePool.xml @@ -66,5 +66,9 @@ + + + diff --git a/src/events.c b/src/events.c index 53cd725..5880b1b 100644 --- a/src/events.c +++ b/src/events.c @@ -1,6 +1,7 @@ #include "domain.h" #include "events.h" #include "util.h" +#include "storagepool.h" =20 #include =20 @@ -190,6 +191,28 @@ virtDBusEventsStoragePoolLifecycle(virConnectPtr conne= ction G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsStoragePoolRefresh(virConnectPtr connection G_GNUC_UNUSED, + virStoragePoolPtr storagePool, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirStoragePool(storagePool, + connect->storagePoolPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_STORAGEPOOL_INTERFACE, + "Refresh", + NULL, + NULL); + + return 0; +} + static void virtDBusEventsRegisterDomainEvent(virtDBusConnect *connect, gint id, @@ -284,4 +307,8 @@ virtDBusEventsRegister(virtDBusConnect *connect) virtDBusEventsRegisterStoragePoolEvent(connect, VIR_STORAGE_POOL_EVENT_ID_LIFEC= YCLE, VIR_STORAGE_POOL_EVENT_CALLBACK= (virtDBusEventsStoragePoolLifecycle)); + + virtDBusEventsRegisterStoragePoolEvent(connect, + VIR_STORAGE_POOL_EVENT_ID_REFRE= SH, + VIR_STORAGE_POOL_EVENT_CALLBACK= (virtDBusEventsStoragePoolRefresh)); } diff --git a/tests/test_storage.py b/tests/test_storage.py index d1d393f..b9e7090 100755 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -108,6 +108,16 @@ class TestStoragePool(libvirttest.BaseTestClass): =20 self.main_loop() =20 + def test_storage_pool_refresh(self): + _, test_storage_pool =3D self.test_storage_pool() + interface_obj =3D dbus.Interface(test_storage_pool, + 'org.libvirt.StoragePool') + interface_obj.connect_to_signal('Refresh', + lambda: self.loop.quit()) + interface_obj.Refresh(0) + + self.main_loop() + =20 if __name__ =3D=3D '__main__': libvirttest.run() --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973197771652.346574252157; Thu, 10 May 2018 10:26:37 -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 25D6932FA3ED; Thu, 10 May 2018 17:26:36 +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 BD0E35ED20; Thu, 10 May 2018 17:26:35 +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 62029180B5AA; Thu, 10 May 2018 17:26:35 +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 w4AHQJ83020538 for ; Thu, 10 May 2018 13:26:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id AC2F72166BB2; Thu, 10 May 2018 17:26:19 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50CD22166BAD for ; Thu, 10 May 2018 17:26:19 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:56 +0200 Message-Id: <20180510172614.11687-5-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE 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.41]); Thu, 10 May 2018 17:26:36 +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/events.c | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index bcd0779..61654a6 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -578,6 +578,12 @@ + + + + + diff --git a/src/events.c b/src/events.c index 5880b1b..350d084 100644 --- a/src/events.c +++ b/src/events.c @@ -5,6 +5,29 @@ =20 #include =20 +static gint +virtDBusEventsDomainAgentLifecycle(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint state, + gint reason, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "AgentLifecycle", + g_variant_new("(ii)", state, reason), + NULL); + + return 0; +} + static gint virtDBusEventsDomainLifecycle(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -276,6 +299,10 @@ virtDBusEventsRegisterStoragePoolEvent(virtDBusConnect= *connect, void virtDBusEventsRegister(virtDBusConnect *connect) { + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainAgentLifecycle)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973203882350.33239637008774; Thu, 10 May 2018 10:26:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A34830BDCC4; Thu, 10 May 2018 17:26:41 +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 565496060C; Thu, 10 May 2018 17:26:41 +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 01A383FCFC; Thu, 10 May 2018 17:26:40 +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 w4AHQKtu020545 for ; Thu, 10 May 2018 13:26:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4EB7C2166BB2; Thu, 10 May 2018 17:26:20 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7D022166BAD for ; Thu, 10 May 2018 17:26:19 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:57 +0200 Message-Id: <20180510172614.11687-6-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 10 May 2018 17:26:42 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 61654a6..c119173 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -584,6 +584,11 @@ + + + + diff --git a/src/events.c b/src/events.c index 350d084..3f1a4ab 100644 --- a/src/events.c +++ b/src/events.c @@ -28,6 +28,28 @@ virtDBusEventsDomainAgentLifecycle(virConnectPtr connect= ion G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainBalloonChange(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + guint64 actual, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "BalloonChange", + g_variant_new("(t)", actual), + NULL); + + return 0; +} + static gint virtDBusEventsDomainLifecycle(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -303,6 +325,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainAgentLifecycle)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBalloonChange)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973192611197.42104106176066; Thu, 10 May 2018 10:26:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C99943004406; Thu, 10 May 2018 17:26:30 +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 8E9B930012D5; Thu, 10 May 2018 17:26:30 +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 1CF08180B5AB; Thu, 10 May 2018 17:26:30 +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 w4AHQLNw020551 for ; Thu, 10 May 2018 13:26:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id E44A92166BB2; Thu, 10 May 2018 17:26:20 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89A2F2166BAD for ; Thu, 10 May 2018 17:26:20 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:58 +0200 Message-Id: <20180510172614.11687-7-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_BLOCK_JOB 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 10 May 2018 17:26:31 +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/events.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index c119173..781ca03 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -589,6 +589,13 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventBalloonChangeCallback"/> + + + + + + diff --git a/src/events.c b/src/events.c index 3f1a4ab..d89756c 100644 --- a/src/events.c +++ b/src/events.c @@ -50,6 +50,30 @@ virtDBusEventsDomainBalloonChange(virConnectPtr connecti= on G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainBlockJob(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gchar *disk, + gint type, + gint status, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "BlockJob", + g_variant_new("(sii)", disk, type, statu= s), + NULL); + + return 0; +} + static gint virtDBusEventsDomainLifecycle(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -329,6 +353,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBalloonChange)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_BLOCK_JOB, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBlockJob)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973198920337.2796934482235; Thu, 10 May 2018 10:26:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CBFC80096; Thu, 10 May 2018 17:26:37 +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 D852A9D7AA; Thu, 10 May 2018 17:26: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 8F784EEF4; Thu, 10 May 2018 17:26: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 w4AHQLMV020556 for ; Thu, 10 May 2018 13:26:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 85B9E2166BB2; Thu, 10 May 2018 17:26:21 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B0DB2166BAD for ; Thu, 10 May 2018 17:26:21 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:25:59 +0200 Message-Id: <20180510172614.11687-8-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 10 May 2018 17:26: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/events.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 781ca03..c49f5e8 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -596,6 +596,13 @@ + + + + + + diff --git a/src/events.c b/src/events.c index d89756c..10b2802 100644 --- a/src/events.c +++ b/src/events.c @@ -357,6 +357,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_BLOCK_JOB, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBlockJob)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBlockJob)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 152597320444683.74439182934896; Thu, 10 May 2018 10:26:44 -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 00EF14E33B; Thu, 10 May 2018 17:26: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 CD7DC5EDE1; Thu, 10 May 2018 17:26:41 +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 86ADB3FA56; Thu, 10 May 2018 17:26: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 w4AHQMvE020561 for ; Thu, 10 May 2018 13:26:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 282E22166BB2; Thu, 10 May 2018 17:26:22 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id C134E2166BAD for ; Thu, 10 May 2018 17:26:21 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:00 +0200 Message-Id: <20180510172614.11687-9-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_CONTROL_ERROR 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.38]); Thu, 10 May 2018 17:26: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 | 4 ++++ src/events.c | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index c49f5e8..992fb11 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -603,6 +603,10 @@ + + + diff --git a/src/events.c b/src/events.c index 10b2802..251ea59 100644 --- a/src/events.c +++ b/src/events.c @@ -74,6 +74,27 @@ virtDBusEventsDomainBlockJob(virConnectPtr connection G_= GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainControlError(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "ControlError", + NULL, + NULL); + + return 0; +} + static gint virtDBusEventsDomainLifecycle(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -361,6 +382,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainBlockJob)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_CONTROL_ERROR, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainControlError)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973208252668.5934619075282; Thu, 10 May 2018 10:26:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96161C0587F5; Thu, 10 May 2018 17:26:46 +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 60B3930B8446; Thu, 10 May 2018 17:26: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 0E1BB1801242; Thu, 10 May 2018 17:26:46 +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 w4AHQMLW020566 for ; Thu, 10 May 2018 13:26:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id BF4712166BB2; Thu, 10 May 2018 17:26:22 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 638692166BAD for ; Thu, 10 May 2018 17:26:22 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:01 +0200 Message-Id: <20180510172614.11687-10-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 10 May 2018 17:26: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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 992fb11..db5da09 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -612,6 +612,11 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventDeviceAddedCallback"/> + + + + diff --git a/src/events.c b/src/events.c index 251ea59..b47a4a1 100644 --- a/src/events.c +++ b/src/events.c @@ -140,6 +140,28 @@ virtDBusEventsDomainDeviceAdded(virConnectPtr connecti= on G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainDeviceRemovalFailed(virConnectPtr connection G_GNUC_UN= USED, + virDomainPtr domain, + const gchar *device, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "DeviceRemovalFailed", + g_variant_new("(s)", device), + NULL); + + return 0; +} + static gint virtDBusEventsDomainDeviceRemoved(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -394,6 +416,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainDeviceAdded)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_F= AILED, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainDeviceRemovalFailed)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainDeviceRemoved)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 152597319332949.82625457108304; Thu, 10 May 2018 10:26:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B90D8883DE; Thu, 10 May 2018 17:26:31 +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 7EEF220D8803; Thu, 10 May 2018 17:26:31 +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 2147E180B5B2; Thu, 10 May 2018 17:26: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 w4AHQN4X020571 for ; Thu, 10 May 2018 13:26:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 601442166BB2; Thu, 10 May 2018 17:26:23 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0536C2166BAD for ; Thu, 10 May 2018 17:26:22 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:02 +0200 Message-Id: <20180510172614.11687-11-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_GRAPHICS 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.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 10 May 2018 17:26:32 +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 | 9 +++++++ src/events.c | 60 +++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 69 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index db5da09..a9a6f5c 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -630,6 +630,15 @@ + + + + + + + + diff --git a/src/events.c b/src/events.c index b47a4a1..f927b26 100644 --- a/src/events.c +++ b/src/events.c @@ -184,6 +184,62 @@ virtDBusEventsDomainDeviceRemoved(virConnectPtr connec= tion G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainGraphics(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint phase, + const virDomainEventGraphicsAddress *local, + const virDomainEventGraphicsAddress *remote, + const gchar *authScheme, + const virDomainEventGraphicsSubject *subject, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + GVariantBuilder builder; + GVariant *gret; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_variant_builder_init(&builder, G_VARIANT_TYPE("(i(iss)(iss)sa(ss))")= ); + + g_variant_builder_add(&builder, "i", phase); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("(iss)")); + g_variant_builder_add(&builder, "i", local->family); + g_variant_builder_add(&builder, "s", local->node); + g_variant_builder_add(&builder, "s", local->service); + g_variant_builder_close(&builder); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("(iss)")); + g_variant_builder_add(&builder, "i", remote->family); + g_variant_builder_add(&builder, "s", remote->node); + g_variant_builder_add(&builder, "s", remote->service); + g_variant_builder_close(&builder); + + g_variant_builder_add(&builder, "s", authScheme); + + g_variant_builder_open(&builder, G_VARIANT_TYPE("a(ss)")); + for (gint i =3D 0; i < subject->nidentity; i++) { + g_variant_builder_open(&builder, G_VARIANT_TYPE("(ss)")); + g_variant_builder_add(&builder, "ss", subject->identities[i].type); + g_variant_builder_add(&builder, "ss", subject->identities[i].name); + g_variant_builder_close(&builder); + } + g_variant_builder_close(&builder); + gret =3D g_variant_builder_end(&builder); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "Graphics", + gret, + NULL); + + return 0; +} + static gint virtDBusEventsDomainTrayChange(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -428,6 +484,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_DISK_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainDiskChange)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_GRAPHICS, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainGraphics)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainTrayChange)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973199475887.5604362999442; Thu, 10 May 2018 10:26:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE31430B27BE; Thu, 10 May 2018 17:26:37 +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 A966D9D7C6; Thu, 10 May 2018 17:26:37 +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 67C003FCFB; Thu, 10 May 2018 17:26:37 +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 w4AHQOfi020579 for ; Thu, 10 May 2018 13:26:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 02AFB2166BAD; Thu, 10 May 2018 17:26:24 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BE852166BC6 for ; Thu, 10 May 2018 17:26:23 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:03 +0200 Message-Id: <20180510172614.11687-12-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_REBOOT 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 10 May 2018 17:26:38 +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 | 4 ++++ src/events.c | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index a9a6f5c..13f9ee3 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -639,6 +639,10 @@ + + + diff --git a/src/events.c b/src/events.c index f927b26..d409c50 100644 --- a/src/events.c +++ b/src/events.c @@ -240,6 +240,27 @@ virtDBusEventsDomainGraphics(virConnectPtr connection = G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "Reboot", + NULL, + NULL); + + return 0; +} + static gint virtDBusEventsDomainTrayChange(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -488,6 +509,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_GRAPHICS, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainGraphics)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_REBOOT, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainTrayChange)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973204384760.9885105128865; Thu, 10 May 2018 10:26:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 101DB30B27AD; Thu, 10 May 2018 17:26:43 +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 C796A9D7D0; Thu, 10 May 2018 17:26: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 7FF59180B5B6; Thu, 10 May 2018 17:26:42 +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 w4AHQOXw020589 for ; Thu, 10 May 2018 13:26:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 99D592166BAD; Thu, 10 May 2018 17:26:24 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DA082166BB2 for ; Thu, 10 May 2018 17:26:24 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:04 +0200 Message-Id: <20180510172614.11687-13-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_IO_ERROR 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 10 May 2018 17:26: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 | 7 +++++++ src/events.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 13f9ee3..c52f9d4 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -643,6 +643,13 @@ + + + + + + diff --git a/src/events.c b/src/events.c index d409c50..b7aa4e5 100644 --- a/src/events.c +++ b/src/events.c @@ -240,6 +240,31 @@ virtDBusEventsDomainGraphics(virConnectPtr connection = G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainIOError(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + const gchar *srcPath, + const gchar *device, + gint action, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "IOError", + g_variant_new("(ssi)", srcPath, device, + action), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -509,6 +534,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_GRAPHICS, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainGraphics)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_IO_ERROR, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainIOError)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973209924453.3007363494097; Thu, 10 May 2018 10:26:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82E5530CD9A6; Thu, 10 May 2018 17:26:48 +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 55AB13001B91; Thu, 10 May 2018 17:26:48 +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 02F85180BACF; Thu, 10 May 2018 17:26:48 +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 w4AHQPpD020599 for ; Thu, 10 May 2018 13:26:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3A1E02166BAD; Thu, 10 May 2018 17:26:25 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id D38702166BB2 for ; Thu, 10 May 2018 17:26:24 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:05 +0200 Message-Id: <20180510172614.11687-14-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 10 May 2018 17:26:49 +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 | 8 ++++++++ src/events.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index c52f9d4..0cc0080 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -650,6 +650,14 @@ + + + + + + + diff --git a/src/events.c b/src/events.c index b7aa4e5..433dba3 100644 --- a/src/events.c +++ b/src/events.c @@ -265,6 +265,32 @@ virtDBusEventsDomainIOError(virConnectPtr connection G= _GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainIOErrorReason(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + const gchar *srcPath, + const gchar *device, + gint action, + const gchar *reason, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "IOErrorReason", + g_variant_new("(ssis)", srcPath, device, + action, reason), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -538,6 +564,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_IO_ERROR, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainIOError)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainIOErrorReason)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973214758397.6460472531817; Thu, 10 May 2018 10:26:54 -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 7E477C04D292; Thu, 10 May 2018 17:26:53 +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 512DE6017C; Thu, 10 May 2018 17:26: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 100383D3F4; Thu, 10 May 2018 17:26:53 +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 w4AHQPaf020610 for ; Thu, 10 May 2018 13:26:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id D086D2166BAD; Thu, 10 May 2018 17:26:25 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 758D62166BB2 for ; Thu, 10 May 2018 17:26:25 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:06 +0200 Message-Id: <20180510172614.11687-15-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_JOB_COMPLETED 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.31]); Thu, 10 May 2018 17:26: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 | 5 +++++ src/events.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 0cc0080..76f9a97 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -658,6 +658,11 @@ + + + + diff --git a/src/events.c b/src/events.c index 433dba3..5943ea5 100644 --- a/src/events.c +++ b/src/events.c @@ -291,6 +291,32 @@ virtDBusEventsDomainIOErrorReason(virConnectPtr connec= tion G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainJobCompleted(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + virTypedParameterPtr params, + gint nparams, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + GVariant *gargs; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + gargs =3D virtDBusUtilTypedParamsToGVariant(params, nparams); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "JobCompleted", + g_variant_new_tuple(&gargs, 1), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -568,6 +594,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainIOErrorReason)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_JOB_COMPLETED, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainJobCompleted)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973219954484.89623870927494; Thu, 10 May 2018 10:26:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25E87800AE; Thu, 10 May 2018 17:26:58 +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 E69CA30B844E; Thu, 10 May 2018 17:26:57 +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 98C7D180474F; Thu, 10 May 2018 17:26:57 +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 w4AHQQo5020622 for ; Thu, 10 May 2018 13:26:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 71F272166BAD; Thu, 10 May 2018 17:26:26 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 172802166BB2 for ; Thu, 10 May 2018 17:26:25 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:07 +0200 Message-Id: <20180510172614.11687-16-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_METADATA_CHANGE 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 10 May 2018 17:26:59 +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/events.c | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 76f9a97..72ff60e 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -663,6 +663,12 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventJobCompletedCallback"/> + + + + + diff --git a/src/events.c b/src/events.c index 5943ea5..c9daeac 100644 --- a/src/events.c +++ b/src/events.c @@ -317,6 +317,29 @@ virtDBusEventsDomainJobCompleted(virConnectPtr connect= ion G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainMetadataChange(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint type, + const gchar *nsuri, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "MetadataChange", + g_variant_new("(is)", type, nsuri), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -598,6 +621,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_JOB_COMPLETED, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainJobCompleted)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_METADATA_CHANGE, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainMetadataChange)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973224630439.23536805466836; Thu, 10 May 2018 10:27:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24A3630C4CA0; Thu, 10 May 2018 17:27:03 +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 E37A39D7C8; Thu, 10 May 2018 17:27:02 +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 9843B3D388; Thu, 10 May 2018 17:27: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 w4AHQRSE020634 for ; Thu, 10 May 2018 13:26:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 13BE62166BAD; Thu, 10 May 2018 17:26:27 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD1852166BB2 for ; Thu, 10 May 2018 17:26:26 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:08 +0200 Message-Id: <20180510172614.11687-17-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 10 May 2018 17:27:03 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 72ff60e..3b090ba 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -669,6 +669,11 @@ + + + + diff --git a/src/events.c b/src/events.c index c9daeac..22dbed9 100644 --- a/src/events.c +++ b/src/events.c @@ -340,6 +340,28 @@ virtDBusEventsDomainMetadataChange(virConnectPtr conne= ction G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainMigrationIteration(virConnectPtr connection G_GNUC_UNU= SED, + virDomainPtr domain, + gint iteration, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "MigrationIteration", + g_variant_new("(i)", iteration), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -625,6 +647,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_METADATA_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainMetadataChange)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_MIGRATION_ITERAT= ION, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainMigrationIteration)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973229164870.4640045618132; Thu, 10 May 2018 10:27:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5EDCC0587FE; Thu, 10 May 2018 17:27:07 +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 773A730B8444; Thu, 10 May 2018 17:27: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 33DE618033C6; Thu, 10 May 2018 17:27:07 +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 w4AHQR7K020641 for ; Thu, 10 May 2018 13:26:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id A99162166BAD; Thu, 10 May 2018 17:26:27 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4ED262166BB2 for ; Thu, 10 May 2018 17:26:27 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:09 +0200 Message-Id: <20180510172614.11687-18-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_PMSUSPEND 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 10 May 2018 17:27: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 | 5 +++++ src/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 3b090ba..f693198 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -674,6 +674,11 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventMigrationIterationCallback"/> + + + + diff --git a/src/events.c b/src/events.c index 22dbed9..818aae4 100644 --- a/src/events.c +++ b/src/events.c @@ -362,6 +362,28 @@ virtDBusEventsDomainMigrationIteration(virConnectPtr c= onnection G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainPMSuspend(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint reason, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "PMSuspend", + g_variant_new("(i)", reason), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -651,6 +673,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_MIGRATION_ITERAT= ION, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainMigrationIteration)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_PMSUSPEND, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMSuspend)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973213673241.7113594999438; Thu, 10 May 2018 10:26:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A9AE25B98; Thu, 10 May 2018 17:26: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 3FBFB3001B8A; Thu, 10 May 2018 17:26:51 +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 E5F9B180BAD1; Thu, 10 May 2018 17:26: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 w4AHQSJr020646 for ; Thu, 10 May 2018 13:26:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4B6752166BAD; Thu, 10 May 2018 17:26:28 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id E49072166BB2 for ; Thu, 10 May 2018 17:26:27 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:10 +0200 Message-Id: <20180510172614.11687-19-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 10 May 2018 17:26:52 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index f693198..205d035 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -679,6 +679,11 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventPMSuspendCallback"/> + + + + diff --git a/src/events.c b/src/events.c index 818aae4..26b1947 100644 --- a/src/events.c +++ b/src/events.c @@ -384,6 +384,28 @@ virtDBusEventsDomainPMSuspend(virConnectPtr connection= G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainPMSuspendDisk(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint reason, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "PMSuspendDisk", + g_variant_new("(i)", reason), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -677,6 +699,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_PMSUSPEND, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMSuspend)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMSuspendDisk)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973217524424.01415124355117; Thu, 10 May 2018 10:26:57 -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 38206C051696; Thu, 10 May 2018 17:26:56 +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 10D8F5EDE1; Thu, 10 May 2018 17:26:56 +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 BCC583D384; Thu, 10 May 2018 17:26: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 w4AHQT0B020655 for ; Thu, 10 May 2018 13:26:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id E0FAF2166BAD; Thu, 10 May 2018 17:26:28 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 866302166BB2 for ; Thu, 10 May 2018 17:26:28 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:11 +0200 Message-Id: <20180510172614.11687-20-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_PMWAKEUP 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.31]); Thu, 10 May 2018 17:26:56 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 205d035..3478c09 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -684,6 +684,11 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventPMSuspendDiskCallback"/> + + + + diff --git a/src/events.c b/src/events.c index 26b1947..c71ed14 100644 --- a/src/events.c +++ b/src/events.c @@ -406,6 +406,28 @@ virtDBusEventsDomainPMSuspendDisk(virConnectPtr connec= tion G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainPMWakeup(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint reason, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "PMWakeup", + g_variant_new("(i)", reason), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -703,6 +725,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMSuspendDisk)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_PMWAKEUP, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMWakeup)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973223168595.9262978574671; Thu, 10 May 2018 10:27:03 -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 B094A30B8FB5; Thu, 10 May 2018 17:27:01 +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 7FD166017E; Thu, 10 May 2018 17:27:01 +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 301B018033C0; Thu, 10 May 2018 17:27:01 +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 w4AHQTUJ020660 for ; Thu, 10 May 2018 13:26:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 82B802166BAD; Thu, 10 May 2018 17:26:29 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 280502166BB2 for ; Thu, 10 May 2018 17:26:29 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:12 +0200 Message-Id: <20180510172614.11687-21-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_RTC_CHANGE 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.49]); Thu, 10 May 2018 17:27:02 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 3478c09..5ab6660 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -689,6 +689,11 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventPMWakeupCallback"/> + + + + diff --git a/src/events.c b/src/events.c index c71ed14..6319776 100644 --- a/src/events.c +++ b/src/events.c @@ -428,6 +428,28 @@ virtDBusEventsDomainPMWakeup(virConnectPtr connection = G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainRTCChange(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint64 utcoffset, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "RTCChange", + g_variant_new("(x)", utcoffset), + NULL); + + return 0; +} + static gint virtDBusEventsDomainReboot(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -729,6 +751,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_PMWAKEUP, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainPMWakeup)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_RTC_CHANGE, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainRTCChange)); + virtDBusEventsRegisterDomainEvent(connect, VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainReboot)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973209167353.9690738939538; Thu, 10 May 2018 10:26:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA52B8049D; Thu, 10 May 2018 17:26:47 +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 6ABB36060C; Thu, 10 May 2018 17:26:47 +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 26AD6180B5B5; Thu, 10 May 2018 17:26:47 +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 w4AHQUXW020668 for ; Thu, 10 May 2018 13:26:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 24BA82166BAD; Thu, 10 May 2018 17:26:30 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id BDC4D2166BB2 for ; Thu, 10 May 2018 17:26:29 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:13 +0200 Message-Id: <20180510172614.11687-22-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_TUNABLE 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 10 May 2018 17:26:48 +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/events.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 5ab6660..39b7ac6 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -700,5 +700,10 @@ + + + + diff --git a/src/events.c b/src/events.c index 6319776..d8c2a37 100644 --- a/src/events.c +++ b/src/events.c @@ -494,6 +494,32 @@ virtDBusEventsDomainTrayChange(virConnectPtr connectio= n G_GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainTunable(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + virTypedParameterPtr params, + gint nparams, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + GVariant *gargs; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + gargs =3D virtDBusUtilTypedParamsToGVariant(params, nparams); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "Tunable", + g_variant_new_tuple(&gargs, 1), + NULL); + + return 0; +} + static gint virtDBusEventsDomainDiskChange(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -763,6 +789,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_TRAY_CHANGE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainTrayChange)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_TUNABLE, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainTunable)); + virtDBusEventsRegisterNetworkEvent(connect, VIR_NETWORK_EVENT_ID_LIFECYCLE, VIR_NETWORK_EVENT_CALLBACK(virtDBus= EventsNetworkLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 11:56:26 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 1525973228747431.1261184961594; Thu, 10 May 2018 10:27:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B8E6820F6; Thu, 10 May 2018 17:27: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 5D00A1001948; Thu, 10 May 2018 17:27: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 162DE3D38D; Thu, 10 May 2018 17:27: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 w4AHQUQ1020679 for ; Thu, 10 May 2018 13:26:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id BA0EF2166BAD; Thu, 10 May 2018 17:26:30 +0000 (UTC) Received: from katerina.brq.redhat.com (unknown [10.43.2.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F38D2166BB2 for ; Thu, 10 May 2018 17:26:30 +0000 (UTC) From: Katerina Koukiou To: libvir-list@redhat.com Date: Thu, 10 May 2018 19:26:14 +0200 Message-Id: <20180510172614.11687-23-kkoukiou@redhat.com> In-Reply-To: <20180510172614.11687-1-kkoukiou@redhat.com> References: <20180510172614.11687-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/22] events: Register VIR_DOMAIN_EVENT_ID_WATCHDOG 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 10 May 2018 17:27:07 +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/events.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index 39b7ac6..e2e99a9 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -705,5 +705,10 @@ value=3D"See https://libvirt.org/html/libvirt-libvirt-domain.html#= virConnectDomainEventTunableCallback"/> + + + + diff --git a/src/events.c b/src/events.c index d8c2a37..2697d82 100644 --- a/src/events.c +++ b/src/events.c @@ -520,6 +520,28 @@ virtDBusEventsDomainTunable(virConnectPtr connection G= _GNUC_UNUSED, return 0; } =20 +static gint +virtDBusEventsDomainWatchdog(virConnectPtr connection G_GNUC_UNUSED, + virDomainPtr domain, + gint action, + gpointer opaque) +{ + virtDBusConnect *connect =3D opaque; + g_autofree gchar *path =3D NULL; + + path =3D virtDBusUtilBusPathForVirDomain(domain, connect->domainPath); + + g_dbus_connection_emit_signal(connect->bus, + NULL, + path, + VIRT_DBUS_DOMAIN_INTERFACE, + "Watchdog", + g_variant_new("(i)", action), + NULL); + + return 0; +} + static gint virtDBusEventsDomainDiskChange(virConnectPtr connection G_GNUC_UNUSED, virDomainPtr domain, @@ -793,6 +815,10 @@ virtDBusEventsRegister(virtDBusConnect *connect) VIR_DOMAIN_EVENT_ID_TUNABLE, VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainTunable)); =20 + virtDBusEventsRegisterDomainEvent(connect, + VIR_DOMAIN_EVENT_ID_WATCHDOG, + VIR_DOMAIN_EVENT_CALLBACK(virtDBusEv= entsDomainWatchdog)); + virtDBusEventsRegisterNetworkEvent(connect, VIR_NETWORK_EVENT_ID_LIFECYCLE, VIR_NETWORK_EVENT_CALLBACK(virtDBus= EventsNetworkLifecycle)); --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list