connection: refresh domain XML on device hotplug

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 <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2015-04-29 11:00:40 +02:00 committed by Cole Robinson
parent 0aeee5c449
commit be7611b645
1 changed files with 3 additions and 0 deletions

View File

@ -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: