[libvirt] [libvirt-python PATCH] implement new tunable event

Eric Blake eblake at redhat.com
Tue Sep 30 16:49:12 UTC 2014


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 at 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140930/04f4ad1c/attachment-0001.sig>


More information about the libvir-list mailing list