libvirt-python 11.1.0__tar.gz → 11.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/AUTHORS +1 -0
  2. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/ChangeLog +47 -0
  3. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/PKG-INFO +1 -1
  4. libvirt-python-11.3.0/VERSION +1 -0
  5. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/event-test.py +5 -0
  6. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/generator.py +2 -0
  7. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-api.xml +13 -0
  8. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virConnect.py +9 -0
  9. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override.c +178 -51
  10. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override.py +1 -1
  11. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-python.spec +1 -1
  12. libvirt-python-11.1.0/VERSION +0 -1
  13. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/CONTRIBUTING.rst +0 -0
  14. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/COPYING +0 -0
  15. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/HACKING +0 -0
  16. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/MANIFEST.in +0 -0
  17. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/Makefile +0 -0
  18. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/README +0 -0
  19. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/build/libvirt_python.egg-info/SOURCES.txt +0 -0
  20. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/README +0 -0
  21. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/consolecallback.py +0 -0
  22. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/dhcpleases.py +0 -0
  23. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/dominfo.py +0 -0
  24. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domipaddrs.py +0 -0
  25. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domrestore.py +0 -0
  26. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domsave.py +0 -0
  27. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domstart.py +0 -0
  28. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/esxlist.py +0 -0
  29. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/guest-vcpus/guest-vcpu-daemon.py +0 -0
  30. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/guest-vcpus/guest-vcpu.py +0 -0
  31. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/nodestats.py +0 -0
  32. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/sparsestream.py +0 -0
  33. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/topology.py +0 -0
  34. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-lxc-override-api.xml +0 -0
  35. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-lxc-override.c +0 -0
  36. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomain.py +0 -0
  37. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomainCheckpoint.py +0 -0
  38. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomainSnapshot.py +0 -0
  39. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virNetwork.py +0 -0
  40. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virStoragePool.py +0 -0
  41. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virStream.py +0 -0
  42. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override-api.xml +0 -0
  43. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override.c +0 -0
  44. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override.py +0 -0
  45. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-utils.c +0 -0
  46. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-utils.h +0 -0
  47. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirtaio.py +0 -0
  48. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/pyproject.toml +0 -0
  49. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/requirements-test.txt +0 -0
  50. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/setup.cfg +0 -0
  51. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/setup.py +0 -0
  52. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/eventmock.py +0 -0
  53. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_aio.py +0 -0
  54. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_api_coverage.py +0 -0
  55. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_conn.py +0 -0
  56. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain.py +0 -0
  57. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain_checkpoint.py +0 -0
  58. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain_snapshot.py +0 -0
  59. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_interface.py +0 -0
  60. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_network.py +0 -0
  61. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_nodedev.py +0 -0
  62. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_storage.py +0 -0
  63. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tox.ini +0 -0
  64. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/typewrappers.c +0 -0
  65. {libvirt-python-11.1.0 → libvirt-python-11.3.0}/typewrappers.h +0 -0
@@ -91,6 +91,7 @@ The individual contributors are
91
91
  Serge E. Hallyn <serge.hallyn@canonical.com>
92
92
  Sergei Turchanov <turchanov@farpost.com>
93
93
  Stefan Berger <stefanb@us.ibm.com>
94
+ SuhailAhmedVelorum <suhailahmedvelorum@gmail.com>
94
95
  Taizo ITO <taizo.ito@hde.co.jp>
95
96
  Taku Izumi <izumi.taku@jp.fujitsu.com>
96
97
  Tomoki Sekiyama <tomoki.sekiyama@hds.com>
