1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2024-10-26 07:55:06 +03:00
Commit Graph

1085 Commits

Author SHA1 Message Date
Daniel P. Berrangé
8f6f402142 Switch to new GitHub repo-lockdown configuration
The repo-lockdown service used to run as a bot outside GitHub, but has
now switched to using the GitHub Actions workflow framework. This
requires use of a new configuration file.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-12-01 09:27:50 +00:00
Jiri Denemark
a4eed6751b Post-release version bump to 7.10.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-11-01 13:23:27 +01:00
Daniel P. Berrangé
13ddf17f83 Add support for domain event for memory device size change
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-10-08 11:23:27 +01:00
Jiri Denemark
aa0286fa6c Post-release version bump to 7.9.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-10-01 10:40:13 +02:00
Michal Privoznik
7d47523bb0 sanitytest: Add virNetworkCreateXMLFlags() to list of name fixups
When checking whether each C API is exported to Python and vice
versa the sanitytest script is doing some name fixing. For
instance virNetworkCreateXML() is translated into
virConnect.networkCreateXML(). However, we have new C API on the
way: virNetworkCreateXMLFlags() which is not on the list for
these name fixups. Add it there.

Mind you, the python code generator works just fine because
generator.py:1082 compares just the prefix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-09-24 08:34:50 +02:00
Jonathon Jongsma
cd18f45235 Don't mention email patch submission in README
Since patches are now submitted via gitlab merge requests, don't mention
mailing list patch submission in the README. Point to the CONTRIBUTING
file instead.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-09-21 16:11:07 -05:00
Jonathon Jongsma
2c9ad18dd1 Update readme to mention pytest instead of nose
Commit a376a2ab switch from python-nose to python-pytest for tests, but
the README was not updated.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-09-21 16:11:07 -05:00
Jonathon Jongsma
066af64107 Add new autostart API for node devices
Provide a manual override for the virNodeDeviceGetAutostart() API
modeled on what's done for the network and storage APIs.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2021-09-21 16:11:07 -05:00
Daniel P. Berrangé
e78e2bae31 ci: remove obsolete refresh script and documentation
We now use lcitool's manifest feature to generate files.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-02 17:53:58 +01:00
Daniel P. Berrangé
d5d4676631 ci: re-generate containers/gitlab config from manifest
This uses the command "lcitool manifest ci/manifest.yml" to re-generate
all existing dockerfiles and gitlab CI config.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-02 17:53:58 +01:00
Daniel P. Berrangé
cf3c20bb4f ci: define a CI manifest file
This is to be used with the command "lcitool manifest ci/manifest.yml"
to re-generate all existing dockerfiles and gitlab CI config.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-02 17:53:58 +01:00
Daniel P. Berrangé
5d7bd23980 rpm: drop support for RHEL-7
We no longer support libvirt on this distro

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-09-01 18:33:28 +01:00
Jiri Denemark
dd5e2d796e Post-release version bump to 7.8.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-09-01 13:47:00 +02:00
Jiri Denemark
3ec079df29 Post-release version bump to 7.7.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-08-02 12:28:43 +02:00
Daniel P. Berrangé
27f55b0130 gitlab: use custom docker:dind image
The current docker:dind container has broken default seccomp filter that
results in clone3 being blocked, which in turn breaks Fedora 35 rawhide.

This custom image has a workaround that causes the seccomp filter to
return ENOSYS for clone3 instad of EPERM, thus triggering glibc to
fallback to clone correctly.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-07-27 14:53:31 +01:00
Jiri Denemark
f18d6b038e Post-release version bump to 7.6.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-07-01 15:44:56 +02:00
Peter Krempa
b5cd547bfd Fix BlockThreshold Callback argument conversion once more
The conversion was changed from "OssiiO" to "OssLLO". Unfortunately the
arguments are unsigned long long, where the proper coversion character
is 'K'.

