mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Promote storage pool refresh lifecycle event to top level event
The VIR_STORAGE_POOL_EVENT_REFRESHED constant does not reflect any change in the lifecycle of the storage pool. It should thus not be part of the storage pool lifecycle event set, but rather be a top level event in its own right. Thus we introduce VIR_STORAGE_POOL_EVENT_ID_REFRESH to replace it. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -349,8 +349,6 @@ storagePoolEventToString(int event)
|
||||
return "Started";
|
||||
case VIR_STORAGE_POOL_EVENT_STOPPED:
|
||||
return "Stopped";
|
||||
case VIR_STORAGE_POOL_EVENT_REFRESHED:
|
||||
return "Refreshed";
|
||||
case VIR_STORAGE_POOL_EVENT_LAST:
|
||||
break;
|
||||
}
|
||||
@@ -679,6 +677,17 @@ myStoragePoolEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
myStoragePoolEventRefreshCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virStoragePoolPtr pool,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Storage pool %s refresh\n", __func__,
|
||||
virStoragePoolGetName(pool));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
eventTypedParamsPrint(virTypedParameterPtr params,
|
||||
int nparams)
|
||||
@@ -936,6 +945,7 @@ struct storagePoolEventData {
|
||||
|
||||
struct storagePoolEventData storagePoolEvents[] = {
|
||||
STORAGE_POOL_EVENT(VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE, myStoragePoolEventCallback),
|
||||
STORAGE_POOL_EVENT(VIR_STORAGE_POOL_EVENT_ID_REFRESH, myStoragePoolEventRefreshCallback),
|
||||
};
|
||||
|
||||
/* make sure that the events are kept in sync */
|
||||
|
||||
Reference in New Issue
Block a user