[PATCH 14/18] event-test: Add VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION callback

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

 



---
 examples/object-events/event-test.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 97b3a09..0abcfe4 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -767,6 +767,18 @@ myDomainEventBlockJobCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
 }


+static int
+myDomainEventMigrationIterationCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+                                        virDomainPtr dom,
+                                        int iteration,
+                                        void *opaque ATTRIBUTE_UNUSED)
+{
+    printf("%s EVENT: Domain %s(%d) migration iteration '%d'\n",
+           __func__, virDomainGetName(dom), virDomainGetID(dom), iteration);
+    return 0;
+}
+
+
 static void
 myFreeFunc(void *opaque)
 {
@@ -816,7 +828,7 @@ struct domainEventData domainEvents[] = {
     DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_TUNABLE, myDomainEventTunableCallback),
     DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE, myDomainEventAgentLifecycleCallback),
     DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, myDomainEventDeviceAddedCallback),
-    /* VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION */
+    DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION, myDomainEventMigrationIterationCallback),
     /* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */
     /* VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED */
 };
-- 
2.8.0

--
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]