summaryrefslogtreecommitdiffstats
path: root/libvirt-override-api.xml
diff options
context:
space:
mode:
authorAlex Jia <ajia@redhat.com>2012-02-14 10:46:23 +0800
committerAlex Jia <ajia@redhat.com>2012-02-16 10:15:16 +0800
commitf5c5e7e77bb962bcacd849c52891d694002d03c5 (patch)
tree765009d6e76b9ee7c3354e2e6509925ca33141f5 /libvirt-override-api.xml
parente8fe5e59e246fb1ed396cc737657ee4e9d752ef3 (diff)
downloadlibvirt-python-v6-f5c5e7e77bb962bcacd849c52891d694002d03c5.tar.gz
libvirt-python-v6-f5c5e7e77bb962bcacd849c52891d694002d03c5.tar.xz
libvirt-python-v6-f5c5e7e77bb962bcacd849c52891d694002d03c5.zip
python: Expose virDomain{G,S}etInterfaceParameters APIs in python binding
The v4 patch corrects indentation issues. The v3 patch follows latest python binding codes and change 'size' type from int to Py_ssize_t. 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@redhat.com>
Diffstat (limited to 'libvirt-override-api.xml')
-rw-r--r--libvirt-override-api.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml
index 563dd46..ab8f33a 100644
--- a/libvirt-override-api.xml
+++ b/libvirt-override-api.xml
@@ -261,6 +261,22 @@
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function>
+ <function name='virDomainSetInterfaceParameters' file='python'>
+ <info>Change the bandwidth tunables for a interface device</info>
+ <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
+ <arg name='device' type='const char *' info='interface name'/>
+ <arg name='params' type='virTypedParameterPtr' info='Pointer to bandwidth tuning params object'/>
+ <arg name='flags' type='unsigned int' info='an OR&apos;ed set of virDomainModificationImpact'/>
+ <return type='int' info='0 in case of success, -1 in case of failure'/>
+ </function>
+ <function name='virDomainGetInterfaceParameters' file='python'>
+ <info>Get the bandwidth tunables for a interface device</info>
+ <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
+ <arg name='device' type='const char *' info='interface name'/>
+ <arg name='flags' type='unsigned int' info='an OR&apos;ed set of virDomainModificationImpact'/>
+ <return type='str *' info='the bandwidth tunables value or None in case of error'/>
+ </function>
+
<function name='virConnectListStoragePools' file='python'>
<info>list the storage pools, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>