1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-13 12:59:30 +03:00
Commit Graph

5 Commits

Author SHA1 Message Date
87b0d97937 event-test: add missing events
Update the example to be able to trace all events.

* examples/event-test.py (main): Match full list of domain events.
(myDomainEventIOErrorReasonCallback)
(myDomainEventControlErrorCallback)
(myDomainEventBlockJobCallback, myDomainEventBlockJob2Callback)
(blockJobTypeToString, blockJobStatusToString): New functions.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-06-18 13:01:52 -06:00
44be62beee examples: demonstrate network events
Commit 6ea5be0 added network event callback support, so we might
as well demonstrate that it works by updating our example.

* examples/event-test.py: Add network event, fix typos.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-02-11 17:58:48 -07:00
b882ae9ecf examples: Ensure we write bytes to the self-pipe
Strings in python3 default to unicode, so when writing to
the self-pipe we must be sure to use bytes by calling the
encode() method.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-12-11 16:12:54 +00:00
3f4e32c6a1 examples: Invoke print("...") instead of print "..."
The 'print' method must be called as a function in python3,
ie with brackets.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-12-11 16:12:54 +00:00
34aa32ba8a Move python example programs into python/examples/ subdirectory
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-11-22 15:55:39 +00:00