1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-12-06 00:23:47 +03:00
Commit Graph

870 Commits

Author SHA1 Message Date
Daniel Veillard
70ad5acdfd Release of libvirt-python 5.8.0
* setup.py: updated version

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.8.0
2019-10-05 09:55:23 +02:00
Pavel Hrdina
ebd352515d virDomainMigrate3Params: add missing parallel connections param
Introduced in libvirt 5.2.0 by commit <d3ea986af24>.

Reported-by: Liping Cheng <lcheng@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-23 13:58:37 +02:00
Pavel Hrdina
1c20685831 virDomainMigrate3Params: add missing bandwidth postcopy param
Introduced in libvirt 5.1.0 by commit <c830187a015>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-23 13:58:27 +02:00
Daniel P. Berrangé
873e0ca7db Custom impl for virConnectSetIdentity which can't be generated
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-20 13:51:20 +01:00
Pavel Hrdina
d76c27e385 virDomainMemoryStats: include hugetlb pgalloc and pgfail
Introduced in libvirt 5.4.0 by commit <a699b19f6c3>.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1683516

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-20 12:58:35 +02:00
Pavel Hrdina
b0a7747ddd virDomainMemoryStats: include disk caches
Introduced in libvirt 4.6.0 by commit <aee04655089>.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1683516

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-20 12:58:30 +02:00
Daniel P. Berrangé
6b2b3b7ea2 sanitytest: whitelist 'network' method as having no C impl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-12 16:09:58 +01:00
Daniel P. Berrangé
6dff8e4f3f generator: fix constructor for virNetworkPort
The virNetworkPort class is passed both the virNetwork parent
python class and the virNetworkPort C object. This needs special
handling in the generator, similar to how virDomainSnapshots are
dealt with.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-12 15:28:13 +01:00
Cole Robinson
5fe311f1f3 Fix -Wsign-compare warnings
libvirt-override.c: In function ‘libvirt_virConnectBaselineHypervisorCPU’:
libvirt-override.c:9946:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
libvirt-override.c:9961:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]

Use ssize_t as was similarly done in 75ec2acb61

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-05 14:04:17 -04:00
Daniel Veillard
162df20172 Release of libvirt-python 5.7.0
Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.7.0
2019-09-03 17:30:40 +02:00
Nir Soffer
9dc11ea157 spec: Build python2 package in fedora < 31
Since commit ee0cfbe65c (spec: Unconditionally build python2 on
Fedora) python2-libvirt is not built on any Fedora version.

Fix the spec to drop python2-libvirt on Fedora 31.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-09-03 10:42:36 -04:00
Michal Privoznik
17937cc337 Implement virDomainGetGuestInfo
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-08-29 12:04:56 +02:00
Daniel Veillard
d3e647e20b Release of libvirt-python-5.6.0
* setup.py: updated for new release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.6.0
2019-08-05 19:21:45 +02:00
Eric Blake
da9adbd3e5 Define virDomainCheckpointPtr typedef on old libvirt
Needed prior to 5.6.0

Signed-off-by: Eric Blake <eblake@redhat.com>
2019-07-29 14:22:16 -05:00
Eric Blake
358a8640fa Add virDomainCheckpoint APIs
Copies heavily from existing virDomainSnapshot handling, regarding
what special cases the generator has to be taught and what overrides
need to be written.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-29 13:39:39 -05:00
Cole Robinson
5e9d1aa7fa spec: Bump minimum supported Fedora version to 29
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-07-09 19:11:20 -04:00
Cole Robinson
ee0cfbe65c spec: Unconditionally build python2 on Fedora
In Fedora we are currently shipping python2 bindings for all builds,
so this conditional is out of date. Fedora 31 may be the time that
python2 bindings are dropped:

https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal

But I think it's better to wait for that to actually happen before
we change this again

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-07-09 19:11:20 -04:00
Daniel Veillard
ed2e7e79e5 Release of libvirt-python 5.5.0
* setup.py: update for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.5.0
2019-07-02 22:48:04 +02:00
Sergei Turchanov
6798609a5e Fix regression in lxcOpenNamespace
This fixes regression caused by the 1d39dbaf63

fdlist[i] erroneously was replaced by fdlist[1] which caused
lxcOpenNamespace to return a list with identical elements.

Signed-off-by: Sergei Turchanov <turchanov@farpost.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2019-06-26 09:14:17 +02:00
Daniel P. Berrangé
0c48e03e66 Add new override file to dist
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 17:12:29 +01:00
Daniel P. Berrangé
204d3c061b Add missing impl of virNetworkListAllPorts
This API needs manual impl as the generator cannot cope

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 14:21:06 +01:00
Daniel P. Berrangé
c4e529ff28 sanitytest: add some special cases for virNetworkPort APIs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 14:20:05 +01:00
Daniel P. Berrangé
05089cc402 generator: fix naming of getter APIs for virNetworkPort
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 14:10:08 +01:00
Daniel P. Berrangé
78611d099e Define virNetworkPortPtr typedef on old libvirt
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 12:48:25 +01:00
Daniel P. Berrangé
a57c86593e Fix syntax error with missing ; and too many )
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 12:48:07 +01:00
Daniel P. Berrangé
a4de6e2ed8 Add support for virNetworkPort object & APIs
Define the various rules in the generator to wire up methods into the
virNetwork class and create the new virNetworkPort class.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 12:11:59 +01:00
Daniel Veillard
56aca89b03 Release of Libvirt-python 5.4.0
Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.4.0
2019-06-03 17:07:33 +02:00
Daniel Veillard
8c682830a5 Release of libvirt-python 5.3.0
* setup.py: bumped release version

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.3.0
2019-05-04 20:19:34 +02:00
Michal Privoznik
5004b4ad53 Allow virConnect.getDomainCapabilities() to have no arguments
Our C API allows no values to be passed (well, it accepts all
NULLs). There's no reason that python binding should require all
arguments.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
2019-04-29 15:24:13 +02:00
Daniel P. Berrangé
da3391a135 rpm: use new python macros for build/install rules
The new %py{2,3}_{build,install} macros ensure that the right compiler
and linker flags are used when building python modules.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-04-04 12:37:23 +01:00
Daniel Veillard
67dcc18908 Release of libvirt-python 5.2.0
* setup.py: bumped release version up

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.2.0
2019-04-03 09:46:40 +02:00
Nir Soffer
5d6228d417 Fix handling of optional params in blockCopy()
Commit 2b4bd07e0a (Add check for params, nparams being a dictionary)
changed the way the optional params argument is treated. If
libvirt.virDomain.blockCopy() is called without specifying params,
params is None, and the call will fail with:

    TypeError: block params must be a dictionary