@@ -1,3 +1,50 @@
1
+ 2025- 4- 1 Jiri Denemark <jdenemar@redhat.com>
2
+
3
+ Post-release version bump to 11.3.0
4
+
5
+
6
+ 2025- 3- 26 SuhailAhmedVelorum <suhailahmedvelorum@gmail.com>
7
+
8
+ Fixed minor typo in libvirt-override.py::openAuth TODO item
9
+
10
+
11
+ 2025- 3- 25 Michal Privoznik <mprivozn@redhat.com>
12
+
13
+ Add support for domain NIC MAC address change event
14
+
15
+
16
+ 2025- 3- 21 Michal Privoznik <mprivozn@redhat.com>
17
+
18
+ override: domain: Implement override for virDomainSetThrottleGroup()
19
+ The bindings generator can't generate proper bindings for
20
+ virDomainSetThrottleGroup() (because of typed parameters in the
21
+ arguments) so implement it manually.
22
+
23
+
24
+
25
+ 2025- 3- 21 Michal Privoznik <mprivozn@redhat.com>
26
+
27
+ override: domain: Implement override for virDomainGetAutostartOnce()
28
+ The bindings generator can't generate proper bindings for
29
+ virDomainGetAutostartOnce() (because of int* in the arguments) so
30
+ implement it manually.
31
+
32
+
33
+
34
+ 2025- 3- 21 Michal Privoznik <mprivozn@redhat.com>
35
+
36
+ Modernize typed parameter fetching in libvirt_virDomainSetBlockIoTune()
37
+ Instead of fetching supported tunables and passing only those to
38
+ the API (effectively ignoring unsupported ones), pass all
39
+ tunables or error out on unsupported ones.
40
+
41
+
42
+
43
+ 2025- 3- 3 Jiri Denemark <jdenemar@redhat.com>
44
+
45
+ Post-release version bump to 11.2.0
46
+
47
+
1
48
  2025- 2- 17 Pavel Hrdina <phrdina@redhat.com>
2
49
 
3
50
  ci: refresh with 'lcitool manifest'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libvirt-python
3
- Version: 11.1.0
3
+ Version: 11.3.0
4
4
  Summary: The libvirt virtualization API python binding
5
5
  Home-page: http://www.libvirt.org
6
6
  Maintainer: Libvirt Maintainers
@@ -0,0 +1 @@
1
+ 11.3.0
@@ -648,6 +648,10 @@ def myDomainEventMemoryDeviceSizeChangeCallback(conn: libvirt.virConnect, dom: l
648
648
  print("myDomainEventMemoryDeviceSizeChangeCallback: Domain %s(%s) memory device size change alias %s size %d" % (
649
649
  dom.name(), dom.ID(), alias, size))
650
650
 
651
+ def myDomainEventNICMACChangeCallback(conn: libvirt.virConnect, dom: libvirt.virDomain, alias: str, oldMAC: str, newMAC: str, opaque: _T) -> None:
652
+ print("myDomainEventNICMACChangeCallback: Domain %s(%s) NIC MAC change alias %s old MAC: %s new MAC: %s" % (
653
+ dom.name(), dom.ID(), alias, oldMAC, newMAC))
654
+
651
655
 
652
656
  ##########################################################################
653
657
  # Network events
@@ -806,6 +810,7 @@ def main() -> None:
806
810
  vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD, myDomainEventBlockThresholdCallback, None),
807
811
  vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MEMORY_FAILURE, myDomainEventMemoryFailureCallback, None),
808
812
  vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE, myDomainEventMemoryDeviceSizeChangeCallback, None),
813
+ vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE, myDomainEventNICMACChangeCallback, None),
809
814
  ]
810
815
 
