Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Guannan Ren 4b143ab231 python: fix bindings that don't raise an exception
For example:
 >>> dom.memoryStats()
 libvir: QEMU Driver error : Requested operation is not valid:\
         domain is not running

There are six such python API functions like so.
The root reason is that generator.py script checks the type of return
value of a python stub function defined in libvirt-api.xml or
libvirt-override-api.xml to see whether to add the raise clause or not
in python wrapper code in libvirt.py.

The type of return value is supposed to be C types.
For those stub functions which return python non-integer data type like
string, list, tuple, dictionary, the existing type in functions varies
from each other which leads problem like this.

Currently, in generator.py, it maintains a buggy whitelist for stub functions
returning a list type. I think it is easy to forget adding new function name
in the whitelist.

This patch makes the value of type consistent with C type "char *"
in libvirt-override-api.xml. For python, any of types could be printed
as string, so I choose "char *" in this case. And the comment in xml
could explain it when adding new function definition.

      <function name='virNodeGetCPUStats' file='python'>
        ...
 -      <return type='virNodeCPUStats' info='...'/>
 +      <return type='char *' info='...'/>
        ...
      </function>
2013-03-21 11:24:49 +08:00
.gnulib@819b1c38b9 maint: update to latest gnulib 2013-02-01 09:24:00 -07:00
build-aux Document bracket whitespace rules & add syntax-check rule 2012-11-02 14:00:32 +00:00
daemon Remove hack using existance of an 'identity' string to disable auth 2013-03-12 18:07:17 +00:00
docs domain: add support for iscsi network disks 2013-03-20 17:30:25 -06:00
examples Re-add DTrace probes on 'dispose' functions 2013-03-14 12:42:21 +00:00
gnulib maint: update to latest gnulib 2013-01-02 09:38:30 -07:00
include Define internal APIs for managing identities 2013-03-19 13:37:37 +00:00
m4 Fix typo in configure.ac causing $LIBS to gain a copy of $CFLAGS 2013-02-05 18:04:16 +00:00
po rename qemuGetNumadAdvice to virNumaGetAutoPlacementAdvice 2013-03-19 15:55:40 -06:00
python python: fix bindings that don't raise an exception 2013-03-21 11:24:49 +08:00
src domain: add support for iscsi network disks 2013-03-20 17:30:25 -06:00
tests domain: add support for iscsi network disks 2013-03-20 17:30:25 -06:00
tools clarify virsh net commands 2013-03-20 13:55:17 -06:00
.dir-locals.el build: avoid tabs that failed syntax-check 2012-09-06 09:43:46 -06:00
.gitignore rename tests/conftest.c 2013-03-19 13:13:28 -06:00
.gitmodules make .gnulib a submodule 2009-07-08 16:17:51 +02:00
.mailmap Autogenerate AUTHORS 2012-10-19 12:44:56 -04:00
AUTHORS.in Add John Ferlan to the committers list 2013-02-05 10:59:32 -05:00
autobuild.sh Switch automated builds to use Mingw64 toolchain instead of Mingw32 2012-06-25 10:41:10 +01:00
autogen.sh build: fix incremental autogen.sh when no AUTHORS is present 2012-12-03 14:59:09 -07:00
bootstrap maint: update to latest gnulib 2013-02-01 09:24:00 -07:00
bootstrap.conf build: more mingw fixes 2013-02-15 15:45:52 -07:00
cfg.mk util: portably check for unchanged uid 2013-03-15 10:55:51 -06:00
ChangeLog-old virterror.c: Fix several spelling mistakes 2012-02-03 11:32:51 -07:00
configure.ac Release of libvirt 1.0.3 2013-03-05 12:00:53 +08:00
COPYING.LIB Update to COPYING.LIB to latest LGPLv2.1 copy 2013-03-15 10:50:32 +01:00
HACKING Turn virSecurityManager into a virObjectLockable 2013-02-11 12:33:41 +00:00
libvirt.pc.in build: silence warning from autoconf 2012-05-30 09:22:02 -06:00
libvirt.spec.in Release of libvirt 1.0.3 2013-03-05 12:00:53 +08:00
Makefile.am build: Fix AUTHORS generation 2012-12-17 21:17:55 +01:00
Makefile.nonreentrant Ban use of all inet_* functions 2010-10-22 11:59:23 +01:00
mingw-libvirt.spec.in spec: indent %if to make it easier to see conditions 2013-01-21 10:36:14 -07:00
README Correct typos in the documentation (Atsushi SAKAI) 2008-01-24 10:15:13 +00:00
README-hacking maint: relax git minimum version 2010-02-24 14:29:27 -05:00
run.in run: license as LGPL 2013-02-23 14:03:19 -07:00
TODO Update todo list file to point at bugzilla/website 2010-10-13 16:45:26 +01:00

         LibVirt : simple API for virtualization

  Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.

Daniel Veillard <veillard@redhat.com>