event-test: Add VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION callback

This commit is contained in:
Peter Krempa 2016-04-14 17:26:53 +02:00
parent 9da32b368e
commit bb25001a5b

View File

@ -766,6 +766,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)
{
@ -815,7 +827,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 */
};