811
816
  netcallbacks = [
@@ -440,6 +440,8 @@ skip_impl = {
440
440
  'virNodeDeviceGetAutostart',
441
441
  'virDomainSaveParams',
442
442
  'virDomainRestoreParams',
443
+ 'virDomainGetAutostartOnce',
444
+ 'virDomainSetThrottleGroup',
443
445
 
444
446
  'virDomainLxcOpenNamespace',
445
447
 
@@ -866,5 +866,18 @@
866
866
  <arg name='params' type='virTypedParameterPtr' info='pointer to save parameter objects'/>
867
867
  <arg name='flags' type='int' info='an OR&apos;ed set of virDomainSaveRestoreFlags'/>
868
868
  </function>
869
+ <function name='virDomainGetAutostartOnce' file='python'>
870
+ <info>Provides a boolean value indicating whether the domain is configured to be automatically started the next time the host machine boots only.</info>
871
+ <return type='int' info='the autostart flag, or None in case of error'/>
872
+ <arg name='domain' type='virDomainPtr' info='a network object'/>
873
+ </function>
874
+ <function name='virDomainSetThrottleGroup' file='python'>
875
+ <info>Add throttlegroup or change all of the throttlegroup options within specific domain.</info>
876
+ <return type='int' info='0 in case of success and -1 in case of failure'/>
877
+ <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
878
+ <arg name='group' type='const char *' info='throttle group name'/>
879
+ <arg name='params' type='virTypedParameterPtr' info='pointer to blkio parameter objects'/>
880
+ <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
881
+ </function>
869
882
  </symbols>
870
883
  </api>
@@ -279,6 +279,15 @@
279
279
  cb(self, virDomain(self, _obj=dom), alias, size, opaque)
280
280
  return 0
281
281
 
282
+ def _dispatchDomainEventNICMACChangeCallback(self, dom: 'virDomain', alias: str, oldMAC: str, newMAC: str, cbData: Dict[str, Any]) -> int:
283
+ """Dispatches event to python user domain NIC MAC change event callbacks
284
+ """
285
+ cb = cbData["cb"]
286
+ opaque = cbData["opaque"]
287
+
288
+ cb(self, virDomain(self, _obj=dom), alias, oldMAC, newMAC, opaque)
289
+ return 0
290
+
282
291
  def domainEventDeregisterAny(self, callbackID: int) -> None:
283
292
  """Removes a Domain Event Callback. De-registering for a
284
293
  domain callback will disable delivery of this event type """
@@ -5040,78 +5040,74 @@ libvirt_virDomainGetBlockJobInfo(PyObject *self ATTRIBUTE_UNUSED,
5040
5040
  return NULL;
5041
5041
  }
5042
5042
 
5043
+ static virPyTypedParamsHint virPyDomainSetBlockIoTuneParams[] = {
5044
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC, VIR_TYPED_PARAM_ULLONG },
5045
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC, VIR_TYPED_PARAM_ULLONG },
5046
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC, VIR_TYPED_PARAM_ULLONG },
5047
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC, VIR_TYPED_PARAM_ULLONG },
5048
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC, VIR_TYPED_PARAM_ULLONG },
5049
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC, VIR_TYPED_PARAM_ULLONG },
5050
+ #if LIBVIR_CHECK_VERSION(1, 2, 11)
5051
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5052
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5053
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5054
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5055
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5056
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX, VIR_TYPED_PARAM_ULLONG },
5057
+ { VIR_DOMAIN_BLOCK_IOTUNE_SIZE_IOPS_SEC, VIR_TYPED_PARAM_ULLONG },
5058
+ #endif /* LIBVIR_CHECK_VERSION(1, 2, 11) */
5059
+ #if LIBVIR_CHECK_VERSION(2, 4, 0)
5060
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5061
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5062
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5063
+ { VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5064
+ { VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5065
+ { VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC_MAX_LENGTH, VIR_TYPED_PARAM_ULLONG },
5066
+ #endif /* LIBVIR_CHECK_VERSION(2, 4, 0) */
5067
+ #if LIBVIR_CHECK_VERSION(3, 0, 0)
5068
+ { VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME, VIR_TYPED_PARAM_STRING },
5069
+ #endif /* LIBVIR_CHECK_VERSION(3, 0, 0) */
5070
+ };
5071
+
5072
+
5043
5073
  static PyObject *
5044
5074
  libvirt_virDomainSetBlockIoTune(PyObject *self ATTRIBUTE_UNUSED,
5045
5075
  PyObject *args)
5046
5076
  {
5047
5077
  virDomainPtr domain;
5048
- PyObject *pyobj_domain, *info;
5049
- PyObject *ret = NULL;
5050
- int i_retval;
5078
+ PyObject *pyobj_domain = NULL;
5079
+ PyObject *pyobj_dict = NULL;
5080
+ virTypedParameterPtr params = NULL;
5051
5081
  int nparams = 0;
5052
- Py_ssize_t size = 0;
5082
+ int c_retval;
5053
5083
  const char *disk;
5054
5084
  unsigned int flags;
5055
- virTypedParameterPtr params = NULL, new_params = NULL;
5056
5085
 
5057
5086
  if (!PyArg_ParseTuple(args, (char *)"OzOI:virDomainSetBlockIoTune",
5058
- &pyobj_domain, &disk, &info, &flags))
5059
- return NULL;
5060
- domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
5061
-
5062
- if ((size = PyDict_Size(info)) < 0)
5087
+ &pyobj_domain, &disk, &pyobj_dict, &flags))
5063
5088
  return NULL;
