libvirt/python
Osier Yang a26a1969c3 Add support for event tray moved of removable disks
This patch introduces a new event type for the QMP event
DEVICE_TRAY_MOVED, which occurs when the tray of a removable
disk is moved (i.e opened or closed):

    VIR_DOMAIN_EVENT_ID_TRAY_CHANGE

The event's data includes the device alias and the reason
for tray status' changing, which indicates why the tray
status was changed. Thus the callback definition for the event
is:

enum {
    VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
    VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,

\#ifdef VIR_ENUM_SENTINELS
    VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
\#endif
} virDomainEventTrayChangeReason;

typedef void
(*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
                                           virDomainPtr dom,
                                           const char *devAlias,
                                           int reason,
                                           void *opaque);
2012-03-23 23:10:26 +08:00
..
tests maint: add missing copyright notices 2011-07-28 15:01:17 -06:00
generator.py python: add virDomainGetCPUStats python binding API 2012-03-22 10:55:48 -04:00
libvirt-override-api.xml python: add virDomainGetCPUStats python binding API 2012-03-22 10:55:48 -04:00
libvirt-override-virConnect.py Add support for event tray moved of removable disks 2012-03-23 23:10:26 +08:00
libvirt-override-virStream.py python: correct a copy-paste error 2012-02-01 10:26:57 +01:00
libvirt-override.c Add support for event tray moved of removable disks 2012-03-23 23:10:26 +08:00
libvirt-override.py Fix two comments related to error handling 2011-10-17 17:21:56 +02:00
libvirt-qemu-override-api.xml qemu_api: Add override XML and C files for QEMU APIs 2011-09-14 11:38:51 +08:00
libvirt-qemu-override.c python: drop unused function 2012-02-07 17:14:11 -07:00
Makefile.am pyhton: Don't link against libvirt_util.la 2012-02-07 13:30:42 +01:00
README Re-arrange python generator to make it clear what's auto-generated 2009-09-21 14:41:46 +01:00
TODO syntax-check: enforce the no-cvs-keywords prohibition 2008-12-15 10:24:54 +00:00
typewrappers.c python: use libvirt_util to avoid raw free 2012-02-03 10:41:47 -07:00
typewrappers.h python: drop redundant function 2012-02-03 10:41:44 -07: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