
On Fri, Sep 21, 2018 at 08:39:20 +0200, Philipp Hahn wrote:
Hello,
Am 20.09.18 um 08:10 schrieb Philipp Hahn:
event-test.py is bad at handling newer livecycle events. Attached are two patches to improve that.
Philipp Hahn (2): event-test.py: Sync list of domain lifecycle events event-test.py: Future proof lifecycle event handling
examples/event-test.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
While looking at the events reported by said script I noticed that there are no events for creating / deleting snapshot, at leat when the VM is inactive. For an active VM Qemu reports several events: VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
Also there is no event generated when doing "virsh change-media" for an inactive domain; I would have expected an VIR_DOMAIN_EVENT_DEFINED_UPDATED event. For an active domain you get the libvirt.VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN / CLOSE events.
My current work-around is to do polling, but I want to get rid of that. Did I miss something or is it okay to add events for tha?
The UPDATED event would make sense for both online/offline VMs, but it wasn't implemented there yet. Tray change events for offline VMs obviously don't make sense. Also for offline VMs the media change always succeeded if the API was successful.