| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
This logging is helpful for tracing problems with unclosed connections
and leaking file descriptors.
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Enable builds on several python versions, and against several versions
of libvirt. Ideally we would build all the way back to 0.9.11, since
that is the min supported libvirt for python binding. It is not possible
to build this old libvirt version on modern distros though, so using
1.2.0 as the oldest for now.
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The sanity test check aims to ensure that every function listed in
the Python code maps to a corresponding C function. The Sparse
send/recv methods are special though - we're never calling the
corresponding C APIs, instead we have a pure python impl.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The C library will now ignore an attempt to register an event
loop twice. It is unable to report an error in this case though
due to the C API returning 'void'. To improve this we must
manually report an error at the python level.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
| |
We only want to obsolete versions which actually had the
original name, not all future versions.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
* setup.py: updated for release
|
|
|
|
| |
Add override code for virDomainMigrateGetMaxDowntime
|
|
|
|
| |
Introduce wrapper for virDomainMigrateGetMaxDowntime
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
| |
This reverts commit b302b6d884ad4c6c917203a463f3377f3615b030.
Only drop the Fedora 18 test - RHEL must still build without
python 3
|
|
|
|
|
|
|
| |
This complies with Fedora naming policy for python packages
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
| |
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
We've forgot to include VIR_DOMAIN_MEMORY_STAT_USABLE and
VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE constants.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
| |
virtually identical to 3.5.0 except for the bump of version in setup.py
|
|
|
|
| |
* setup.py: bump version number
|
|
|
|
|
|
|
|
|
|
| |
In commit a8eba5036cb4b0e2ec827e9e6e019ce70e451377, libvirt added
support for two more details. In python bindings it all worked fine
automagically except an example that was not updated.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463188
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
The virDomainGetTime returns either a dict or None, but the python
glue layer for checking for '-1'. Thus it failed to raise an
exception on error.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Sparse streams are not that straight forward to use for the very
first time. Especially the sparseRecvAll() and sparseSendAll()
methods which expects callbacks. What we can do to make it easier
for developers is to have an example where they can take an
inspiration from.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
|
|
|
| |
Yet again, our parser is not capable of generating proper
wrapper. To be fair, this one wold be really tough anyway.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
|
|
|
| |
Yet again, we need a custom wrapper over virStreamRecvFlags
because our generator is not capable of generating it.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
|
|
|
|
| |
The return value for virStreamRecvHole is slightly different to
its C counterpart. In python, either it returns the hole size or
None if C API fails.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
|
| |
In Python 3, if the file is open in binary mode, @got will end up
being equal to b"" and b"" != "" in Python 3.
|
|
|
|
|
|
|
|
| |
This was being done due to now deprecated policy and that file should
be installed so that pip can recognize that the packages is already
installed in the system.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
The event test program '--loop' arg is modified to take the name
of an event loop impl to run. eg 'event-test.py --loop asyncio'
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
| |
Use the name 'Poll' instead of 'Pure' for the event loop demo,
since there's now a second pure python loop impl available.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
In order to test cleanup code paths we must unregister all callbacks
and close the connection on shutdown. Since cleanup happens in the
background, we do a short sleep to allow the main loop to run its
cleanup too.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The pure python event loop impl has to call
libvirt.virEventInvokeFreeCallback
to free the event opaque data from a clean stack context
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is usable only on python >= 3.4 (or 3.3 with out-of-tree asyncio),
however it should be harmless for anyone with older python versions.
In simplest case, to have the callbacks queued on the default loop:
>>> import libvirtaio
>>> libvirtaio.virEventRegisterAsyncIOImpl()
The function is not present on non-compatible platforms.
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation says:
> If the opaque user data requires free'ing when the handle is
> unregistered, then a 2nd callback can be supplied for this purpose.
> This callback needs to be invoked from a clean stack. If 'ff'
> callbacks are invoked directly from the virEventRemoveHandleFunc they
> will likely deadlock in libvirt.
And they did deadlock. In removeTimeout too. Now we supply a custom
function to pick it from the opaque blob and fire.
Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
* setup.py: bumped version
|
|
|
|
| |
Unfortunately python doesn't generate those.
|
|
|
|
| |
The comment was copied from the device removal failed event.
|
|
|
|
|
|
|
|
| |
The 'functions_list_exception_test' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'converter_type' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'classes_ancestor' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'py_return_types' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'foreign_encoding_args' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'function_post' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
The 'reference_keepers' data structure and associated code
in the generator is inherited from libxml. This has never
been used in libvirt, so delete it to simplify the generator.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using libvirt python you must never call the object
constructors directly, as these are expecting to be passed
a wrapped C object. For example
import libvirt
c = libvirt.virConnect("qemu:///system")
c.listAllDomains()
will mysteriously segfault. With this change the user now
gets an slightly more helpful error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/berrange/src/virt/libvirt-python/build/libvirt.py", line 3409, in __init__
raise Exception("Expected a wrapped C Object but got %s" % type(_obj))
Exception: Expected a wrapped C Object but got <type 'str'>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Commit id '71fd95409' neglected to adjust a couple of API's do that now.
The number of elements in new_params is equal to the length of info,
instead of nparams, so it's wrong to free new_params using nparams.
Signed-off-by: Wu Zongyong <wuzongyo@mail.ustc.edu.cn>
|
| |
|
| |
|
|
|
|
|
|
|
| |
With recent changes there are new events known to libvirt.
Reflect those changes in our event-test.py example script.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|