From be7611b645e2e888a0decc4c02f411a967ccee80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 29 Apr 2015 11:00:40 +0200 Subject: [PATCH] connection: refresh domain XML on device hotplug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Listen to the VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event too, added by libvirt 1.2.15. https://bugzilla.redhat.com/show_bug.cgi?id=1179138 Signed-off-by: Ján Tomko --- virtManager/connection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtManager/connection.py b/virtManager/connection.py index e1a00610..beef5f49 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -775,6 +775,9 @@ class vmmConnection(vmmGObject): _add_domain_xml_event( getattr(libvirt, "VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED", 15), "device removed") + _add_domain_xml_event( + getattr(libvirt, "VIR_DOMAIN_EVENT_ID_DEVICE_ADDED", 19), + "device added") try: if _disable_libvirt_events: