Commit Graph

10 Commits

Author SHA1 Message Date
Daniel P. Berrange
de8ecb12cb Fix printing of event detail in python events demo program
The events demo program is slightly misleading printing

  myDomainEventCallback1 EVENT: Domain f14i686(-1) Added

which is not distinguishing Add vs Update events. It should have
been doing

  myDomainEventCallback1 EVENT: Domain f14i686(-1) Defined Updated

* examples/domain-events/events-python/event-test.py: Fully print
  event detail info string
2010-04-22 17:15:48 +01:00
Daniel P. Berrange
6df7d55d39 Fix up python bindings for new event callbacks
The generator was disabled for the new event callbacks, since they
need to be hand written. This patch  adds the C and python glue to
expose the new APIs in the python binding. The python example
program is extended to demonstrate of the code

* python/libvirt-override.c: Registration and dispatch of events
   at the C layer
* python/libvirt-override-virConnect.py: Python glue for events
* examples/domain-events/events-python/event-test.py: Demo use
  of new event callbacks
2010-04-08 12:41:40 +01:00
Philipp Hahn
1cfbfaa697 python example: poll(-0.001) does not sleep forever
The conversion from seconds to milliseconds should only be done for
actual delays >= 0, not for the magic -1 value used for infinite
timeouts.

Signed-off-by: Philipp Hahn <hahn@univention.de>
2010-03-24 10:26:23 +01:00
Daniel P. Berrange
93f77250b3 Rewrite example domain events programm for python
The existing python demo for domain events does not fully
implement the event loop contract. This makes the code useless
for real world applications. This change re-writes the demo so
that it has a full event loop implementation which is suitable
for application usage & better demonstrates integration

* examples/domain-events/events-python/event-test.py: Rewrite
  to include a real world usable event loop implementation
2009-10-09 13:05:10 +01:00
Jim Meyering
07613d2020 remove all trailing blank lines
by running this command:
git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
This is in preparation for a more strict make syntax-check
rule that will detect trailing blank lines.
2009-07-16 15:06:42 +02:00
Daniel P. Berrange
7c99cb93c5 Fix python domain events example & binding 2009-05-28 11:02:11 +00:00
Daniel P. Berrange
c673689430 Fix python bindings events code (David Lively) 2008-11-24 19:28:12 +00:00
Daniel P. Berrange
6d41cb87d3 Change public API for virEventAddHandle to allow multiple registrations per FD 2008-11-19 16:19:36 +00:00
Daniel P. Berrange
d3d54d2fc9 Add domain events detail information 2008-11-17 16:43:00 +00:00
Daniel Veillard
7b716fce8e * python/Makefile.am python/generator.py python/libvir.c
python/libvir.py python/libvirt_wrap.h python/types.c:
  adds support for events from the python bindings, also
  improves the generator allowing to embbed per function
  definition files, patch by Ben Guthro
* examples/domain-events/events-python/event-test.py: also
  adds a programming example
Daniel
2008-10-31 10:13:45 +00:00