On 09/30/2014 10:00 AM, Pavel Hrdina wrote:
> Resovles:
https://bugzilla.redhat.com/show_bug.cgi?id=1147639
s/Resovles/Resolves/
>
> Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
> ---
> examples/event-test.py | 3 ++
> libvirt-override-virConnect.py | 9 ++++++
> libvirt-override.c | 64 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 76 insertions(+)
>
> diff --git a/examples/event-test.py b/examples/event-test.py
> index cd85de3..be7a7d4 100644
> --- a/examples/event-test.py
> +++ b/examples/event-test.py
> @@ -515,6 +515,8 @@ def myDomainEventDeviceRemovedCallback(conn, dom, dev, opaque):
> dom.name(), dom.ID(), dev))
> def myDomainEventBlockJob2Callback(conn, dom, disk, type, status, opaque):
> print("myDomainEventBlockJob2Callback: Domain %s(%s) %s on disk %s
%s" % (dom.name(), dom.ID(), blockJobTypeToString(type), disk,
blockJobStatusToString(status)))
> +def myDomainEventTunableCallback(conn, dom, params, opaque):
> + print("myDomainEventTunableCallback: Domain %s(%s) %s" % (dom.name(),
dom.ID(), params))
I wonder if we want any better control over the output formatting of
params than what python defaults to, but this is probably okay for now.
> +++ b/libvirt-override-virConnect.py
> @@ -188,6 +188,15 @@
> cb(self, virDomain(self, _obj=dom), devAlias, opaque)
> return 0
>
> + def _dispatchDomainEventTunableCallback(self, dom, params, cbData):
> + """Dispatches evetn to python user domain tunable event
callbacks
s/evetn/event/
ACK with typos fixed.