Thanks; pushed.
----- Original Message -----
From: "Eric Blake" <eblake(a)redhat.com>
To: ajia(a)redhat.com
Cc: libvir-list(a)redhat.com
Sent: Thursday, February 16, 2012 6:24:14 AM
Subject: Re: [libvirt] [PATCHv4] python: Expose virDomain{G, S}etInterfaceParameters APIs
in python binding
On 02/15/2012 09:33 AM, ajia(a)redhat.com wrote:
From: Alex Jia <ajia(a)redhat.com>
The v4 patch corrects indentation issues.
The v3 patch follows latest python binding codes and change 'size'
type from int to Py_ssize_t.
I'd stick these types of comments after the ---; they are useful for
review, but don't need to be a permanent part of libvirt.git.
An simple example to show how to use it:
#!/usr/bin/env python
import libvirt
conn = libvirt.open(None)
dom = conn.lookupByName('foo')
print dom.interfaceParameters('vnet0', 0)
params = {'outbound.peak': 10,
'inbound.peak': 10,
'inbound.burst': 20,
'inbound.average': 20,
'outbound.average': 30,
'outbound.burst': 30}
print dom.setInterfaceParameters('vnet0', params, 0)
print dom.interfaceParameters('vnet0', 0)
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
python/libvirt-override-api.xml | 16 +++++
python/libvirt-override.c | 126 +++++++++++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 0 deletions(-)
ACK.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org