Commit 7b2a44de authored by Daniel P. Berrange's avatar Daniel P. Berrange

Add support for new storage pool lifecycle events

Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent 0822ea6d
......@@ -90,6 +90,8 @@ const (
STORAGE_POOL_EVENT_UNDEFINED = StoragePoolEventLifecycleType(C.VIR_STORAGE_POOL_EVENT_UNDEFINED)
STORAGE_POOL_EVENT_STARTED = StoragePoolEventLifecycleType(C.VIR_STORAGE_POOL_EVENT_STARTED)
STORAGE_POOL_EVENT_STOPPED = StoragePoolEventLifecycleType(C.VIR_STORAGE_POOL_EVENT_STOPPED)
STORAGE_POOL_EVENT_CREATED = StoragePoolEventLifecycleType(C.VIR_STORAGE_POOL_EVENT_CREATED)
STORAGE_POOL_EVENT_DELETED = StoragePoolEventLifecycleType(C.VIR_STORAGE_POOL_EVENT_DELETED)
)
type StoragePool struct {
......
......@@ -82,4 +82,15 @@ int virConnectStoragePoolEventDeregisterAnyCompat(virConnectPtr conn,
int callbackID);
/* 3.8.0 */
#ifndef VIR_STORAGE_POOL_EVENT_CREATED
#define VIR_STORAGE_POOL_EVENT_CREATED 4
#endif
#ifndef VIR_STORAGE_POOL_EVENT_DELETED
#define VIR_STORAGE_POOL_EVENT_DELETED 5
#endif
#endif /* LIBVIRT_GO_STORAGE_POOL_COMPAT_H__ */
......@@ -158,6 +158,12 @@ func (e StoragePoolEventLifecycle) String() string {
case STORAGE_POOL_EVENT_STOPPED:
event = "stopped"
case STORAGE_POOL_EVENT_CREATED:
event = "created"
case STORAGE_POOL_EVENT_DELETED:
event = "deleted"
default:
event = "unknown"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment