diff options
author | John Ferlan <jferlan@redhat.com> | 2015-02-18 20:22:06 -0500 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2015-03-11 15:02:18 -0400 |
commit | d9b519c21a6ea02c78813a4d6c98d4f42571a71b (patch) | |
tree | 65f03f029aad0c8c57800421be1e76af29a97cd4 /libvirt-override-api.xml | |
parent | 713ed9d570df92b3ba029b4cbb3cd7a4c45bf1de (diff) | |
download | libvirt-python-d9b519c21a6ea02c78813a4d6c98d4f42571a71b.tar.gz |
Support virDomainGetIOThreadsInfo and virDomainIOThreadsInfoFree
Add support for the libvirt_virDomainGetIOThreadsInfo method. This
code mostly follows the libvirt_virDomainGetVcpuPinInfo method, but
also takes some from the libvirt_virNodeGetCPUMap method with respect
to building the cpumap into the returned tuple rather than two separate
tuples which vcpu pinning generates
Assuming two domains, one with IOThreads defined (eg, 'iothr-gst') and
one without ('noiothr-gst'), execute the following in an 'iothr.py' file:
import libvirt
con=libvirt.open("qemu:///system")
dom=con.lookupByName('iothr-gst')
print dom.ioThreadsInfo()
dom2=con.lookupByName('noiothr-gst')
print dom2.ioThreadsInfo()
$ python iothr.py
[(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, True])]
[]
$
Diffstat (limited to 'libvirt-override-api.xml')
-rw-r--r-- | libvirt-override-api.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 144479c..bb61a46 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -278,6 +278,12 @@ <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> <arg name='flags' type='int' info='flags to specify'/> </function> + <function name='virDomainGetIOThreadsInfo' file='python'> + <info>Query the CPU affinity setting of the IOThreads of the domain</info> + <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> + <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> + <return type='char *' info="list of IOThreads information including the iothread_id, the cpumap, and the cpumap length for each iothread_id."/> + </function> <function name='virDomainSetSchedulerParameters' file='python'> <info>Change the scheduler parameters</info> <return type='int' info='-1 in case of error, 0 in case of success.'/> |