]> xenbits.xensource.com Git - libvirt.git/commit
storage: Add new events for *PoolBuild() and *PoolDelete().
authorJulio Faracco <jcfaracco@gmail.com>
Sat, 9 Sep 2017 15:09:49 +0000 (12:09 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Sep 2017 09:52:56 +0000 (11:52 +0200)
commitb06521928cca0b55987bdc49360f8d78a56feb04
tree3e3f69ffcd3ecd2cd14795dd6659db11545bb069
parent0dde16be73fa84c13ce777b43f695284a2e231ca
storage: Add new events for *PoolBuild() and *PoolDelete().

This commit adds new events for two methods and operations: *PoolBuild() and
*PoolDelete(). Using the event-test and the commands set below we have the
following outputs:

$ sudo ./event-test
Registering event callbacks
myStoragePoolEventCallback EVENT: Storage pool test Defined 0
myStoragePoolEventCallback EVENT: Storage pool test Created 0
myStoragePoolEventCallback EVENT: Storage pool test Started 0
myStoragePoolEventCallback EVENT: Storage pool test Stopped 0
myStoragePoolEventCallback EVENT: Storage pool test Deleted 0
myStoragePoolEventCallback EVENT: Storage pool test Undefined 0

Another terminal:
$ sudo virsh pool-define test.xml
Pool test defined from test.xml

$ sudo virsh pool-build test
Pool test built

$ sudo virsh pool-start test
Pool test started

$ sudo virsh pool-destroy test
Pool test destroyed

$ sudo virsh pool-delete test
Pool test deleted

$ sudo virsh pool-undefine test
Pool test has been undefined

This commits can be a solution for RHBZ #1475227.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1475227

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
examples/object-events/event-test.c
include/libvirt/libvirt-storage.h
src/storage/storage_driver.c
src/test/test_driver.c
tests/objecteventtest.c
tools/virsh-pool.c