This is wrong as params is defined as kwarg, breaking existing libvirt
users like oVirt. Add a check for Py_None, so we accept either a dict or
None and fail with TypeError with anything else.

Resolves: https://bugzilla.redhat.com/1687114

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2019-03-12 08:48:45 +01:00
Daniel Veillard
54e430448e Release of libvirt-python 5.1.0
* setup.py: updated for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.1.0
2019-03-04 11:42:24 +01:00
Pavel Hrdina
878446e7f9 Fix virDomainPinIOThread typed params check
The VIR_DOMAIN_IOTHREAD_POLL_SHRINK is unsigned int.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1680546

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-02-25 13:04:05 +01:00
Eric Blake
5301118fd1 generator.py: typo fix
Signed-off-by: Eric Blake <eblake@redhat.com>
2019-02-07 14:52:09 -06:00
Daniel P. Berrangé
26fd22c004 travis: add testing of 5.0.0 release
Update to test against very latest release. Since we dropped two
python versions, we can afford to add new libvirt version without
dropping a previous one.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-24 17:17:09 +00:00
Daniel P. Berrangé
6670080bc3 travis: switch from trusty to xenial dist
The trusty gnutls version is too old to support modern libvirt

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-24 17:17:05 +00:00
Daniel P. Berrangé
8bafc3052f travis: remove python 2.6 and 3.6 from build matrix
The lxml package that we download with pip no longer supports either
of these versions of python.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-24 17:16:55 +00:00
Daniel P. Berrangé
8bd4c9374a rpm spec: remove %{extra_release} from spec
The %{extra_release} field was previously populated by data from the old
autobuild.sh file but is no longer used.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-22 11:20:04 +00:00
Daniel Veillard
6c80cf5415 Release of libvirt-python 5.0.0
* setup.py: updated for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.0.0
2019-01-15 20:34:03 +01:00
Daniel Veillard
c57981ca71 Release of libvirt-python-4.10.0
* setup.py: update to bump release number

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v4.10.0
2018-12-03 13:23:07 +01:00
Philipp Hahn
389cc9d0c7 Add daemon to list of shutdown reasons
Add the support to work with libvirt commit 66a85cb13.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2018-11-26 14:13:49 +01:00
John Ferlan
8f745819c9 Fix copy paste error on the version check value
Signed-off-by: John Ferlan <jferlan@redhat.com>
2018-11-20 13:54:52 -05:00
John Ferlan
9bc102103c Implement API binding for virDomainSetIOThreadParams
Similar to libvirt_virDomainBlockCopy (and migration API's). Create
the code for the new API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-11-20 13:24:18 -05:00
John Ferlan
2b4bd07e0a Add check for params, nparams being a dictionary
If PyDict_Check fails, we should force an error rather than
blindly continuing on.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-11-20 13:24:13 -05:00
John Ferlan
1479577af3 Add missing virPyDictToTypedParams for libvirt_virDomainBlockCopy
Need to free params like similar API's such as libvirt_virDomainMigrate3
and libvirt_virDomainMigrateToURI3.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-11-20 11:26:37 -05:00
John Ferlan
2f3ed45cd8 Fix typos in virDomainSetSchedulerParameters name
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-11-20 11:21:42 -05:00
Daniel Veillard
65d63bca20 Release of libvirt-python 4.9.0
* setup.py: update for new release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v4.9.0
2018-11-04 18:15:48 +01:00
Philipp Hahn
9af6f1a5d3 event-test.py: Report ERROR events
VIR_DOMAIN_EVENT_ID_IO_ERROR and VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
callbacks receive the same 'action' parameter, so also translate that
numeric action to a descriptive text for the first callback.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2018-11-01 14:09:20 +01:00
Philipp Hahn
c8b6e5fc3c event-test.py: Fix ERROR event
ERROR_EVENTS translates the numeric 'action' argument to a description,
not the 'reason' argument which already contains a descriptive string
like 'enospc'.

> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 4661, in _dispatchDomainEventIOErrorReasonCallback
>     reason, opaque)
>   File "libvirt-python/examples/event-test.py", line 536, in myDomainEventIOErrorReasonCallback
>     dom.name(), dom.ID(), srcpath, devalias, action, ERROR_EVENTS[reason]))
>   File "libvirt-python/examples/event-test.py", line 474, in __getitem__
>     data = self.args[item]
> TypeError: tuple indices must be integers, not str

Fixes: f5928c6711
Signed-off-by: Philipp Hahn <hahn@univention.de>
2018-11-01 14:09:20 +01:00