python: fix bindings that don't raise an exception

For example:
 >>> dom.memoryStats()
 libvir: QEMU Driver error : Requested operation is not valid:\
         domain is not running

There are six such python API functions like so.
The root reason is that generator.py script checks the type of return
value of a python stub function defined in libvirt-api.xml or
libvirt-override-api.xml to see whether to add the raise clause or not
in python wrapper code in libvirt.py.

The type of return value is supposed to be C types.
For those stub functions which return python non-integer data type like
string, list, tuple, dictionary, the existing type in functions varies
from each other which leads problem like this.

Currently, in generator.py, it maintains a buggy whitelist for stub functions
returning a list type. I think it is easy to forget adding new function name
in the whitelist.

This patch makes the value of type consistent with C type "char *"
in libvirt-override-api.xml. For python, any of types could be printed
as string, so I choose "char *" in this case. And the comment in xml
could explain it when adding new function definition.

      <function name='virNodeGetCPUStats' file='python'>
        ...
 -      <return type='virNodeCPUStats' info='...'/>
 +      <return type='char *' info='...'/>
        ...
      </function>
This commit is contained in:
Guannan Ren 2013-03-21 11:24:49 +08:00
parent 1d94891288
commit 4b143ab231
2 changed files with 67 additions and 60 deletions

View File

@ -1009,11 +1009,9 @@ functions_list_exception_test = {
} }
functions_list_default_test = "%s is None" functions_list_default_test = "%s is None"
def is_list_type (name): def is_python_noninteger_type (name):
whitelist = [ "virDomainBlockStats",
"virDomainInterfaceStats" ]
return name[-1:] == "*" or name in whitelist return name[-1:] == "*"
def nameFixup(name, classe, type, file): def nameFixup(name, classe, type, file):
# avoid a desastrous clash # avoid a desastrous clash
@ -1387,7 +1385,7 @@ def buildWrappers(module):
("ret", name)) ("ret", name))
classes.write(" return ret\n") classes.write(" return ret\n")
elif is_list_type (ret[0]): elif is_python_noninteger_type (ret[0]):
if not functions_noexcept.has_key (name): if not functions_noexcept.has_key (name):
if functions_list_exception_test.has_key (name): if functions_list_exception_test.has_key (name):
test = functions_list_exception_test[name] test = functions_list_exception_test[name]
@ -1657,7 +1655,7 @@ def buildWrappers(module):
classes.write (" return ret\n") classes.write (" return ret\n")
elif is_list_type (ret[0]): elif is_python_noninteger_type (ret[0]):
if not functions_noexcept.has_key (name): if not functions_noexcept.has_key (name):
if functions_list_exception_test.has_key (name): if functions_list_exception_test.has_key (name):
test = functions_list_exception_test[name] test = functions_list_exception_test[name]

View File

