1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-22 20:59:34 +03:00

event-test.py: Report ERROR events

VIR_DOMAIN_EVENT_ID_IO_ERROR and VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
callbacks receive the same 'action' parameter, so also translate that
numeric action to a descriptive text for the first callback.

Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
Philipp Hahn
2018-11-01 11:20:40 +01:00
committed by Michal Privoznik
parent c8b6e5fc3c
commit 9af6f1a5d3

View File

@ -534,8 +534,8 @@ def myDomainEventWatchdogCallback(conn, dom, action, opaque):
def myDomainEventIOErrorCallback(conn, dom, srcpath, devalias, action, opaque):
print("myDomainEventIOErrorCallback: Domain %s(%s) %s %s %d" % (
dom.name(), dom.ID(), srcpath, devalias, action))
print("myDomainEventIOErrorCallback: Domain %s(%s) %s %s %s" % (
dom.name(), dom.ID(), srcpath, devalias, ERROR_EVENTS[action]))
def myDomainEventIOErrorReasonCallback(conn, dom, srcpath, devalias, action, reason, opaque):