1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-11-25 12:23:48 +03:00

Add support for domain NIC MAC address change event

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik
2025-03-25 13:43:29 +01:00
parent 3b526999de
commit 590e09cec1
3 changed files with 75 additions and 0 deletions

View File

@@ -279,6 +279,15 @@
cb(self, virDomain(self, _obj=dom), alias, size, opaque)
return 0
def _dispatchDomainEventNICMACChangeCallback(self, dom: 'virDomain', alias: str, oldMAC: str, newMAC: str, cbData: Dict[str, Any]) -> int:
"""Dispatches event to python user domain NIC MAC change event callbacks
"""
cb = cbData["cb"]
opaque = cbData["opaque"]
cb(self, virDomain(self, _obj=dom), alias, oldMAC, newMAC, 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 """