@ -1,5 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<api name='libvir-python'> <api name='libvir-python'>
<!-- This file lists libvirt API functions whose Python stubs are
written by hand in libvirt-override.c, but the Python-level code
are still automatically generated by the generator.py script.
The type of return value is supposed to be C type. If a function's
stub will return a python non-integer data type like string, list,
tuple, dictionary, etc, please use "char *" as the type of its return
value.
-->
<symbols> <symbols>
<function name="virConnectGetVersion" file='python'> <function name="virConnectGetVersion" file='python'>
<info>Returns the running hypervisor version of the connection host</info> <info>Returns the running hypervisor version of the connection host</info>
@ -14,34 +23,34 @@
<function name="virConnectListDomainsID" file='python'> <function name="virConnectListDomainsID" file='python'>
<info>Returns the list of the ID of the domains on the hypervisor</info> <info>Returns the list of the ID of the domains on the hypervisor</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='int *' info="the list of ID or None in case of error"/> <return type='char *' info="the list of ID or None in case of error"/>
</function> </function>
<function name='virConnectListDefinedDomains' file='python'> <function name='virConnectListDefinedDomains' file='python'>
<info>list the defined domains, stores the pointers to the names in @names</info> <info>list the defined domains, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virConnectListAllDomains' file='python'> <function name='virConnectListAllDomains' file='python'>
<info>returns list of all defined domains</info> <info>returns list of all defined domains</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='domain *' info='the list of domains or None in case of error'/> <return type='char *' info='the list of domains or None in case of error'/>
</function> </function>
<function name='virConnectListNetworks' file='python'> <function name='virConnectListNetworks' file='python'>
<info>list the networks, stores the pointers to the names in @names</info> <info>list the networks, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virConnectListDefinedNetworks' file='python'> <function name='virConnectListDefinedNetworks' file='python'>
<info>list the defined networks, stores the pointers to the names in @names</info> <info>list the defined networks, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virConnectListAllNetworks' file='python'> <function name='virConnectListAllNetworks' file='python'>
<info>returns list of all networks</info> <info>returns list of all networks</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='network *' info='the list of networks or None in case of error'/> <return type='char *' info='the list of networks or None in case of error'/>
</function> </function>
<function name='virDomainLookupByUUID' file='python'> <function name='virDomainLookupByUUID' file='python'>
<info>Try to lookup a domain on the given hypervisor based on its UUID.</info> <info>Try to lookup a domain on the given hypervisor based on its UUID.</info>
@ -57,54 +66,54 @@
</function> </function>
<function name='virDomainGetInfo' file='python'> <function name='virDomainGetInfo' file='python'>
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info> <info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<function name='virDomainGetState' file='python'> <function name='virDomainGetState' file='python'>
<info>Extract domain state.</info> <info>Extract domain state.</info>
<return type='int *' info='the list containing state and reason or None in case of error'/> <return type='char *' info='the list containing state and reason or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='additional flags'/> <arg name='flags' type='unsigned int' info='additional flags'/>
</function> </function>
<function name='virDomainGetControlInfo' file='python'> <function name='virDomainGetControlInfo' file='python'>
<info>Extract details about current state of control interface to a domain.</info> <info>Extract details about current state of control interface to a domain.</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='additional flags'/> <arg name='flags' type='unsigned int' info='additional flags'/>
</function> </function>
<function name='virDomainGetBlockInfo' file='python'> <function name='virDomainGetBlockInfo' file='python'>
<info>Extract information about a domain block device size</info> <info>Extract information about a domain block device size</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <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='path' type='const char *' info='path to the block device or file'/>
<arg name='flags' type='unsigned int' info='currently unused'/> <arg name='flags' type='unsigned int' info='currently unused'/>
</function> </function>
<function name='virDomainGetJobInfo' file='python'> <function name='virDomainGetJobInfo' file='python'>
<info>Extract information about an active job being processed for a domain.</info> <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'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<function name='virDomainGetJobStats' file='python'> <function name='virDomainGetJobStats' file='python'>
<info>Extract information about an active job being processed for a domain.</info> <info>Extract information about an active job being processed for a domain.</info>
<return type='virDomainJobStats' info='dictionary mapping field names to values or None in case of error'/> <return type='char *' info='dictionary mapping field names to values or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='flags, currently unused, pass 0.'/> <arg name='flags' type='unsigned int' info='flags, currently unused, pass 0.'/>
</function> </function>
<function name='virNodeGetInfo' file='python'> <function name='virNodeGetInfo' file='python'>
<info>Extract hardware information about the Node.</info> <info>Extract hardware information about the Node.</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function> </function>
<function name='virNodeGetCPUStats' file='python'> <function name='virNodeGetCPUStats' file='python'>
<info>Extract node's CPU statistics.</info> <info>Extract node's CPU statistics.</info>
<return type='virNodeCPUStats' info='dictionary mapping field names to values or None in case of error'/> <return type='char *' info='dictionary mapping field names to values or None in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to hypervisor connection'/>
<arg name='cpuNum' type='int' info='number of node cpu. (VIR_NODE_CPU_STATS_ALL_CPUS means total cpu statistics)'/> <arg name='cpuNum' type='int' info='number of node cpu. (VIR_NODE_CPU_STATS_ALL_CPUS means total cpu statistics)'/>
<arg name='flags' type='unsigned int' info='additional flags'/> <arg name='flags' type='unsigned int' info='additional flags'/>
</function> </function>
<function name='virNodeGetMemoryStats' file='python'> <function name='virNodeGetMemoryStats' file='python'>
<info>Extract node's memory statistics.</info> <info>Extract node's memory statistics.</info>
<return type='virNodeMemoryStats' info='dictionary mapping field names to values or None in case of error'/> <return type='char *' info='dictionary mapping field names to values or None in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to hypervisor connection'/>
<arg name='cellNum' type='int' info='number of node cell. (VIR_NODE_MEMORY_STATS_ALL_CELLS means total cell statistics)'/> <arg name='cellNum' type='int' info='number of node cell. (VIR_NODE_MEMORY_STATS_ALL_CELLS means total cell statistics)'/>
<arg name='flags' type='unsigned int' info='additional flags'/> <arg name='flags' type='unsigned int' info='additional flags'/>
@ -156,13 +165,13 @@
</function> </function>
<function name='virDomainBlockStats' file='python'> <function name='virDomainBlockStats' file='python'>
<info>Extracts block device statistics for a domain</info> <info>Extracts block device statistics for a domain</info>
<return type='virDomainBlockStats' info='a tuple of statistics'/> <return type='char *' info='a tuple of statistics'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='path' type='char *' info='the path for the block device'/> <arg name='path' type='char *' info='the path for the block device'/>
</function> </function>
<function name='virDomainBlockStatsFlags' file='python'> <function name='virDomainBlockStatsFlags' file='python'>
<info>Extracts block device statistics parameters of a running domain</info> <info>Extracts block device statistics parameters of a running domain</info>
<return type='str *' info='None in case of error, returns a dictionary of params'/> <return type='char *' info='None in case of error, returns a dictionary of params'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='path' type='char *' info='the path for the block device'/> <arg name='path' type='char *' info='the path for the block device'/>
<arg name='flags' type='int' info='flags (unused; pass 0)'/> <arg name='flags' type='int' info='flags (unused; pass 0)'/>
@ -175,20 +184,20 @@
[{cpu_time:xxx}, {cpu_time:xxx}, ...] [{cpu_time:xxx}, {cpu_time:xxx}, ...]
If it is True or 1, it returns total domain CPU statistics in the format of If it is True or 1, it returns total domain CPU statistics in the format of
[{cpu_time:xxx, user_time:xxx, system_time:xxx}]</info> [{cpu_time:xxx, user_time:xxx, system_time:xxx}]</info>
<return type='str *' info='returns a list of dictionary in case of success, None in case of error'/> <return type='char *' info='returns a list of dictionary in case of success, None in case of error'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='total' type='bool' info='on true, return total domain CPU statistics, false return per-cpu info'/> <arg name='total' type='bool' info='on true, return total domain CPU statistics, false return per-cpu info'/>
<arg name='flags' type='int' info='flags (unused; pass 0)'/> <arg name='flags' type='int' info='flags (unused; pass 0)'/>
</function> </function>
<function name='virDomainInterfaceStats' file='python'> <function name='virDomainInterfaceStats' file='python'>
<info>Extracts interface device statistics for a domain</info> <info>Extracts interface device statistics for a domain</info>
<return type='virDomainInterfaceStats' info='a tuple of statistics'/> <return type='char *' info='a tuple of statistics'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='path' type='char *' info='the path for the interface device'/> <arg name='path' type='char *' info='the path for the interface device'/>
</function> </function>
<function name='virDomainMemoryStats' file='python'> <function name='virDomainMemoryStats' file='python'>
<info>Extracts memory statistics for a domain</info> <info>Extracts memory statistics for a domain</info>
<return type='virDomainMemoryStats' info='a dictionary of statistics'/> <return type='char *' info='a dictionary of statistics'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<function name="virNodeGetCellsFreeMemory" file='python'> <function name="virNodeGetCellsFreeMemory" file='python'>
@ -196,16 +205,16 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='startCell' type='int' info='first cell in the list'/> <arg name='startCell' type='int' info='first cell in the list'/>
<arg name='maxCells' type='int' info='number of cell in the list'/> <arg name='maxCells' type='int' info='number of cell in the list'/>
<return type='int *' info="the list available memory in the cells"/> <return type='char *' info="the list available memory in the cells"/>
</function> </function>
<function name='virDomainGetSchedulerParameters' file='python'> <function name='virDomainGetSchedulerParameters' file='python'>
<info>Get the scheduler parameters, the @params array will be filled with the values.</info> <info>Get the scheduler parameters, the @params array will be filled with the values.</info>
<return type='str *' info='None in case of error, returns a dictionary of params.'/> <return type='char *' info='None in case of error, returns a dictionary of params.'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
</function> </function>
<function name='virDomainGetSchedulerParametersFlags' file='python'> <function name='virDomainGetSchedulerParametersFlags' file='python'>
<info>Get the scheduler parameters</info> <info>Get the scheduler parameters</info>
<return type='str *' info='None in case of error, returns a dictionary of params'/> <return type='char *' info='None in case of error, returns a dictionary of params'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function> </function>
@ -236,7 +245,7 @@
</function> </function>
<function name='virDomainGetVcpuPinInfo' file='python'> <function name='virDomainGetVcpuPinInfo' file='python'>
<info>Query the CPU affinity setting of all virtual CPUs of domain</info> <info>Query the CPU affinity setting of all virtual CPUs of domain</info>
<return type='unsigned char *' info='the array of cpumap'/> <return type='char *' info='the array of cpumap'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function> </function>
@ -262,7 +271,7 @@
</function> </function>
<function name='virDomainGetBlkioParameters' file='python'> <function name='virDomainGetBlkioParameters' file='python'>
<info>Get the blkio parameters</info> <info>Get the blkio parameters</info>
<return type='str *' info='None in case of error, returns a dictionary of params'/> <return type='char *' info='None in case of error, returns a dictionary of params'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function> </function>
@ -275,7 +284,7 @@
</function> </function>
<function name='virDomainGetMemoryParameters' file='python'> <function name='virDomainGetMemoryParameters' file='python'>
<info>Get the memory parameters</info> <info>Get the memory parameters</info>
<return type='str *' info='None in case of error, returns a dictionary of params'/> <return type='char *' info='None in case of error, returns a dictionary of params'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function> </function>
@ -288,7 +297,7 @@
</function> </function>
<function name='virDomainGetNumaParameters' file='python'> <function name='virDomainGetNumaParameters' file='python'>
<info>Get the NUMA parameters</info> <info>Get the NUMA parameters</info>
<return type='str *' info='returns a dictionary of params in case of success, None in case of error'/> <return type='char *' info='returns a dictionary of params in case of success, None in case of error'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='domain' type='virDomainPtr' info='pointer to domain object'/>
<arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='int' info='an OR&apos;ed set of virDomainModificationImpact'/>
</function> </function>
@ -305,44 +314,44 @@
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='device' type='const char *' info='interface name'/> <arg name='device' type='const char *' info='interface name'/>
<arg name='flags' type='unsigned int' info='an OR&apos;ed set of virDomainModificationImpact'/> <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'/> <return type='char *' info='the bandwidth tunables value or None in case of error'/>
</function> </function>
<function name='virConnectListStoragePools' file='python'> <function name='virConnectListStoragePools' file='python'>
<info>list the storage pools, stores the pointers to the names in @names</info> <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'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names of None in case of error'/> <return type='char *' info='the list of Names of None in case of error'/>
</function> </function>
<function name='virConnectListDefinedStoragePools' file='python'> <function name='virConnectListDefinedStoragePools' file='python'>
<info>list the defined storage pool, stores the pointers to the names in @names</info> <info>list the defined storage pool, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names of None in case of error'/> <return type='char *' info='the list of Names of None in case of error'/>
</function> </function>
<function name='virConnectListAllStoragePools' file='python'> <function name='virConnectListAllStoragePools' file='python'>
<info>returns list of all storage pools</info> <info>returns list of all storage pools</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='pool *' info='the list of pools or None in case of error'/> <return type='char *' info='the list of pools or None in case of error'/>
</function> </function>
<function name='virStoragePoolListVolumes' file='python'> <function name='virStoragePoolListVolumes' file='python'>
<info>list the storage volumes, stores the pointers to the names in @names</info> <info>list the storage volumes, stores the pointers to the names in @names</info>
<arg name='pool' type='virStoragePoolPtr' info='pointer to the storage pool'/> <arg name='pool' type='virStoragePoolPtr' info='pointer to the storage pool'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virStoragePoolListAllVolumes' file='python'> <function name='virStoragePoolListAllVolumes' file='python'>
<info>return list of storage volume objects</info> <info>return list of storage volume objects</info>
<arg name='pool' type='virStoragePoolPtr' info='pointer to the storage pool'/> <arg name='pool' type='virStoragePoolPtr' info='pointer to the storage pool'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='volume *' info='the list of volumes or None in case of error'/> <return type='char *' info='the list of volumes or None in case of error'/>
</function> </function>
<function name='virStoragePoolGetInfo' file='python'> <function name='virStoragePoolGetInfo' file='python'>
<info>Extract information about a storage pool. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info> <info>Extract information about a storage pool. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='pool' type='virStoragePoolPtr' info='a storage pool object'/> <arg name='pool' type='virStoragePoolPtr' info='a storage pool object'/>
</function> </function>
<function name='virStorageVolGetInfo' file='python'> <function name='virStorageVolGetInfo' file='python'>
<info>Extract information about a storage volume. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info> <info>Extract information about a storage volume. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info>
<return type='int *' info='the list of information or None in case of error'/> <return type='char *' info='the list of information or None in case of error'/>
<arg name='vol' type='virStorageVolPtr' info='a storage vol object'/> <arg name='vol' type='virStorageVolPtr' info='a storage vol object'/>
</function> </function>
<function name='virNodeListDevices' file='python'> <function name='virNodeListDevices' file='python'>
@ -350,18 +359,18 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='cap' type='const unsigned char *' info='capability name'/> <arg name='cap' type='const unsigned char *' info='capability name'/>
<arg name='flags' type='unsigned int' info='flags (unused; pass 0)'/> <arg name='flags' type='unsigned int' info='flags (unused; pass 0)'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virConnectListAllNodeDevices' file='python'> <function name='virConnectListAllNodeDevices' file='python'>
<info>returns list of all host node devices</info> <info>returns list of all host node devices</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='device *' info='the list of host node device or None in case of error'/> <return type='char *' info='the list of host node device or None in case of error'/>
</function> </function>
<function name='virNodeDeviceListCaps' file='python'> <function name='virNodeDeviceListCaps' file='python'>
<info>list the node device's capabilities</info> <info>list the node device's capabilities</info>
<arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/> <arg name='dev' type='virNodeDevicePtr' info='pointer to the node device'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virSecretGetValue' file='libvirt' module='libvirt'> <function name='virSecretGetValue' file='libvirt' module='libvirt'>
<info>Fetches the value associated with a secret.</info> <info>Fetches the value associated with a secret.</info>
@ -372,13 +381,13 @@
<function name='virConnectListSecrets' file='libvirt' module='libvirt'> <function name='virConnectListSecrets' file='libvirt' module='libvirt'>
<info>List the defined secret IDs</info> <info>List the defined secret IDs</info>
<arg name='conn' type='virConnectPtr' info='virConnect connection'/> <arg name='conn' type='virConnectPtr' info='virConnect connection'/>
<return type='str *' info='the list of secret IDs or None in case of error'/> <return type='char *' info='the list of secret IDs or None in case of error'/>
</function> </function>
<function name='virConnectListAllSecrets' file='python'> <function name='virConnectListAllSecrets' file='python'>
<info>returns list of all interfaces</info> <info>returns list of all interfaces</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='secret *' info='the list of secrets or None in case of error'/> <return type='char *' info='the list of secrets or None in case of error'/>
</function> </function>
<function name='virSecretSetValue' file='libvirt' module='libvirt'> <function name='virSecretSetValue' file='libvirt' module='libvirt'>
<info>Associates a value with a secret.</info> <info>Associates a value with a secret.</info>
@ -406,13 +415,13 @@
<function name='virConnectListNWFilters' file='libvirt' module='libvirt'> <function name='virConnectListNWFilters' file='libvirt' module='libvirt'>
<info>List the defined network filters</info> <info>List the defined network filters</info>
<arg name='conn' type='virConnectPtr' info='virConnect connection'/> <arg name='conn' type='virConnectPtr' info='virConnect connection'/>
<return type='str *' info='the list of network filter IDs or None in case of error'/> <return type='char *' info='the list of network filter IDs or None in case of error'/>
</function> </function>
<function name='virConnectListAllNWFilters' file='python'> <function name='virConnectListAllNWFilters' file='python'>
<info>returns list of all network fitlers</info> <info>returns list of all network fitlers</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='nwfilter *' info='the list of network filters or None in case of error'/> <return type='char *' info='the list of network filters or None in case of error'/>
</function> </function>
<function name='virNWFilterLookupByUUID' file='python'> <function name='virNWFilterLookupByUUID' file='python'>
<info>Try to lookup a network filter on the given hypervisor based on its UUID.</info> <info>Try to lookup a network filter on the given hypervisor based on its UUID.</info>
@ -433,18 +442,18 @@
<function name='virConnectListInterfaces' file='python'> <function name='virConnectListInterfaces' file='python'>
<info>list the running interfaces, stores the pointers to the names in @names</info> <info>list the running interfaces, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names of None in case of error'/> <return type='char *' info='the list of Names of None in case of error'/>
</function> </function>
<function name='virConnectListDefinedInterfaces' file='python'> <function name='virConnectListDefinedInterfaces' file='python'>
<info>list the defined interfaces, stores the pointers to the names in @names</info> <info>list the defined interfaces, stores the pointers to the names in @names</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='str *' info='the list of Names of None in case of error'/> <return type='char *' info='the list of Names of None in case of error'/>
</function> </function>
<function name='virConnectListAllInterfaces' file='python'> <function name='virConnectListAllInterfaces' file='python'>
<info>returns list of all interfaces</info> <info>returns list of all interfaces</info>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='unsigned int' info='optional flags'/> <arg name='flags' type='unsigned int' info='optional flags'/>
<return type='interface *' info='the list of interfaces or None in case of error'/> <return type='char *' info='the list of interfaces or None in case of error'/>
</function> </function>
<function name='virConnectBaselineCPU' file='python'> <function name='virConnectBaselineCPU' file='python'>
<info>Computes the most feature-rich CPU which is compatible with all given host CPUs.</info> <info>Computes the most feature-rich CPU which is compatible with all given host CPUs.</info>
@ -457,25 +466,25 @@
<info>collect the list of snapshot names for the given domain</info> <info>collect the list of snapshot names for the given domain</info>
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='flags' type='unsigned int' info='flags'/> <arg name='flags' type='unsigned int' info='flags'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virDomainListAllSnapshots' file='python'> <function name='virDomainListAllSnapshots' file='python'>
<info>returns the list of snapshots for the given domain</info> <info>returns the list of snapshots for the given domain</info>
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='flags' type='unsigned int' info='flags'/> <arg name='flags' type='unsigned int' info='flags'/>
<return type='snapshot *' info='the list of snapshots or None in case of error'/> <return type='char *' info='the list of snapshots or None in case of error'/>
</function> </function>
<function name='virDomainSnapshotListChildrenNames' file='python'> <function name='virDomainSnapshotListChildrenNames' file='python'>
<info>collect the list of child snapshot names for the given snapshot</info> <info>collect the list of child snapshot names for the given snapshot</info>
<arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/> <arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/>
<arg name='flags' type='unsigned int' info='flags'/> <arg name='flags' type='unsigned int' info='flags'/>
<return type='str *' info='the list of Names or None in case of error'/> <return type='char *' info='the list of Names or None in case of error'/>
</function> </function>
<function name='virDomainSnapshotListAllChildren' file='python'> <function name='virDomainSnapshotListAllChildren' file='python'>
<info>returns the list of child snapshots for the given snapshot</info> <info>returns the list of child snapshots for the given snapshot</info>
<arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/> <arg name='snapshot' type='virDomainSnapshotPtr' info='pointer to the snapshot'/>
<arg name='flags' type='unsigned int' info='flags'/> <arg name='flags' type='unsigned int' info='flags'/>
<return type='snapshot *' info='the list of snapshots or None in case of error'/> <return type='char *' info='the list of snapshots or None in case of error'/>
</function> </function>
<function name='virDomainRevertToSnapshot' file='python'> <function name='virDomainRevertToSnapshot' file='python'>
<info>revert the domain to the given snapshot</info> <info>revert the domain to the given snapshot</info>
@ -489,7 +498,7 @@
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='path' type='const char *' info='Fully-qualified filename of disk'/> <arg name='path' type='const char *' info='Fully-qualified filename of disk'/>
<arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/> <arg name='flags' type='unsigned int' info='fine-tuning flags, currently unused, pass 0.'/>
<return type='virDomainBlockJobInfo' info='A dictionary containing job information.' /> <return type='char *' info='A dictionary containing job information.' />
</function> </function>
<function name='virDomainMigrateGetCompressionCache' file='python'> <function name='virDomainMigrateGetCompressionCache' file='python'>
<info>Get current size of the cache (in bytes) used for compressing <info>Get current size of the cache (in bytes) used for compressing
@ -517,7 +526,7 @@
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/> <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='disk' type='const char *' info='disk name'/> <arg name='disk' type='const char *' info='disk name'/>
<arg name='flags' type='unsigned int' info='an OR&apos;ed set of virDomainModificationImpact'/> <arg name='flags' type='unsigned int' info='an OR&apos;ed set of virDomainModificationImpact'/>
<return type='str *' info='the I/O tunables value or None in case of error'/> <return type='char *' info='the I/O tunables value or None in case of error'/>
</function> </function>
<function name='virDomainBlockPeek' file='python'> <function name='virDomainBlockPeek' file='python'>
<info>Read the contents of domain's disk device</info> <info>Read the contents of domain's disk device</info>
@ -538,7 +547,7 @@
</function> </function>
<function name='virDomainGetDiskErrors' file='python'> <function name='virDomainGetDiskErrors' file='python'>
<info>Extract errors on disk devices.</info> <info>Extract errors on disk devices.</info>
<return type='virDomainDiskErrorPtr' info='dictionary of disks and their errors or None in case of error'/> <return type='char *' info='dictionary of disks and their errors or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='unused, always pass 0'/> <arg name='flags' type='unsigned int' info='unused, always pass 0'/>
</function> </function>
@ -551,13 +560,13 @@
</function> </function>
<function name='virNodeGetMemoryParameters' file='python'> <function name='virNodeGetMemoryParameters' file='python'>
<info>Get the node memory parameters</info> <info>Get the node memory parameters</info>
<return type='str *' info='None in case of error, returns a dictionary of params'/> <return type='char *' info='None in case of error, returns a dictionary of params'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='int' info='unused, always pass 0'/> <arg name='flags' type='int' info='unused, always pass 0'/>
</function> </function>
<function name='virNodeGetCPUMap' file='python'> <function name='virNodeGetCPUMap' file='python'>
<info>Get node CPU information</info> <info>Get node CPU information</info>
<return type='str *' info='(cpunum, cpumap, online) on success, None on error'/> <return type='char *' info='(cpunum, cpumap, online) on success, None on error'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='int' info='unused, pass 0'/> <arg name='flags' type='int' info='unused, pass 0'/>
</function> </function>