| 1 |
libvirt Python Bindings Hacking |
| 2 |
=============================== |
| 3 |
|
| 4 |
Most of the libvirt python binding code is automatically generated |
| 5 |
using the script generator.py, and the API description that the |
| 6 |
libvirt library installs at the location shown by pkg-config, with |
| 7 |
this command: |
| 8 |
|
| 9 |
$ pkg-config --variable libvirt_api libvirt |
| 10 |
/usr/share/libvirt/api/libvirt-api.xml |
| 11 |
|
| 12 |
Some of the API descriptions in the primary XML files are not directly |
| 13 |
usable by the code generator. Thus there are overrides in |
| 14 |
|
| 15 |
- libvirt-override-api.xml |
| 16 |
- libvirt-qemu-override-api.xml |
| 17 |
- libvirt-lxc-override-api.xml |
| 18 |
|
| 19 |
For stuff which the generator can't cope with at all there are some |
| 20 |
hand written source files |
| 21 |
|
| 22 |
- libvirt-override.c - low level binding to libvirt.so |
| 23 |
- libvirt-qemu-override.c - low level binding to libvirt-qemu.so |
| 24 |
- libvirt-lxc-override.c - low level binding to libvirt-lxc.so |
| 25 |
|
| 26 |
- libvirt-override.py - high level overrides in the global namespace |
| 27 |
- libvirt-override-virConnect.py - high level overrides in |
| 28 |
the virConnect class |
| 29 |
- libvirt-override-virDomain.py - high level overrides in |
| 30 |
the virDomain class |
| 31 |
- libvirt-override-virDomainCheckpoint.py - high level overrides in |
| 32 |
the virDomainCheckpoint class |
| 33 |
- libvirt-override-virDomainSnapshot.py - high level overrides in |
| 34 |
the virDomainSnapshot class |
| 35 |
- libvirt-override-virStoragePool.py - high level overrides in |
| 36 |
the virStoragePool class |
| 37 |
- libvirt-override-virStream.py - high level overrides in |
| 38 |
the virStream class |