[PATCH python 2/2] event-test: support node device update callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 examples/event-test.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/event-test.py b/examples/event-test.py
index 9b59b92..e43a2f8 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -597,6 +597,9 @@ def myNodeDeviceEventLifecycleCallback(conn, dev, event, detail, opaque):
                                                                           nodeDeviceEventToString(event),
                                                                           detail))
 
+def myNodeDeviceEventUpdateCallback(conn, dev, opaque):
+    print("myNodeDeviceEventUpdateCallback: Node device %s" % dev.name())
+
 ##########################################################################
 # Set up and run the program
 ##########################################################################
@@ -693,6 +696,7 @@ def main():
     vc.storagePoolEventRegisterAny(None, libvirt.VIR_STORAGE_POOL_EVENT_ID_REFRESH, myStoragePoolEventRefreshCallback, None)
 
     vc.nodeDeviceEventRegisterAny(None, libvirt.VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE, myNodeDeviceEventLifecycleCallback, None)
+    vc.nodeDeviceEventRegisterAny(None, libvirt.VIR_NODE_DEVICE_EVENT_ID_UPDATE, myNodeDeviceEventUpdateCallback, None)
 
     vc.setKeepAlive(5, 3)
 
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]