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.
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/AUTHORS +1 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/ChangeLog +47 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/PKG-INFO +1 -1
- libvirt-python-11.3.0/VERSION +1 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/event-test.py +5 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/generator.py +2 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-api.xml +13 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virConnect.py +9 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override.c +178 -51
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override.py +1 -1
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-python.spec +1 -1
- libvirt-python-11.1.0/VERSION +0 -1
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/CONTRIBUTING.rst +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/COPYING +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/HACKING +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/MANIFEST.in +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/Makefile +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/README +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/build/libvirt_python.egg-info/SOURCES.txt +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/README +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/consolecallback.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/dhcpleases.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/dominfo.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domipaddrs.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domrestore.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domsave.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/domstart.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/esxlist.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/guest-vcpus/guest-vcpu-daemon.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/guest-vcpus/guest-vcpu.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/nodestats.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/sparsestream.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/examples/topology.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-lxc-override-api.xml +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-lxc-override.c +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomain.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomainCheckpoint.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virDomainSnapshot.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virNetwork.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virStoragePool.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-override-virStream.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override-api.xml +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override.c +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-qemu-override.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-utils.c +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirt-utils.h +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/libvirtaio.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/pyproject.toml +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/requirements-test.txt +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/setup.cfg +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/setup.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/eventmock.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_aio.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_api_coverage.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_conn.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain_checkpoint.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_domain_snapshot.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_interface.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_network.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_nodedev.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tests/test_storage.py +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/tox.ini +0 -0
- {libvirt-python-11.1.0 → libvirt-python-11.3.0}/typewrappers.c +0 -0
- {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'
|
|
@@ -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 = [
|
|
@@ -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'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'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
|
|
5049
|
-
PyObject *
|
|
5050
|
-
|
|
5078
|
+
PyObject *pyobj_domain = NULL;
|
|
5079
|
+
PyObject *pyobj_dict = NULL;
|
|
5080
|
+
virTypedParameterPtr params = NULL;
|
|
5051
5081
|
int nparams = 0;
|
|
5052
|
-
|
|
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, &
|
|
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 (
|
|
5066
|
-
|
|
5090
|
+
if (PyDict_Check(pyobj_dict)) {
|
|
5091
|
+
if (virPyDictToTypedParams(pyobj_dict, ¶ms, &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
|
-
|
|
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
|
-
|
|
5114
|
-
return
|
|
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, ¶ms, &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
|
|
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
|
libvirt-python-11.1.0/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
11.1.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|