| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
| |
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
One of the regexes has a bogus \o instead of plain 'o'. Somehow
this magically worked on all versions of python, until 3.6 came
along and complained
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Previously the way Fedora installed /usr/bin/nosetests allowed it
to be invoked with either python 2 or 3. Since Fedora 25 though,
it contains a module name that only exists on python 2. So we need
to be more intelligent and pick a different nosetests binary per
version.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Ensure the description and license are set in PKG-INFO,
and clarify the summary field.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If we pass large(more than cpunum) cpu mask to any libvirt_virDomainPin*
function, it could leads to crash. So we have to check tuple size in
virPyCpumapConvert and ignore extra tuple members.
Since we allocate a zeroed buffer, we don't need to bother with setting
the bits to zero.
Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
|
|
|
|
|
|
|
|
| |
All libvirt_virDomainPin* functions do the same thing for convert
pycpumap to cpumap, so this patch moves all common logic to new
helper - virPyCpumapConvert.
Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
|
|
|
|
| |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
| |
* setup.py: just bumped up the release number
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without the change to libvirt-override-api.xml generator.py would
generate the following function header:
def guestVcpus(self, params, nparams, flags=0):
Since @params and @nparams are output-only in C and the python C
implementation actualy creates a dict from them we should not need to
pass them. Add the API definition to drop the two unnecessary args:
def guestVcpus(self, flags=0):
The code did not work at all until this change as the C impl expects
only two arguments but the python required use of four.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1377071
|
| |
|
|
|
|
|
|
|
|
|
|
| |
At the end of the format string we put :virFunctionName where ':'
says "this is the end of argument list", and virFunctionName is
the prefix for error messages then. However, in some cases we
have had wrong names there. Some of them are actually quite
funny: xmlRegisterErrorHandler.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1350523
|
|
|
|
| |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|