libvirt/python
Guannan Ren 0f9e67bfad python: return dictionary without value in case of no blockjob
Currently, when there is no blockjob, dom.blockJobInfo('vda')
still reports error because it doesn't distinguish return value 0 from -1.
libvirt.libvirtError: virDomainGetBlockJobInfo() failed

virDomainGetBlockJobInfo() API return value:
 -1 in case of failure, 0 when nothing found, 1 found.

And use PyDict_SetItemString instead of PyDict_SetItem when key is
of string type. PyDict_SetItemString increments key/value reference
count, so call Py_DECREF() for value. For key, we don't need to
do this, because PyDict_SetItemString will handle it internally.
2013-07-15 18:20:42 +08:00
..
tests maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
generator.py Extensible migration APIs 2013-06-25 01:24:53 +02:00
libvirt-lxc-override-api.xml Introduce an LXC specific public API & library 2013-01-14 13:58:34 +00:00
libvirt-lxc-override.c Convert 'int i' to 'size_t i' in python/ files 2013-07-10 17:55:17 +01:00
libvirt-override-api.xml python: Add bindings for extensible migration APIs 2013-06-25 01:28:39 +02:00
libvirt-override-virConnect.py python: treat flags as default argument with value 0 2013-03-22 11:50:09 +08:00
libvirt-override-virDomain.py python: treat flags as default argument with value 0 2013-03-22 11:50:09 +08:00
libvirt-override-virDomainSnapshot.py python: treat flags as default argument with value 0 2013-03-22 11:50:09 +08:00
libvirt-override-virStoragePool.py python: treat flags as default argument with value 0 2013-03-22 11:50:09 +08:00
libvirt-override-virStream.py python: correct a copy-paste error 2012-02-01 10:26:57 +01:00
libvirt-override.c python: return dictionary without value in case of no blockjob 2013-07-15 18:20:42 +08:00
libvirt-override.py python: treat flags as default argument with value 0 2013-03-22 11:50:09 +08:00
libvirt-qemu-override-api.xml agent: add python module support 2012-08-23 19:07:53 +08:00
libvirt-qemu-override.c syntax-check: Only allows to include public headers in external tools 2013-04-18 11:31:19 +08:00
Makefile.am maint: use LGPL correctly 2013-05-20 14:03:48 -06:00
README Re-arrange python generator to make it clear what's auto-generated 2009-09-21 14:41:46 +01:00
sanitytest.py Check if classes are derived from object 2013-02-11 18:00:10 +01:00
TODO
typewrappers.c Rename memory.{c,h} to viralloc.{c,h} 2012-12-21 11:17:14 +00:00
typewrappers.h syntax-check: Only allows to include public headers in external tools 2013-04-18 11:31:19 +08:00

    libvirt Python Bindings README
    ==============================

Most of the libvirt python binding code is automatically generated
using the script  generator.py, and the API description from
docs/libvirt-api.xml


Manually written files:

 - libvirt-override.c: methods where the C binding needs to be hand crafted
 - libvirt-override.py: global methods where the C and python bindings have different args
 - libvirt-override-api.xml: methods where the auto-extracted API docs are not
   suitable for python auto-generator. Overriding this if the method is going
   into libvirt-override.c, but we still want auto-generated libvirt-override.py
 - libvirt-override-virConnect.py: virConnect class methods
 - typewrappers.h,.c: Python object wrappers for each libvirt C object


Auto-generated files:

  - libvirt.py: The main python binding. Comprises auto-generated code, along
    with contents from libvirt-override.py and libvirt-override-virConnect.py
  - libvirt.c, libvirt.h: The C glue layer for the python binding. Comprises
    auto-generated code, along with libvirt-override.c
  - libvirt-export.c: List of auto-generated C methods, included into
    the libvirt-override.c method table