1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-13 12:59:30 +03:00
Commit Graph

885 Commits

Author SHA1 Message Date
283e2bc693 examples: Fix connection error handling
libvirt.open*() does not return None but raises an exception

Signed-off-by: Philipp Hahn <hahn@univention.de>
2020-04-20 13:21:55 +01:00
53565fe096 github: enable lockdown of issues and merge requests
Libvirt uses GitHub as an automated read-only mirror. The goals were to
have a disaster recovery backup for libvirt.org, a way to make it easy
for people to clone their own private copy of libvirt Git, and finally
as a way to interact with apps like Travis.

The project description was set to a message telling people that we
don't respond to pull requests. This was quite a negative message to
potential contributors, and also did not give them any guidance about
the right way to submit to libvirt. Many also missed the description and
submitted issues or pull requests regardless.

It is possible to disable the issue tracker in GitHub, but there is no
way to disable merge requests. Disabling the issue tracker would also
leave the problem of users not being given any positive information
about where they should be reporting instead.

There is a fairly new 3rd party application built for GitHub that
provides a bot which auto-responds to both issues and merge requests,
closing and locking them, with a arbitrary comment:

   https://github.com/apps/repo-lockdown

This commit adds a suitable configuration file for libvirt, which
tries to give a positive response to user's issue/pullreq and guide
them to the desired contribution path on GitLab.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-04-07 17:28:33 +01:00
85c5243497 Release of libvirt-python 6.2.0
* setup.py: bumped version to 6.2.0

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v6.2.0
2020-04-02 21:26:41 +02:00
eed36f8935 tox: Test with Python 3.6, 3.7 and 3.8
Support for Python 2.X has been dropped with commit b22e4f2.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-03-30 12:33:17 +02:00
af65786ef5 Release of libvirt-python 6.1.0
* setup.py : updated for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v6.1.0
2020-03-03 14:53:15 +01:00
95c1bb2fed gitpublish: add 'libvirt-' to subject prefix
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-16 15:44:34 +00:00
ae8e5b1de6 Release of libvirt-python-6.0.0
* setup.py: updated for the release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v6.0.0
2020-01-15 16:23:53 +01:00
56afc9b33f Add overrides for network port UUID getter/lookup methods
The generator creates broken code for all these methods.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-03 11:32:57 +00:00
7b18e3bae8 fix class type instantiated when listing network ports
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-03 11:32:55 +00:00
5efdfd042c setup: Accept 'nosetests3' as nosetests binary
This is the name used on Ubuntu.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-09 16:14:10 +01:00
c7239ca55b Fix RPM deps for centos 7
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-06 13:25:29 +00:00
b22e4f2441 Drop support for python 2
python2 will be end of life by the time of the next
libvirt release. All our supported build targets, including
CentOS7, have a python3 build available.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 12:14:51 +00:00
e3fa4f22d5 Release of libvirt-python 5.10.0
* setup.py: update for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.10.0
2019-12-02 20:50:24 +01:00
fc76416248 generator.py: add mapping for VIR_DOMAIN_QEMU_AGENT_COMMAND_*
Libvirt commit <95f5ac9ae52455e9da47afc95fa31c9456ac27ae> changed the
VIR_DOMAIN_QEMU_AGENT_COMMAND_* enum values to use different enum values
instead of direct numbers.  We need to translate it back.

Traceback (most recent call last):
  File "generator.py", line 2143, in <module>
    qemuBuildWrappers(sys.argv[1])
  File "generator.py", line 2008, in qemuBuildWrappers
    items.sort(key=lambda i: (int(i[1]), i[0]))
  File "generator.py", line 2008, in <lambda>
    items.sort(key=lambda i: (int(i[1]), i[0]))
ValueError: invalid literal for int() with base 10: 'VIR_DOMAIN_AGENT_RESPONSE_TIMEOUT_BLOCK'

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-28 10:55:18 +01:00
1236ff5386 Release of libvirt-python 5.9.0
* setup.py: update for release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
v5.9.0
2019-11-06 15:42:37 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
0c48e03e66 Add new override file to dist
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 17:12:29 +01:00
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
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
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
78611d099e Define virNetworkPortPtr typedef on old libvirt
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-20 12:48:25 +01:00
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
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
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
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
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
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
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
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
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
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
5301118fd1 generator.py: typo fix
Signed-off-by: Eric Blake <eblake@redhat.com>
2019-02-07 14:52:09 -06:00