[Pkg-libvirt-commits] [Git][libvirt-team/libvirt-python][upstream/latest] New upstream version 12.4.0

Pino Toscano (@pino) gitlab at salsa.debian.org
Wed Jun 24 04:03:30 BST 2026



Pino Toscano pushed to branch upstream/latest at Libvirt Packaging Team / libvirt-python


Commits:
24ab090d by Pino Toscano at 2026-06-24T04:51:33+02:00
New upstream version 12.4.0
- - - - -


7 changed files:

- ChangeLog
- PKG-INFO
- VERSION
- examples/event-test.py
- libvirt-override-virConnect.py
- libvirt-override.c
- libvirt-python.spec


Changes:

=====================================
ChangeLog
=====================================
@@ -1,3 +1,27 @@
+ 2026- 5- 25 Michal Privoznik <mprivozn at redhat.com>
+    
+    Add support for domain channel lifecycle event
+    
+    
+ 2026- 5- 14 Michal Privoznik <mprivozn at redhat.com>
+    
+    Add support for domain vCPU removed event
+    
+    
+ 2026- 5- 11 Takashi Kajinami <kajinamit at oss.nttdata.com>
+    
+    ci: regenerate with 'lcitool manifest'
+    - Drop Fedora 42, add Fedora 44
+    - Drop Ubuntu 22.04, add Ubuntu 26.04
+    - Add Debian 13
+    
+    
+    
+ 2026- 5- 1 Jiri Denemark <jdenemar at redhat.com>
+    
+    Post-release version bump to 12.4.0
+    
+    
  2026- 4- 1 Jiri Denemark <jdenemar at redhat.com>
     
     Post-release version bump to 12.3.0


=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: libvirt-python
-Version: 12.3.0
+Version: 12.4.0
 Summary: The libvirt virtualization API python binding
 Home-page: http://www.libvirt.org
 Maintainer: Libvirt Maintainers


=====================================
VERSION
=====================================
@@ -1 +1 @@
-12.3.0
+12.4.0


=====================================
examples/event-test.py
=====================================
@@ -514,6 +514,8 @@ AGENT_REASONS = Description("unknown", "domain started", "channel event")
 GRAPHICS_PHASES = Description("Connect", "Initialize", "Disconnect")
 DISK_EVENTS = Description("Change missing on start", "Drop missing on start")
 TRAY_EVENTS = Description("Opened", "Closed")
+CHANNEL_STATES = Description("unknown", "connected", "disconnected")
+CHANNEL_REASONS = Description("unknown", "domain started", "channel event")
 
 
 def myDomainEventCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, event: int, detail: int, opaque: _T) -> None:
@@ -652,6 +654,14 @@ def myDomainEventNICMACChangeCallback(conn: libvirt.virConnect, dom: libvirt.vir
     print("myDomainEventNICMACChangeCallback: Domain %s(%s) NIC MAC change alias %s old MAC: %s new MAC: %s" % (
         dom.name(), dom.ID(), alias, oldMAC, newMAC))
 
+def myDomainEventVcpuRemovedCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, vcpuid: int, opaque: _T) -> None:
+    print("myDomainEventVcpuRemovedCallback: Domain %s(%s) vCPU removed %d" % (
+        dom.name(), dom.ID(), vcpuid))
+
+def myDomainEventChannelLifecycleCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, state: int, reason: int, opaque: _T) -> None:
+    print("myDomainEventChannelLifecycleCallback: Domain %s(%s) %s %s" % (
+        dom.name(), dom.ID(), CHANNEL_STATES[state], CHANNEL_REASONS[reason]))
+
 
 ##########################################################################
 # Network events
@@ -811,6 +821,8 @@ def main() -> None:
         vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MEMORY_FAILURE, myDomainEventMemoryFailureCallback, None),
         vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE, myDomainEventMemoryDeviceSizeChangeCallback, None),
         vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE, myDomainEventNICMACChangeCallback, None),