5064
5089
 
5065
- if (size == 0) {
5066
- PyErr_Format(PyExc_LookupError,
5090
+ if (PyDict_Check(pyobj_dict)) {
5091
+ if (virPyDictToTypedParams(pyobj_dict, &params, &nparams,
5092
+ virPyDomainSetBlockIoTuneParams,
5093
+ VIR_N_ELEMENTS(virPyDomainSetBlockIoTuneParams)) < 0) {
5094
+ return NULL;
5095
+ }
5096
+ } else {
5097
+ PyErr_Format(PyExc_TypeError,
5067
5098
  "Need non-empty dictionary to set attributes");
5068
5099
  return NULL;
5069
5100
  }
5101
+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
5070
5102
 
5071
- LIBVIRT_BEGIN_ALLOW_THREADS;
5072
- i_retval = virDomainGetBlockIoTune(domain, disk, NULL, &nparams, flags);
5073
- LIBVIRT_END_ALLOW_THREADS;
5074
-
5075
- if (i_retval < 0)
5076
- return VIR_PY_INT_FAIL;
5077
-
5078
- if (nparams == 0) {
5079
- PyErr_Format(PyExc_LookupError,
5080
- "Domain has no settable attributes");
5081
- return NULL;
5082
- }
5083
-
5084
- if (VIR_ALLOC_N(params, nparams) < 0)
5085
- return PyErr_NoMemory();
5086
-
5087
- LIBVIRT_BEGIN_ALLOW_THREADS;
5088
- i_retval = virDomainGetBlockIoTune(domain, disk, params, &nparams, flags);
5089
- LIBVIRT_END_ALLOW_THREADS;
5090
-
5091
- if (i_retval < 0) {
5092
- ret = VIR_PY_INT_FAIL;
5093
- goto cleanup;
5094
- }
5095
-
5096
- new_params = setPyVirTypedParameter(info, params, nparams);
5097
- if (!new_params)
5098
- goto cleanup;
5099
5103
 
5100
5104
  LIBVIRT_BEGIN_ALLOW_THREADS;
5101
- i_retval = virDomainSetBlockIoTune(domain, disk, new_params, size, flags);
5105
+ c_retval = virDomainSetBlockIoTune(domain, disk, params, nparams, flags);
5102
5106
  LIBVIRT_END_ALLOW_THREADS;
5103
5107
 
5104
- if (i_retval < 0) {
5105
- ret = VIR_PY_INT_FAIL;
5106
- goto cleanup;
5107
- }
5108
-
5109
- ret = VIR_PY_INT_SUCCESS;
5110
-
5111
- cleanup:
5112
5108
  virTypedParamsFree(params, nparams);
5113
- virTypedParamsFree(new_params, size);
5114
- return ret;
5109
+
5110
+ return libvirt_intWrap(c_retval);
5115
5111
  }
5116
5112
 
5117
5113
  static PyObject *
@@ -7399,6 +7395,62 @@ libvirt_virConnectDomainEventMemoryDeviceSizeChangeCallback(virConnectPtr conn A
7399
7395
  #endif /* VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE */
7400
7396
 
7401
7397
 
7398
+ #ifdef VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE
7399
+ static int
7400
+ libvirt_virConnectDomainEventNICMACChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
7401
+ virDomainPtr dom,
7402
+ const char *alias,
7403
+ const char *oldMAC,
7404
+ const char *newMAC,
7405
+ void *opaque)
7406
+ {
7407
+ PyObject *pyobj_cbData = (PyObject*)opaque;
7408
+ PyObject *pyobj_dom;
7409
+ PyObject *pyobj_ret = NULL;
7410
+ PyObject *pyobj_conn;
7411
+ PyObject *dictKey;
7412
+ int ret = -1;
7413
+
7414
+ LIBVIRT_ENSURE_THREAD_STATE;
7415
+
7416
+ if (!(dictKey = libvirt_constcharPtrWrap("conn")))
7417
+ goto cleanup;
7418
+ pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey);
7419
+ Py_DECREF(dictKey);
7420
+
7421
+ /* Create a python instance of this virDomainPtr */
7422
+ virDomainRef(dom);
7423
+ if (!(pyobj_dom = libvirt_virDomainPtrWrap(dom))) {
7424
+ virDomainFree(dom);
7425
+ goto cleanup;
7426
+ }
7427
+ Py_INCREF(pyobj_cbData);
7428
+
7429
+ /* Call the Callback Dispatcher */
7430
+ pyobj_ret = PyObject_CallMethod(pyobj_conn,
7431
+ (char*)"_dispatchDomainEventNICMACChangeCallback",
7432
+ (char*)"OsssO",
7433
+ pyobj_dom, alias, oldMAC, newMAC,
7434
+ pyobj_cbData);
7435
+
7436
+ Py_DECREF(pyobj_cbData);
7437
+ Py_DECREF(pyobj_dom);
7438
+
7439
+ cleanup:
7440
+ if (!pyobj_ret) {
7441
+ DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
7442
+ PyErr_Print();
7443
+ } else {
7444
+ Py_DECREF(pyobj_ret);
7445
+ ret = 0;
7446
+ }
7447
+
7448
+ LIBVIRT_RELEASE_THREAD_STATE;
7449
+ return ret;
7450
+ }
7451
+ #endif /* VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE */
7452
+
7453
+
7402
7454
  static PyObject *