Fixes: https://gitlab.com/libvirt/libvirt-python/-/merge_requests/40
Fixes: fd069ac85c
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1976109
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2021-06-25 10:48:56 +02:00
Jiri Denemark
7df337cad2 Post-release version bump to 7.5.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-06-01 12:08:38 +02:00
w00506750
b47727460e iothread: fix memory access out of bounds
When the 'pcpu' is larger then the last 'iothr->cpumap' bits,
set the list element to False to avoid out of bounds access
'iothr->cpumap'.

Signed-off-by: suruifeng <suruifeng@huawei.com>
Reviewed-by: Hogan Wang <hogan.wang@huawei.com>
2021-05-27 13:23:16 +00:00
Jiri Denemark
23ea62992f Post-release version bump to 7.4.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-05-27 12:33:31 +00:00
Daniel P. Berrangé
3475abfa54 containers: refresh containers with latest libvirt-ci
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 13:07:58 +01:00
Daniel P. Berrangé
4cf9e531e3 gitlab: don't set RPM variable on container job
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 13:07:47 +01:00
Daniel P. Berrangé
27bc9111b0 gitlab: add OpenSUSE Tumbleweed container and build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 13:07:15 +01:00
Daniel P. Berrangé
8a0504da79 gitlab: introduce Fedora 34 container and build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 11:05:49 +01:00
Daniel P. Berrangé
22f6a4f071 gitlab: rename opensuse-152 to opensuse-leap-152
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 11:04:49 +01:00
Daniel P. Berrangé
1a25fc35b6 gitlab: rename centos-stream to centos-stream-8
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 11:03:49 +01:00
Daniel P. Berrangé
418409301f gitlab: drop Fedora 32 container and build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 11:02:42 +01:00
Daniel P. Berrangé
333af99d7d gitlab: drop centos-7 container and build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-05-25 11:01:53 +01:00
Michal Privoznik
f234192eb0 generator.py: Untangle virNodeDevice name fixup
The way that virNodeDevice method name fixup is written makes it
hard to find via grep (matching the virNodeDevice prefix and then
matching only the operation like "Get", "Lookup", ...). Expand
the string matching to match the pattern of other cases.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-04-15 13:12:53 +02:00
Michal Privoznik
6851c5c8df generator.py: Fix method names for new virNodeDevice*() APIs
In the 7.3.0 release we are going to have three new public APIs:

  virNodeDeviceDefineXML()
  virNodeDeviceUndefine()
  virNodeDeviceCreate()

The first one is slightly problematic, because it takes
virConnectPtr argument and thus our generator wants to put its
wrapper under virConnect python class, which is correct, but
what's incorrect is the name it chooses for the method:
defineXML(). Such method already exists and wraps
virDomainDefineXML() around. Also, the name is rather confusing
anyway - it's missing the 'nodeDevice' prefix.

Fortunately, the fix is easy - add another case into nameFixup().

The story with virNodeDeviceCreate() is similar. Except, this time
the class in which the method was put is correct. But the name is
still wrong, because our generator matched 'virNodeDeviceCreate'
thinking it's the good old virNodeDeviceCreateXML() API and
"fixed" the name of the method to nodeDeviceCreate().

Luckily, virNodeDeviceUndefine() is just fine.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-04-15 13:12:29 +02:00
Ján Tomko
80ed19052f spec: use pytest instead of nose
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-12 17:39:22 +00:00
Daniel P. Berrangé
220818affc rpm: use HTTPS for URLs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-04-12 18:12:48 +01:00
Daniel P. Berrangé
38bb83e914 Don't run sanity checks by default
The sanity check scripts verify that the binding covers all APIs in the
libvirt library/headers being built against. This is primarily there for
libvirt maintainers to identify when there are gaps in API coverage.

This is not something downstream consumers of libvirt-python should be
running themselves, so we shouldn't added it to tests by default.

In addition if people are working on branches or submitting merge
requests for python changes, we shouldn't block their work for failed
API coverage sanity tests, if the python binding otherwise builds fine
and passes regular unit tests.

Thus, we introduce a new gitlab job "api-coverage" with some conditions:

 - If pushing to a branch, the job is treated as non-fatal
 - For regular scheduled builds, it is mandatory
 - Don't run in any other scenarios

