summaryrefslogtreecommitdiff
path: root/libvirt-override-virConnect.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-11-12 14:51:56 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2020-11-12 14:51:56 +0000
commit417b39049ef01a39fd7789f6f1eb861d6893075f (patch)
tree18be8f556cf8c251417e3330df7ffe99bc75c448 /libvirt-override-virConnect.py
parentae219e3480373f6282cc8a549ca6ef21601ba402 (diff)
downloadlibvirt-python-417b39049ef01a39fd7789f6f1eb861d6893075f.tar.gz
Add support for memory failure event callbacks
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r--libvirt-override-virConnect.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py
index 2018968..8fbeaa0 100644
--- a/libvirt-override-virConnect.py
+++ b/libvirt-override-virConnect.py
@@ -261,6 +261,15 @@
cb(self, virDomain(self, _obj=dom), dev, path, threshold, excess, opaque)
return 0
+ def _dispatchDomainEventMemoryFailureCallback(self, dom: 'virDomain', recipient: int, action: int, flags: int, cbData: Dict[str, Any]) -> int:
+ """Dispatches event to python user domain memory failure event callbacks
+ """
+ cb = cbData["cb"]
+ opaque = cbData["opaque"]
+
+ cb(self, virDomain(self, _obj=dom), recipient, action, flags, opaque)
+ return 0
+
def domainEventDeregisterAny(self, callbackID: int) -> None:
"""Removes a Domain Event Callback. De-registering for a
domain callback will disable delivery of this event type """