summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* libvirtaio: add more debug loggingWojtek Porczyk2017-09-261-8/+25
| | | | | | | This logging is helpful for tracing problems with unclosed connections and leaking file descriptors. Signed-off-by: Wojtek Porczyk <woju@invisiblethingslab.com>
* Add travis build configDaniel P. Berrange2017-09-193-7/+65
| | | | | | | | | | | 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>
* Skip sparseRecvAll / sparseSendAll in sanity testDaniel P. Berrange2017-09-181-1/+2
| | | | | | | | | 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>
* Post-release version bump to 3.8.0Daniel P. Berrange2017-09-061-1/+1
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Report an error if registering an event loop twiceDaniel P. Berrange2017-09-061-7/+6
| | | | | | | | | 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>
* Remove unused variables for event callbacksDaniel P. Berrange2017-09-061-22/+0
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Change Obsoletes to an explicit versionDaniel P. Berrange2017-09-041-2/+2
| | | | | | | 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>
* Release of libvirt-python 3.7.0v3.7.0Daniel Veillard2017-09-041-1/+1
| | | | * setup.py: updated for release
* Implement virDomainMigrateGetMaxDowntimeJohn Ferlan2017-08-262-0/+40
| | | | Add override code for virDomainMigrateGetMaxDowntime
* Introduce virDomainMigrateGetMaxDowntime APIJohn Ferlan2017-08-261-0/+1
| | | | Introduce wrapper for virDomainMigrateGetMaxDowntime
* Fix package name in description of sub-RPMsDaniel P. Berrange2017-08-101-2/+2
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Revert "rpm: assume python3 is always available"Daniel P. Berrange2017-08-101-0/+17
| | | | | | | This reverts commit b302b6d884ad4c6c917203a463f3377f3615b030. Only drop the Fedora 18 test - RHEL must still build without python 3
* rpm: rename packages to python2-libvirt / python3-libvirtDaniel P. Berrange2017-08-101-5/+23
| | | | | | | 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>
* rpm: assume python3 is always availableDaniel P. Berrange2017-08-101-17/+0
| | | | | Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* virDomainMemoryStats: include usable memory and last updateTomáš Golembiovský2017-08-021-0/+8
| | | | | | | | 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>
* Release of libvirt-python-3.6.0v3.6.0Daniel Veillard2017-08-021-1/+1
| | | | virtually identical to 3.5.0 except for the bump of version in setup.py
* Release of libvirt-python-3.5.0v3.5.0Daniel Veillard2017-07-041-1/+1
| | | | * setup.py: bump version number
* Add details for shutdown eventMartin Kletzander2017-06-201-1/+1
| | | | | | | | | | 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>
* Release of libvirt-python-3.4.0v3.4.0Daniel Veillard2017-06-021-1/+1
|
* Fix error check for virDomainGetTime methodDaniel P. Berrange2017-05-241-1/+1
| | | | | | | | 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>
* examples: Introduce sparsestream.pyMichal Privoznik2017-05-241-0/+117
| | | | | | | | | | 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>
* virStream: Introduce virStreamSparse{Recv,Send}AllMichal Privoznik2017-05-243-2/+109
| | | | | | | 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>
* virStream: Introduce virStreamRecvFlagsMichal Privoznik2017-05-233-0/+58
| | | | | | | 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>
* Implement virStreamSendHole/virStreamRecvHoleMichal Privoznik2017-05-233-0/+86
| | | | | | | | 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>
* Use better comparison in virStream.sendAll for Python 3Xavier Fernandez2017-05-171-1/+1
| | | | | In Python 3, if the file is open in binary mode, @got will end up being equal to b"" and b"" != "" in Python 3.
* spec: Install egg-info with rpm packageMartin Kletzander2017-05-151-1/+2
| | | | | | | | 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>
* Release of libvirt-python-3.3.0v3.3.0Daniel Veillard2017-05-051-1/+1
|
* event-test: add ability to run the asyncio event loopDaniel P. Berrange2017-04-041-15/+35
| | | | | | | 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>
* event-test: rename example event loop implDaniel P. Berrange2017-04-041-15/+15
| | | | | | | 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>
* event-test: unregister callbacks & close conn on exitDaniel P. Berrange2017-04-041-36/+59
| | | | | | | | | 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>
* event-test: add timeout to exit event loopDaniel P. Berrange2017-04-041-2/+8
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* event-test: free opaque data when removing callbacksDaniel P. Berrange2017-04-041-1/+10
| | | | | | | | | | 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>
* Add asyncio event loop implementationWojtek Porczyk2017-04-044-0/+414
| | | | | | | | | | | | | | 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>
* Allow for ff callbacks to be called by custom event implementationsWojtek Porczyk2017-04-043-31/+63
| | | | | | | | | | | | | | | 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>
* Release of libvirt-python-3.2.0v3.2.0Daniel Veillard2017-04-021-1/+1
| | | | * setup.py: bumped version
* event: Add handler for block threshold eventPeter Krempa2017-03-293-0/+75
| | | | Unfortunately python doesn't generate those.
* event: fix comment for _dispatchDomainEventMetadataChangeCallbackPeter Krempa2017-03-291-1/+1
| | | | The comment was copied from the device removal failed event.
* Removed unused 'functions_list_exception_test' code from generatorv3.1.0Daniel P. Berrange2017-01-271-21/+8
| | | | | | | | 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>
* Removed unused 'converter_type' code from generatorDaniel P. Berrange2017-01-271-15/+0
| | | | | | | | 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>
* Removed unused 'classes_ancestor' code from generatorDaniel P. Berrange2017-01-271-34/+22
| | | | | | | | 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>
* Removed unused 'py_return_types' code from generatorDaniel P. Berrange2017-01-271-13/+0
| | | | | | | | 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>
* Removed unused 'foreign_encoding_args' code from generatorDaniel P. Berrange2017-01-271-5/+0
| | | | | | | | 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>
* Removed unused 'function_post' code from generatorDaniel P. Berrange2017-01-271-28/+0
| | | | | | | | 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>
* Removed unused 'reference_keepers' code from generatorDaniel P. Berrange2017-01-271-24/+0
| | | | | | | | 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>
* Protect against user accidentally calling constructors directlyDaniel P. Berrange2017-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* Fix the incorrect memory freeing which will result in crashWu Zongyong2017-01-181-4/+4
| | | | | | | | | 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>
* Post-release version bump to 3.1.0John Ferlan2017-01-181-1/+1
|
* Release of libvirt-python-3.0.0v3.0.0Daniel Veillard2017-01-171-1/+1
|
* examples: Update event-test.pyMichal Privoznik2017-01-101-0/+24
| | | | | | | 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>
* Fix typos in previous secrets event patchDaniel P. Berrange2017-01-101-7/+7
| | | | Signed-off-by: Daniel P. Berrange <berrange@redhat.com>