+        vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_VCPU_REMOVED, myDomainEventVcpuRemovedCallback, None),
+        vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE, myDomainEventChannelLifecycleCallback, None),
     ]
 
     netcallbacks = [


=====================================
libvirt-override-virConnect.py
=====================================
@@ -288,6 +288,15 @@
         cb(self, virDomain(self, _obj=dom), alias, oldMAC, newMAC, opaque)
         return 0
 
+    def _dispatchDomainEventVcpuRemovedCallback(self, dom: 'virDomain', vcpuid: int, cbData: Dict[str, Any]) -> int:
+        """Dispatches event to python user domain vCPU removal  event callbacks
+        """
+        cb = cbData["cb"]
+        opaque = cbData["opaque"]
+
+        cb(self, virDomain(self, _obj=dom), vcpuid, 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 """
@@ -317,6 +326,16 @@
         cb(self, virNetwork(self, _obj=dom), mtype, nsuri, opaque)
         return 0
 
+    def _dispatchDomainEventChannelLifecycleCallback(self, dom: 'virDomain', state: int, reason: int, cbData: Dict[str, Any]) -> int:
+        """Dispatches event to python user domain channel lifecycle event callback
+        """
+
+        cb = cbData["cb"]
+        opaque = cbData["opaque"]
+
+        cb(self, virDomain(self, _obj=dom), state, reason, opaque)
+        return 0
+
     def networkEventDeregisterAny(self, callbackID: int) -> None:
         """Removes a Network Event Callback. De-registering for a
            network callback will disable delivery of this event type"""


=====================================
libvirt-override.c
=====================================
@@ -7451,6 +7451,114 @@ libvirt_virConnectDomainEventNICMACChangeCallback(virConnectPtr conn ATTRIBUTE_U
 #endif /* VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE */
 
 
+#ifdef VIR_DOMAIN_EVENT_ID_VCPU_REMOVED
+static int
+libvirt_virConnectDomainEventVcpuRemovedCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+                                                 virDomainPtr dom,
+                                                 unsigned int vcpuid,
+                                                 void *opaque)
+{
+    PyObject *pyobj_cbData = (PyObject*)opaque;
+    PyObject *pyobj_dom;
+    PyObject *pyobj_ret = NULL;
+    PyObject *pyobj_conn;
+    PyObject *dictKey;
+    int ret = -1;
+
+    LIBVIRT_ENSURE_THREAD_STATE;
+
+    if (!(dictKey = libvirt_constcharPtrWrap("conn")))
+        goto cleanup;
+    pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey);
+    Py_DECREF(dictKey);
+
+    /* Create a python instance of this virDomainPtr */
+    virDomainRef(dom);
+    if (!(pyobj_dom = libvirt_virDomainPtrWrap(dom))) {
+        virDomainFree(dom);
+        goto cleanup;
+    }
+    Py_INCREF(pyobj_cbData);
+
+    /* Call the Callback Dispatcher */
+    pyobj_ret = PyObject_CallMethod(pyobj_conn,
+                                    (char*)"_dispatchDomainEventVcpuRemovedCallback",
+                                    (char*)"OiO",
+                                    pyobj_dom, vcpuid, pyobj_cbData);
+
+    Py_DECREF(pyobj_cbData);
+    Py_DECREF(pyobj_dom);
+
+ cleanup:
+    if (!pyobj_ret) {
+        DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
+        PyErr_Print();
+    } else {
+        Py_DECREF(pyobj_ret);
+        ret = 0;
+    }
+
+    LIBVIRT_RELEASE_THREAD_STATE;
+    return ret;
+}
+#endif /* VIR_DOMAIN_EVENT_ID_VCPU_REMOVED */
+
+
+#ifdef VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE
+static int
+libvirt_virConnectDomainEventChannelLifecycleCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+                                                      virDomainPtr dom,
+                                                      int state,
+                                                      int reason,
+                                                      void *opaque)
+{
+    PyObject *pyobj_cbData = (PyObject*)opaque;
+    PyObject *pyobj_dom;
+    PyObject *pyobj_ret = NULL;
+    PyObject *pyobj_conn;
+    PyObject *dictKey;
+    int ret = -1;
+
+    LIBVIRT_ENSURE_THREAD_STATE;
+
+    if (!(dictKey = libvirt_constcharPtrWrap("conn")))
+        goto cleanup;
+    pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey);
+    Py_DECREF(dictKey);
+
+    /* Create a python instance of this virDomainPtr */
+    virDomainRef(dom);
+    if (!(pyobj_dom = libvirt_virDomainPtrWrap(dom))) {
+        virDomainFree(dom);
+        goto cleanup;
+    }
+    Py_INCREF(pyobj_cbData);
+
+    /* Call the Callback Dispatcher */
+    pyobj_ret = PyObject_CallMethod(pyobj_conn,
+                                    (char*)"_dispatchDomainEventChannelLifecycleCallback",
+                                    (char*)"OiiO",
+                                    pyobj_dom, state, reason, pyobj_cbData);
+
+    Py_DECREF(pyobj_cbData);
+    Py_DECREF(pyobj_dom);
+
+ cleanup:
+    if (!pyobj_ret) {
+        DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
+        PyErr_Print();
+    } else {
+        Py_DECREF(pyobj_ret);
+        ret = 0;
+    }
+
+    LIBVIRT_RELEASE_THREAD_STATE;
+    return ret;
+
+}
+#endif /* VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE */
+
+
 static PyObject *
 libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
                                          PyObject *args)
@@ -7591,6 +7699,16 @@ libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
         cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventNICMACChangeCallback);
         break;
 #endif /* VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE */
+#ifdef VIR_DOMAIN_EVENT_ID_VCPU_REMOVED
+    case VIR_DOMAIN_EVENT_ID_VCPU_REMOVED:
+        cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventVcpuRemovedCallback);
+        break;
+#endif /* VIR_DOMAIN_EVENT_ID_VCPU_REMOVED */
+#ifdef VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE
+    case VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE:
+        cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventChannelLifecycleCallback);
+        break;
+#endif /* VIR_DOMAIN_EVENT_ID_CHANNEL_LIFECYCLE */
     case VIR_DOMAIN_EVENT_ID_LAST:
         break;
     }


=====================================
libvirt-python.spec
=====================================
@@ -16,7 +16,7 @@
 
 Summary: The libvirt virtualization API python3 binding
 Name: libvirt-python
-Version: 12.3.0
+Version: 12.4.0
 Release: 1%{?dist}
 Source0: https://libvirt.org/sources/python/%{dist_name}-%{version}.tar.gz
 Url: https://libvirt.org



View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/24ab090dfaf8698a5afb64ee9f076b37cd6bb1b9

-- 
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/24ab090dfaf8698a5afb64ee9f076b37cd6bb1b9
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20260624/e496a7b7/attachment-0001.htm>


More information about the Pkg-libvirt-commits mailing list