1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-27 11:34:09 +03:00

Implement python binding for virDomainGetBlockInfo

This binds the virDomainGetBlockInfo API to python's blockInfo
method on the domain object

>>> c = libvirt.openReadOnly('qemu:///session')
>>> d = c.lookupByName('demo')
>>> f = d.blockInfo("/dev/loop0", 0)
>>> print f
[1048576000L, 104857600L, 104857600L]

* python/libvirt-override-api.xml: Define override signature
* python/generator.py: Skip C impl generator for virDomainGetBlockInfo
* python/libvirt-override.c: Manual impl of virDomainGetBlockInfo
This commit is contained in:
Daniel P. Berrange
2010-04-28 13:42:13 +01:00
parent 7703c2c90a
commit 05776e09fc
3 changed files with 35 additions and 0 deletions

View File

@@ -48,6 +48,13 @@
<return type='int *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainGetBlockInfo' file='python'>
<info>Extract information about a domain block device size</info>
<return type='int *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='path' type='const char *' info='path to the block device or file'/>
<arg name='flags' type='unsigned int' info='currently unused'/>
</function>
<function name='virDomainGetJobInfo' file='python'>
<info>Extract information about an active job being processed for a domain.</info>
<return type='int *' info='the list of information or None in case of error'/>