7403
7455
  libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
7404
7456
  PyObject *args)
@@ -7534,6 +7586,11 @@ libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
7534
7586
  cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventMemoryDeviceSizeChangeCallback);
7535
7587
  break;
7536
7588
  #endif /* VIR_DOMAIN_EVENT_ID_MEMORY_DEVICE_SIZE_CHANGE */
7589
+ #ifdef VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE
7590
+ case VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE:
7591
+ cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventNICMACChangeCallback);
7592
+ break;
7593
+ #endif /* VIR_DOMAIN_EVENT_ID_NIC_MAC_CHANGE */
7537
7594
  case VIR_DOMAIN_EVENT_ID_LAST:
7538
7595
  break;
7539
7596
  }
@@ -10917,6 +10974,72 @@ libvirt_virDomainFDAssociate(PyObject *self ATTRIBUTE_UNUSED,
10917
10974
  #endif /* LIBVIR_CHECK_VERSION(9, 0, 0) */
10918
10975
 
10919
10976
 
10977
+ #if LIBVIR_CHECK_VERSION(11, 2, 0)
10978
+ static PyObject *
10979
+ libvirt_virDomainGetAutostartOnce(PyObject *self ATTRIBUTE_UNUSED,
10980
+ PyObject *args)
10981
+ {
10982
+ int c_retval, autostart;
10983
+ virDomainPtr domain;
10984
+ PyObject *pyobj_domain;
10985
+
10986
+ if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetAutostartOnce",
10987
+ &pyobj_domain))
10988
+ return NULL;
10989
+
10990
+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
10991
+
10992
+ LIBVIRT_BEGIN_ALLOW_THREADS;
10993
+ c_retval = virDomainGetAutostartOnce(domain, &autostart);
10994
+ LIBVIRT_END_ALLOW_THREADS;
10995
+
10996
+ if (c_retval < 0)
10997
+ return VIR_PY_INT_FAIL;
10998
+
10999
+ return libvirt_intWrap(autostart);
11000
+ }
11001
+
11002
+ static PyObject *
11003
+ libvirt_virDomainSetThrottleGroup(PyObject *self ATTRIBUTE_UNUSED,
11004
+ PyObject *args)
11005
+ {
11006
+ virDomainPtr domain;
11007
+ PyObject *pyobj_domain;
11008
+ const char *group = NULL;
11009
+ PyObject *pyobj_dict = NULL;
11010
+ virTypedParameterPtr params = NULL;
11011
+ int nparams = 0;
11012
+ unsigned int flags = 0;
11013
+ int c_retval;
11014
+
11015
+ if (!PyArg_ParseTuple(args, (char *)"OsO|I:virDomainSetThrottleGroup",
11016
+ &pyobj_domain, &group, &pyobj_dict, &flags))
11017
+ return NULL;
11018
+
11019
+ domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
11020
+
11021
+ if (PyDict_Check(pyobj_dict)) {
11022
+ if (virPyDictToTypedParams(pyobj_dict, &params, &nparams,
11023
+ virPyDomainSetBlockIoTuneParams,
11024
+ VIR_N_ELEMENTS(virPyDomainSetBlockIoTuneParams)) < 0) {
11025
+ return NULL;
11026
+ }
11027
+ } else {
11028
+ PyErr_Format(PyExc_TypeError, "Restore params must be a dictionary");
11029
+ return NULL;
11030
+ }
11031
+
11032
+
11033
+ LIBVIRT_BEGIN_ALLOW_THREADS;
11034
+ c_retval = virDomainSetThrottleGroup(domain, group, params, nparams, flags);
11035
+ LIBVIRT_END_ALLOW_THREADS;
11036
+
11037
+ virTypedParamsFree(params, nparams);
11038
+
11039
+ return libvirt_intWrap(c_retval);
11040
+ }
11041
+ #endif /* LIBVIR_CHECK_VERSION(11, 2, 0) */
11042
+
10920
11043
 
