1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-08-01 00:21:59 +03:00

event: Add handler for block threshold event

Unfortunately python doesn't generate those.
This commit is contained in:
Peter Krempa
2017-03-29 16:59:39 +02:00
parent f261fd3e3c
commit a927799334
3 changed files with 75 additions and 0 deletions

View File

@ -252,6 +252,15 @@
cb(self, virDomain(self, _obj=dom), mtype, nsuri, opaque)
return 0
def _dispatchDomainEventBlockThresholdCallback(self, dom, dev, path, threshold, excess, cbData):
"""Dispatches event to python user domain block device threshold event callbacks
"""
cb = cbData["cb"]
opaque = cbData["opaque"]
cb(self, virDomain(self, _obj=dom), dev, path, threshold, excess, opaque)
return 0
def domainEventDeregisterAny(self, callbackID):
"""Removes a Domain Event Callback. De-registering for a
domain callback will disable delivery of this event type """