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

event: Add bindings for agent lifecycle event

Also add the example.
This commit is contained in:
Peter Krempa
2014-11-24 16:41:39 +01:00
parent c6def1bf95
commit acc47bcb71
3 changed files with 81 additions and 0 deletions

View File

@ -197,6 +197,16 @@
cb(self, virDomain(self, _obj=dom), params, opaque)
return 0
def _dispatchDomainEventAgentLifecycleCallback(self, dom, state, reason, cbData):
"""Dispatches event to python user domain agent lifecycle event callback
"""
cb = cbData["cb"]
opaque = cbData["opaque"]
cb(self, virDomain(self, _obj=dom), state, reason, 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 """