10921
11044
  /************************************************************************
10922
11045
  * *
@@ -11202,6 +11325,10 @@ static PyMethodDef libvirtMethods[] = {
11202
11325
  #if LIBVIR_CHECK_VERSION(9, 0, 0)
11203
11326
  {(char *) "virDomainFDAssociate", libvirt_virDomainFDAssociate, METH_VARARGS, NULL},
11204
11327
  #endif /* LIBVIR_CHECK_VERSION(9, 0, 0) */
11328
+ #if LIBVIR_CHECK_VERSION(11, 2, 0)
11329
+ {(char *) "virDomainGetAutostartOnce", libvirt_virDomainGetAutostartOnce, METH_VARARGS, NULL},
11330
+ {(char *) "virDomainSetThrottleGroup", libvirt_virDomainSetThrottleGroup, METH_VARARGS, NULL},
11331
+ #endif /* LIBVIR_CHECK_VERSION(11, 2, 0) */
11205
11332
  {NULL, NULL, 0, NULL}
11206
11333
  };
11207
11334
 
@@ -91,7 +91,7 @@ def registerErrorHandler(f: Callable[[_T, List], None], ctx: _T) -> int:
91
91
 
92
92
 
93
93
  def openAuth(uri: str, auth: List, flags: int = 0) -> 'virConnect':
94
- # TODO: The C code rquires a List and there is not *Mutable*Tuple for a better description such as
94
+ # TODO: The C code requires a List and there is not *Mutable*Tuple for a better description such as
95
95
  # auth: Tuple[List[int], Callable[[List[MutableTuple[int, str, str, str, Any]], _T], int], _T]
96
96
  """
97
97
  This function should be called first to get a connection to the
@@ -14,7 +14,7 @@
14
14
 
15
15
  Summary: The libvirt virtualization API python3 binding
16
16
  Name: libvirt-python
17
- Version: 11.1.0
17
+ Version: 11.3.0
18
18
  Release: 1%{?dist}
19
19
  Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz
20
20
  Url: https://libvirt.org
@@ -1 +0,0 @@
1
- 11.1.0
File without changes
File without changes
File without changes
File without changes