This job uses the artifacts from the centos-8-git-build job and re-runs
the test suite, requesting the sanity tests to be run too.

This will achieve the result of letting us see missing API coverage
in nightly builds, without blocking other contributions.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-04-09 16:40:42 +01:00
Ján Tomko
32a925a6d0 tests: use assertEqual instead of assertEquals
tests/test_conn.py:17: DeprecationWarning: Please use assertEqual instead.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-07 17:10:36 +02:00
Ján Tomko
fa69ccf212 ci: refresh containers for nose->pytest switch
Matches libvirt-ci commit facd5d855c97bf5b127ff9bf245c8fdf514dd916

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-07 17:10:36 +02:00
Ján Tomko
a376a2abb0 setup: use pytest instead of nose to run the test suite
The software we use for running tests - nose - has been
deprecated in favor of nose2.

We don't use anything nose-specific, just unittest.TestCase,
which pytest can handle just fine.

Switch to using pytest, which we already use for libvirt-dbus.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-07 17:09:54 +02:00
Ján Tomko
98b9db087f setup: drop have_libvirtaio
This function says we have libvirtaio on Python >= 3.3,
however we already mandate Python >= 3.5 at the start of the file.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-07 16:25:45 +02:00
Andrea Bolognani
ce6d4369ba ci: Move dco job to sanity_checks stage
If the DCO check fails we still want the pipeline to fail, but
that doesn't mean there's no value in running the other jobs to
get a better picture.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2021-04-07 13:56:24 +02:00
Andrea Bolognani
3a9f2eacf2 ci: Use 'extends' GitLab CI feature
This is the recommended way to use templates in job
definitions.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2021-04-07 13:56:24 +02:00
Ján Tomko
bded4a72c8 ci: drop openSUSE leap 15.1 in favor of 15.2
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-06 20:29:08 +02:00
Ján Tomko
8e1398f31f ci: refresh dockerfiles
Refresh to match libvirt-ci commit 94c25bde639eb31ff2071fb6abfd3d5c777f4ab2

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2021-04-06 20:28:14 +02:00
Jiri Denemark
5e96c84a37 Post-release version bump to 7.3.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-04-01 12:22:45 +02:00
Jiri Denemark
7e75a36b06 Post-release version bump to 7.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-03-01 11:59:46 +01:00
renlei4
fd069ac85c Fix wrong type for BlockThreshold Callback
type of threshold and excess are unsigned long long,
but PyObject_CallMethod incorrectly set it to int.

if threshold or excess greater than 0x7FFFFFFF(max int),
those variables will overflow.

Signed-off-by: Ren Lei <ren.lei4@zte.com.cn>
2021-03-01 16:51:40 +08:00
Daniel P. Berrangé
75c053e49e Add impl override for virDomainGetMessages
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-15 16:02:21 +00:00
Beraldo Leal
ac2647f958 improving readme with requirements
When installing this library in a fresh system, some basic packages are
necessary to compile and run. This patch will add basic instructions
with some requirements to help new contributors and users.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
2021-02-09 10:35:52 -03:00
Jiri Denemark
53065adece Post-release version bump to 7.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2021-01-15 09:54:11 +01:00
Daniel P. Berrangé
d2dff0b775 ci: refresh containers for CentOS-8 PowerTools repo rename
A recent CentOS-8 update renamed the "PowerTools" repo to "powertools"
and since dnf is case sensitive wrt repo names, this broke ability to
build new containers.

The refresh fixes the repo name and pulls in other misc improvements
to containers.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-15 10:44:30 +00:00
Daniel P. Berrangé
9b942039ca Avoid signed/unsigned warnings in loop over SSH keys
libvirt-override.c: In function ‘libvirt_virDomainAuthorizedSSHKeysGet’:
libvirt-override.c:10455:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
10455 |     for (i = 0; i < nkeys; i++)
      |                   ^

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-03 11:57:25 +00:00
Daniel P. Berrangé
0b10d9cba8 gitlab: replace "libvirt-" prefix with "ci-" in dockerfiles
This makes the dockerfile name match the output container name

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-01 16:52:33 +00:00