mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +03:00
More event callback fixes
In a couple of cases typos meant we were firing the wrong type of event. In the python code my previous commit accidentally missed some chunks of the code. * python/libvirt-override-virConnect.py: Add missing python glue accidentally left out of previous commit * src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos in event name / method name to invoke
This commit is contained in:
@ -43,7 +43,7 @@
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def dispatchDomainEventLifecycleCallback(self, dom, event, detail, cbData):
|
def dispatchDomainEventLifecycleCallback(self, dom, event, detail, cbData):
|
||||||
"""Dispatches events to python user domain event callbacks
|
"""Dispatches events to python user domain lifecycle event callbacks
|
||||||
"""
|
"""
|
||||||
cb = cbData["cb"]
|
cb = cbData["cb"]
|
||||||
opaque = cbData["opaque"]
|
opaque = cbData["opaque"]
|
||||||
@ -52,7 +52,7 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
def dispatchDomainEventGenericCallback(self, dom, cbData):
|
def dispatchDomainEventGenericCallback(self, dom, cbData):
|
||||||
"""Dispatches events to python user domain event callbacks
|
"""Dispatches events to python user domain generic event callbacks
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
cb = cbData["cb"]
|
cb = cbData["cb"]
|
||||||
@ -63,6 +63,54 @@
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def dispatchDomainEventRTCChangeCallback(self, dom, offset, cbData):
|
||||||
|
"""Dispatches events to python user domain RTC change event callbacks
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
cb = cbData["cb"]
|
||||||
|
opaque = cbData["opaque"]
|
||||||
|
|
||||||
|
cb(self, virDomain(self, _obj=dom), offset ,opaque)
|
||||||
|
return 0
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def dispatchDomainEventWatchdogCallback(self, dom, action, cbData):
|
||||||
|
"""Dispatches events to python user domain watchdog event callbacks
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
cb = cbData["cb"]
|
||||||
|
opaque = cbData["opaque"]
|
||||||
|
|
||||||
|
cb(self, virDomain(self, _obj=dom), action, opaque)
|
||||||
|
return 0
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def dispatchDomainEventIOErrorCallback(self, dom, srcPath, devAlias, action, cbData):
|
||||||
|
"""Dispatches events to python user domain IO error event callbacks
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
cb = cbData["cb"]
|
||||||
|
opaque = cbData["opaque"]
|
||||||
|
|
||||||
|
cb(self, virDomain(self, _obj=dom), opaque)
|
||||||
|
return 0
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def dispatchDomainEventGraphicsCallback(self, dom, phase, localAddr, remoteAddr, authScheme, subject, cbData):
|
||||||
|
"""Dispatches events to python user domain graphics event callbacks
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
cb = cbData["cb"]
|
||||||
|
opaque = cbData["opaque"]
|
||||||
|
|
||||||
|
cb(self, virDomain(self, _obj=dom), phase, localAddr, remoteAddr, authScheme, subject, opaque)
|
||||||
|
return 0
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
def domainEventDeregisterAny(self, callbackID):
|
def domainEventDeregisterAny(self, callbackID):
|
||||||
"""Removes a Domain Event Callback. De-registering for a
|
"""Removes a Domain Event Callback. De-registering for a
|
||||||
domain callback will disable delivery of this event type """
|
domain callback will disable delivery of this event type """
|
||||||
|
Reference in New Issue
Block a user