2005-12-19 16:34:11 +00:00
<?xml version="1.0"?>
<api name= 'libvir-python' >
2006-01-31 10:24:12 +00:00
<symbols >
2010-01-22 10:01:09 +00:00
<function name= "virConnectGetVersion" file= 'python' >
<info > Returns the running hypervisor version of the connection host</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<return type= 'int' info= "0 on success, -1 on error" />
</function>
2009-11-12 15:53:26 +00:00
<function name= "virConnectGetLibVersion" file= 'python' >
<info > Returns the libvirt version of the connection host</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<return type= 'int' info= "0 on success, -1 on error" />
</function>
2006-01-31 10:24:12 +00:00
<function name= "virConnectListDomainsID" file= 'python' >
<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' />
<return type= 'int *' info= "the list of ID or None in case of error" />
</function>
2006-11-16 00:17:10 +00:00
<function name= 'virConnectListDefinedDomains' file= 'python' >
<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' />
2012-05-20 14:20:11 +00:00
<return type= 'str *' info= 'the list of Names or None in case of error' />
</function>
<function name= 'virConnectListAllDomains' file= 'python' >
<info > returns list of all defined domains</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'flags' type= 'unsigned int' info= 'optional flags' />
<return type= 'domain *' info= 'the list of domains or None in case of error' />
2006-11-16 00:17:10 +00:00
</function>
2007-03-09 15:42:50 +00:00
<function name= 'virConnectListNetworks' file= 'python' >
<info > list the networks, stores the pointers to the names in @names</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
2012-05-20 14:20:11 +00:00
<return type= 'str *' info= 'the list of Names or None in case of error' />
2007-03-09 15:42:50 +00:00
</function>
<function name= 'virConnectListDefinedNetworks' file= 'python' >
<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' />
2012-05-20 14:20:11 +00:00
<return type= 'str *' info= 'the list of Names or None in case of error' />
2007-03-09 15:42:50 +00:00
</function>
2012-09-04 15:55:21 +00:00
<function name= 'virConnectListAllNetworks' file= 'python' >
<info > returns list of all networks</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'flags' type= 'unsigned int' info= 'optional flags' />
<return type= 'network *' info= 'the list of networks or None in case of error' />
</function>
2006-02-24 12:26:56 +00:00
<function name= 'virDomainLookupByUUID' file= 'python' >
<info > Try to lookup a domain on the given hypervisor based on its UUID.</info>
<return type= 'virDomainPtr' info= 'a new domain object or NULL in case of failure' />
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'uuid' type= 'const unsigned char *' info= 'the UUID string for the domain, must be 16 bytes' />
</function>
2007-03-09 15:42:50 +00:00
<function name= 'virNetworkLookupByUUID' file= 'python' >
<info > Try to lookup a network on the given hypervisor based on its UUID.</info>
<return type= 'virNetworkPtr' info= 'a new network object or NULL in case of failure' />
python: Fix networkLookupByUUID
According to:
http://libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUID
virNetworkLookupByUUID() expects a virConnectPtr as its first argument,
thus making it a method of the virConnect Python class.
Currently it's a method of libvirt.virNetwork.
@@ -805,13 +805,6 @@ class virNetwork:
if ret == -1: raise libvirtError ('virNetworkGetAutostart() failed', net=self)
return ret
- def networkLookupByUUID(self, uuid):
- """Try to lookup a network on the given hypervisor based on its UUID. """
- ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
- if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', net=self)
- __tmp = virNetwork(self, _obj=ret)
- return __tmp
-
class virInterface:
def __init__(self, conn, _obj=None):
self._conn = conn
@@ -1689,6 +1682,13 @@ class virConnect:
__tmp = virDomain(self,_obj=ret)
return __tmp
+ def networkLookupByUUID(self, uuid):
+ """Try to lookup a network on the given hypervisor based on its UUID. """
+ ret = libvirtmod.virNetworkLookupByUUID(self._o, uuid)
+ if ret is None:raise libvirtError('virNetworkLookupByUUID() failed', conn=self)
+ __tmp = virNetwork(self, _obj=ret)
+ return __tmp
+
2010-03-17 16:34:04 +00:00
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
2007-03-09 15:42:50 +00:00
<arg name= 'uuid' type= 'const unsigned char *' info= 'the UUID string for the network, must be 16 bytes' />
</function>
2006-03-29 12:46:03 +00:00
<function name= 'virDomainGetInfo' file= 'python' >
2008-03-14 11:08:03 +00:00
<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' />
2006-01-31 10:24:12 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
</function>
2011-04-22 11:31:35 +00:00
<function name= 'virDomainGetState' file= 'python' >
<info > Extract domain state.</info>
<return type= 'int *' info= 'the list containing state and reason or None in case of error' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'flags' type= 'unsigned int' info= 'additional flags' />
</function>
2011-05-24 08:28:50 +00:00
<function name= 'virDomainGetControlInfo' file= 'python' >
<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' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'flags' type= 'unsigned int' info= 'additional flags' />
</function>
2010-04-28 12:42:13 +00:00
<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>
2010-02-03 11:31:45 +00:00
<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' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
</function>
2006-03-29 12:46:03 +00:00
<function name= 'virNodeGetInfo' file= 'python' >
2008-03-14 11:08:03 +00:00
<info > Extract hardware information about the Node.</info>
<return type= 'int *' info= 'the list of information or None in case of error' />
2006-03-29 12:46:03 +00:00
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
</function>
2011-11-28 17:19:27 +00:00
<function name= 'virNodeGetCPUStats' file= 'python' >
<info > Extract node's CPU statistics.</info>
<return type= 'virNodeCPUStats' 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= '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' />
</function>
2011-11-28 17:19:28 +00:00
<function name= 'virNodeGetMemoryStats' file= 'python' >
<info > Extract node's memory statistics.</info>
<return type= 'virNodeMemoryStats' 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= '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' />
</function>
2006-03-29 12:46:03 +00:00
<function name= 'virDomainGetUUID' file= 'python' >
2006-02-23 11:26:17 +00:00
<info > Extract the UUID unique Identifier of a domain.</info>
<return type= 'char *' info= 'the 16 bytes string or None in case of error' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
</function>
2008-06-10 15:20:25 +00:00
<function name= 'virDomainGetUUIDString' file= 'python' >
<info > Fetch globally unique ID of the domain as a string.</info>
<return type= 'char *' info= 'the UUID string or None in case of error' />
<arg name= 'pool' type= 'virDomainPtr' info= 'a domain object' />
</function>
2007-03-09 15:42:50 +00:00
<function name= 'virNetworkGetUUID' file= 'python' >
<info > Extract the UUID unique Identifier of a network.</info>
<return type= 'char *' info= 'the 16 bytes string or None in case of error' />
<arg name= 'domain' type= 'virNetworkPtr' info= 'a network object' />
</function>
2008-06-10 15:20:25 +00:00
<function name= 'virNetworkGetUUIDString' file= 'python' >
<info > Fetch globally unique ID of the network as a string.</info>
<return type= 'char *' info= 'the UUID string or None in case of error' />
<arg name= 'net' type= 'virNetworkPtr' info= 'a network object' />
</function>
<function name= 'virStoragePoolGetUUID' file= 'python' >
<info > Extract the UUID unique Identifier of a storage pool.</info>
<return type= 'char *' info= 'the 16 bytes string or None in case of error' />
<arg name= 'pool' type= 'virStoragePoolPtr' info= 'a storage pool object' />
</function>
<function name= 'virStoragePoolGetUUIDString' file= 'python' >
<info > Fetch globally unique ID of the storage pool as a string.</info>
<return type= 'char *' info= 'the UUID string or None in case of error' />
<arg name= 'pool' type= 'virStoragePoolPtr' info= 'a storage pool object' />
</function>
2007-04-10 23:15:58 +00:00
<function name= 'virNetworkGetAutostart' file= 'python' >
<info > Extract the autostart flag for a network.</info>
<return type= 'int' info= 'the autostart flag, or None in case of error' />
<arg name= 'domain' type= 'virNetworkPtr' info= 'a network object' />
</function>
<function name= 'virDomainGetAutostart' file= 'python' >
<info > Extract the autostart flag for a domain</info>
<return type= 'int' info= 'the autostart flag, or None in case of error' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a network object' />
</function>
2008-06-11 07:49:01 +00:00
<function name= 'virStoragePoolGetAutostart' file= 'python' >
<info > Extract the autostart flag for a storage pool</info>
<return type= 'int' info= 'the autostart flag, or None in case of error' />
<arg name= 'pool' type= 'virStoragePoolPtr' info= 'a storage pool object' />
</function>
2007-09-30 20:52:13 +00:00
<function name= 'virDomainBlockStats' file= 'python' >
<info > Extracts block device statistics for a domain</info>
<return type= 'virDomainBlockStats' info= 'a tuple of statistics' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'path' type= 'char *' info= 'the path for the block device' />
</function>
2011-09-05 08:24:21 +00:00
<function name= 'virDomainBlockStatsFlags' file= 'python' >
<info > Extracts block device statistics parameters of a running domain</info>
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'None in case of error, returns a dictionary of params' />
2011-09-05 08:24:21 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'path' type= 'char *' info= 'the path for the block device' />
<arg name= 'flags' type= 'int' info= 'flags (unused; pass 0)' />
</function>
2012-03-20 04:34:06 +00:00
<function name= 'virDomainGetCPUStats' file= 'python' >
<info > Extracts CPU statistics for a running domain. On success it will
2012-03-27 06:06:47 +00:00
return a list of data of dictionary type. If boolean total is False or 0, the
2012-03-20 04:34:06 +00:00
first element of the list refers to CPU0 on the host, second element is
CPU1, and so on. The format of data struct is as follows:
[{cpu_time:xxx}, {cpu_time:xxx}, ...]
2012-03-27 06:06:47 +00:00
If it is True or 1, it returns total domain CPU statistics in the format of
2012-03-20 04:34:06 +00:00
[{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' />
<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= 'flags' type= 'int' info= 'flags (unused; pass 0)' />
</function>
2007-09-30 20:52:13 +00:00
<function name= 'virDomainInterfaceStats' file= 'python' >
<info > Extracts interface device statistics for a domain</info>
<return type= 'virDomainInterfaceStats' info= 'a tuple of statistics' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'path' type= 'char *' info= 'the path for the interface device' />
</function>
2009-12-20 12:48:37 +00:00
<function name= 'virDomainMemoryStats' file= 'python' >
<info > Extracts memory statistics for a domain</info>
<return type= 'virDomainMemoryStats' info= 'a dictionary of statistics' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
</function>
2007-12-07 08:41:01 +00:00
<function name= "virNodeGetCellsFreeMemory" file= 'python' >
2008-02-29 12:53:10 +00:00
<info > Returns the available memory for a list of cells</info>
2007-12-07 08:41:01 +00:00
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'startCell' type= 'int' info= 'first 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" />
</function>
2008-01-21 15:41:15 +00:00
<function name= 'virDomainGetSchedulerParameters' file= 'python' >
<info > Get the scheduler parameters, the @params array will be filled with the values.</info>
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'None in case of error, returns a dictionary of params.' />
2008-01-21 15:41:15 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
</function>
2011-07-25 06:54:34 +00:00
<function name= 'virDomainGetSchedulerParametersFlags' file= 'python' >
<info > Get the scheduler parameters</info>
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'None in case of error, returns a dictionary of params' />
2011-07-25 06:54:34 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
</function>
2008-01-21 15:41:15 +00:00
<function name= 'virDomainGetSchedulerType' file= 'python' >
<info > Get the scheduler type.</info>
<return type= 'char *' info= 'NULL in case of error. The caller must free the returned string.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
</function>
<function name= 'virDomainGetVcpus' file= 'python' >
<info > Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is' nt NULL.</info>
<return type= 'int' info= 'the number of info filled in case of success, -1 in case of failure.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object, or NULL for Domain0' />
</function>
<function name= 'virDomainPinVcpu' file= 'python' >
2008-02-29 12:53:10 +00:00
<info > Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor.</info>
2008-01-21 15:41:15 +00:00
<return type= 'int' info= '0 in case of success, -1 in case of failure.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object, or NULL for Domain0' />
<arg name= 'vcpu' type= 'unsigned int' info= 'virtual CPU number' />
<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.' />
</function>
2011-07-25 07:00:11 +00:00
<function name= 'virDomainPinVcpuFlags' file= 'python' >
<info > Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor.</info>
<return type= 'int' info= '0 in case of success, -1 in case of failure.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object, or NULL for Domain0' />
<arg name= 'vcpu' type= 'unsigned int' info= 'virtual CPU number' />
<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>
2011-07-25 07:04:50 +00:00
<function name= 'virDomainGetVcpuPinInfo' file= 'python' >
<info > Query the CPU affinity setting of all virtual CPUs of domain</info>
<return type= 'unsigned char *' info= 'the array of cpumap' />
<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' />
</function>
2008-01-21 15:41:15 +00:00
<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.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'params' type= 'virSchedParameterPtr' info= 'pointer to scheduler parameter objects' />
</function>
2011-07-25 06:57:33 +00:00
<function name= 'virDomainSetSchedulerParametersFlags' file= 'python' >
<info > Change the scheduler parameters</info>
<return type= 'int' info= '-1 in case of error, 0 in case of success.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'params' type= 'virSchedParameterPtr' info= 'pointer to scheduler parameter objects' />
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
</function>
2011-02-22 05:30:33 +00:00
<function name= 'virDomainSetBlkioParameters' file= 'python' >
<info > Change the blkio tunables</info>
<return type= 'int' info= '-1 in case of error, 0 in case of success.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'params' type= 'virBlkioParameterPtr' info= 'pointer to blkio tunable objects' />
2011-07-27 02:13:09 +00:00
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
2011-02-22 05:30:33 +00:00
</function>
<function name= 'virDomainGetBlkioParameters' file= 'python' >
2011-07-27 02:13:08 +00:00
<info > Get the blkio parameters</info>
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'None in case of error, returns a dictionary of params' />
2011-02-22 05:30:33 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
2011-07-27 02:13:08 +00:00
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
2011-02-22 05:30:33 +00:00
</function>
2010-10-12 13:43:27 +00:00
<function name= 'virDomainSetMemoryParameters' file= 'python' >
<info > Change the memory tunables</info>
<return type= 'int' info= '-1 in case of error, 0 in case of success.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'params' type= 'virMemoryParameterPtr' info= 'pointer to memory tunable objects' />
2011-07-27 02:13:11 +00:00
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
2010-10-12 13:43:27 +00:00
</function>
<function name= 'virDomainGetMemoryParameters' file= 'python' >
2011-07-27 02:13:10 +00:00
<info > Get the memory parameters</info>
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'None in case of error, returns a dictionary of params' />
2010-10-12 13:43:27 +00:00
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
2011-07-27 02:13:10 +00:00
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
2010-10-12 13:43:27 +00:00
</function>
2012-02-08 12:20:50 +00:00
<function name= 'virDomainSetNumaParameters' file= 'python' >
<info > Change the NUMA tunables</info>
<return type= 'int' info= '-1 in case of error, 0 in case of success.' />
<arg name= 'domain' type= 'virDomainPtr' info= 'pointer to domain object' />
<arg name= 'params' type= 'virTypedParameterPtr' info= 'pointer to numa tunable objects' />
<arg name= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
</function>
<function name= 'virDomainGetNumaParameters' file= 'python' >
<info > Get the NUMA parameters</info>
<return type= 'str *' 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= 'flags' type= 'int' info= 'an OR'ed set of virDomainModificationImpact' />
</function>
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>
2012-02-14 02:46:23 +00:00
<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'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'ed set of virDomainModificationImpact' />
<return type= 'str *' info= 'the bandwidth tunables value or None in case of error' />
</function>
2008-05-29 14:53:58 +00:00
<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' />
<return type= 'str *' info= 'the list of Names of None in case of error' />
</function>
<function name= 'virConnectListDefinedStoragePools' file= 'python' >
<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' />
<return type= 'str *' info= 'the list of Names of None in case of error' />
</function>
2012-09-04 15:16:33 +00:00
<function name= 'virConnectListAllStoragePools' file= 'python' >
<info > returns list of all storage pools</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'flags' type= 'unsigned int' info= 'optional flags' />
<return type= 'pool *' info= 'the list of pools or None in case of error' />
</function>
2008-05-29 14:53:58 +00:00
<function name= 'virStoragePoolListVolumes' file= 'python' >
<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' />
2012-09-04 15:32:58 +00:00
<return type= 'str *' info= 'the list of Names or None in case of error' />
</function>
<function name= 'virStoragePoolListAllVolumes' file= 'python' >
<info > return list of storage volume objects</info>
<arg name= 'pool' type= 'virStoragePoolPtr' info= 'pointer to the storage pool' />
<arg name= 'flags' type= 'unsigned int' info= 'optional flags' />
<return type= 'volume *' info= 'the list of volumes or None in case of error' />
2008-05-29 14:53:58 +00:00
</function>
<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>
<return type= 'int *' info= 'the list of information or None in case of error' />
<arg name= 'pool' type= 'virStoragePoolPtr' info= 'a storage pool object' />
</function>
<function name= 'virStorageVolGetInfo' file= 'python' >
2010-06-15 09:44:13 +00:00
<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>
2008-05-29 14:53:58 +00:00
<return type= 'int *' info= 'the list of information or None in case of error' />
<arg name= 'vol' type= 'virStorageVolPtr' info= 'a storage vol object' />
</function>
2008-11-21 12:41:15 +00:00
<function name= 'virNodeListDevices' file= 'python' >
<info > list the node devices</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'cap' type= 'const unsigned char *' info= 'capability name' />
<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' />
</function>
<function name= 'virNodeDeviceListCaps' file= 'python' >
<info > list the node device's capabilities</info>
<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' />
</function>
Secret manipulation API docs refresh & wire up python generator
Sample session:
>>> import libvirt
>>> c = libvirt.open('qemu:///session')
>>> c.listSecrets()
['12247729-47d2-a783-88ce-b329d4781cd3', 'reee', 'abc']
>>> s = c.secretDefineXML("<secret ephemeral='no' private='no'>\n<description>Something for use</description>\n<volume>/foo/bar</volume>\n</secret>\n")
>>> s.UUIDString()
'340c2dfb-811b-eda8-da9e-25ccd7bfd650'
>>> s.XMLDesc()
"<secret ephemeral='no' private='no'>\n <uuid>340c2dfb-811b-eda8-da9e-25ccd7bfd650</uuid>\n <description>Something for use</description>\n <volume>/foo/bar</volume>\n</secret>\n"
>>> s.setValue('abc\0xx\xffx')
0
>>> s.value()
'abc\x00xx\xffx'
>>> s.undefine()
0
* python/generator.py: Add rules for virSecret APIs
* python/libvir.c, python/libvirt-python-api.xml: Manual impl of
virSecretSetValue, virSecretGetValue$ and virConnectListSecrets APIs
* python/libvirt_wrap.h, python/types.c: Wrapper for virSecret objects
* docs/libvirt-api.xml, docs/libvirt-refs.xml,
docs/html/libvirt-virterror.html, docs/html/libvirt-libvirt.html,
docs/devhelp/libvirt-virterror.html, docs/devhelp/libvirt-libvirt.html:
Re-generate with 'make api'
2009-08-04 18:38:21 +00:00
<function name= 'virSecretGetValue' file= 'libvirt' module= 'libvirt' >
<info > Fetches the value associated with a secret.</info>
<return type= 'char *' info= 'the secret value or None in case of error' />
<arg name= 'secret' type= 'virSecretPtr' info= 'virSecret secret' />
<arg name= 'flags' type= 'unsigned int' info= 'flags (unused; pass 0)' />
</function>
<function name= 'virConnectListSecrets' file= 'libvirt' module= 'libvirt' >
<info > List the defined secret IDs</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'virConnect connection' />
<return type= 'str *' info= 'the list of secret IDs or None in case of error' />
</function>
<function name= 'virSecretSetValue' file= 'libvirt' module= 'libvirt' >
<info > Associates a value with a secret.</info>
<return type= 'int' info= '0 on success, -1 on failure.' />
<arg name= 'secret' type= 'virSecretPtr' info= 'virSecret secret' />
<arg name= 'value' type= 'const char *' info= 'The secret value' />
<arg name= 'flags' type= 'unsigned int' info= 'flags (unused; pass 0)' />
</function>
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
<function name= 'virSecretLookupByUUID' file= 'python' >
<info > Try to lookup a secret on the given hypervisor based on its UUID.</info>
<return type= 'virSecretPtr' info= 'a new secret object or NULL in case of failure' />
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'uuid' type= 'const unsigned char *' info= 'the UUID string for the secret, must be 16 bytes' />
</function>
<function name= 'virSecretGetUUID' file= 'python' >
<info > Extract the UUID unique Identifier of a secret.</info>
<return type= 'char *' info= 'the 16 bytes string or None in case of error' />
<arg name= 'secret' type= 'virSecretPtr' info= 'a secret object' />
</function>
<function name= 'virSecretGetUUIDString' file= 'python' >
<info > Fetch globally unique ID of the secret as a string.</info>
<return type= 'char *' info= 'the UUID string or None in case of error' />
<arg name= 'secret' type= 'virSecretPtr' info= 'a secret object' />
</function>
2010-04-29 10:46:01 +00:00
<function name= 'virConnectListNWFilters' file= 'libvirt' module= 'libvirt' >
<info > List the defined network filters</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'virConnect connection' />
<return type= 'str *' info= 'the list of network filter IDs or None in case of error' />
</function>
<function name= 'virNWFilterLookupByUUID' file= 'python' >
<info > Try to lookup a network filter on the given hypervisor based on its UUID.</info>
<return type= 'virNWFilterPtr' info= 'a new network filter object or NULL in case of failure' />
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'uuid' type= 'const unsigned char *' info= 'the UUID string for the secret, must be 16 bytes' />
</function>
<function name= 'virNWFilterGetUUID' file= 'python' >
<info > Extract the UUID unique Identifier of a network filter.</info>
<return type= 'char *' info= 'the 16 bytes string or None in case of error' />
<arg name= 'nwfilter' type= 'virNWFilterPtr' info= 'a network filter object' />
</function>
<function name= 'virNWFilterGetUUIDString' file= 'python' >
<info > Fetch globally unique ID of the network filter as a string.</info>
<return type= 'char *' info= 'the UUID string or None in case of error' />
<arg name= 'nwfilter' type= 'virNWFilterPtr' info= 'a network filter object' />
</function>
2009-11-20 15:22:42 +00:00
<function name= 'virConnectListInterfaces' file= 'python' >
<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' />
<return type= 'str *' info= 'the list of Names of None in case of error' />
</function>
<function name= 'virConnectListDefinedInterfaces' file= 'python' >
<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' />
<return type= 'str *' info= 'the list of Names of None in case of error' />
</function>
2012-09-04 16:10:19 +00:00
<function name= 'virConnectListAllInterfaces' file= 'python' >
<info > returns list of all interfaces</info>
<arg name= 'conn' type= 'virConnectPtr' info= 'pointer to the hypervisor connection' />
<arg name= 'flags' type= 'unsigned int' info= 'optional flags' />
<return type= 'interface *' info= 'the list of interfaces or None in case of error' />
</function>
2010-01-22 13:52:41 +00:00
<function name= 'virConnectBaselineCPU' file= 'python' >
<info > Computes the most feature-rich CPU which is compatible with all given host CPUs.</info>
<return type= 'char *' info= 'XML description of the computed CPU or NULL on error.' />
<arg name= 'conn' type= 'virConnectPtr' info= 'virConnect connection' />
<arg name= 'xmlCPUs' type= 'const char **' info= 'array of XML descriptions of host CPUs' />
<arg name= 'flags' type= 'unsigned int' info= 'fine-tuning flags, currently unused, pass 0.' />
</function>
2010-04-20 09:49:27 +00:00
<function name= 'virDomainSnapshotListNames' file= 'python' >
2012-06-09 15:55:36 +00:00
<info > collect the list of snapshot names for the given domain</info>
2010-04-20 09:49:27 +00:00
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
2011-09-25 01:56:26 +00:00
<arg name= 'flags' type= 'unsigned int' info= 'flags' />
<return type= 'str *' info= 'the list of Names or None in case of error' />
</function>
2012-06-09 15:55:36 +00:00
<function name= 'virDomainListAllSnapshots' file= 'python' >
<info > returns the list of snapshots for the given domain</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<arg name= 'flags' type= 'unsigned int' info= 'flags' />
<return type= 'snapshot *' info= 'the list of snapshots or None in case of error' />
</function>
2011-09-25 01:56:26 +00:00
<function name= 'virDomainSnapshotListChildrenNames' file= 'python' >
2012-06-09 15:55:36 +00:00
<info > collect the list of child snapshot names for the given snapshot</info>
2011-09-25 01:56:26 +00:00
<arg name= 'snapshot' type= 'virDomainSnapshotPtr' info= 'pointer to the snapshot' />
<arg name= 'flags' type= 'unsigned int' info= 'flags' />
<return type= 'str *' info= 'the list of Names or None in case of error' />
2010-04-20 09:49:27 +00:00
</function>
2012-06-09 15:55:36 +00:00
<function name= 'virDomainSnapshotListAllChildren' file= 'python' >
<info > returns the list of child snapshots for the given snapshot</info>
<arg name= 'snapshot' type= 'virDomainSnapshotPtr' info= 'pointer to the snapshot' />
<arg name= 'flags' type= 'unsigned int' info= 'flags' />
<return type= 'snapshot *' info= 'the list of snapshots or None in case of error' />
</function>
2010-05-19 13:02:30 +00:00
<function name= 'virDomainRevertToSnapshot' file= 'python' >
<info > revert the domain to the given snapshot</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'dummy domain pointer' />
<arg name= 'snap' type= 'virDomainSnapshotPtr' info= 'pointer to the snapshot' />
2011-09-25 01:56:26 +00:00
<arg name= 'flags' type= 'unsigned int' info= 'flags' />
2010-05-19 13:02:30 +00:00
<return type= 'int' info= "0 on success, -1 on error" />
</function>
2011-07-22 05:43:53 +00:00
<function name= 'virDomainGetBlockJobInfo' file= 'python' >
<info > Get progress information for a block job</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<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.' />
<return type= 'virDomainBlockJobInfo' info= 'A dictionary containing job information.' />
</function>
2011-08-26 18:10:21 +00:00
<function name= 'virDomainMigrateGetMaxSpeed' file= 'python' >
<info > Get currently configured maximum migration speed for a domain</info>
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'flags' type= 'unsigned int' info= 'flags, currently unused, pass 0.' />
<return type= 'unsigned long' info= 'current max migration speed, or None in case of error' />
</function>
2011-11-15 09:02:49 +00:00
<function name= 'virDomainSetBlockIoTune' file= 'python' >
<info > Change the I/O tunables for a block device</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<arg name= 'disk' type= 'const char *' info= 'disk name' />
<arg name= 'params' type= 'virTypedParameterPtr' info= 'Pointer to blkio tuning params object' />
<arg name= 'flags' type= 'unsigned int' info= 'an OR'ed set of virDomainModificationImpact' />
<return type= 'int' info= '0 in case of success, -1 in case of failure' />
</function>
<function name= 'virDomainGetBlockIoTune' file= 'python' >
<info > Get the I/O tunables for a block device</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<arg name= 'disk' type= 'const char *' info= 'disk name' />
<arg name= 'flags' type= 'unsigned int' info= 'an OR'ed set of virDomainModificationImpact' />
2012-02-10 10:17:26 +00:00
<return type= 'str *' info= 'the I/O tunables value or None in case of error' />
2011-11-15 09:02:49 +00:00
</function>
2011-12-15 13:01:33 +00:00
<function name= 'virDomainBlockPeek' file= 'python' >
<info > Read the contents of domain's disk device</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<arg name= 'disk' type= 'const char *' info= 'disk name' />
<arg name= 'offset' type= 'unsigned long long' info= 'offset within block device' />
<arg name= 'size' type= 'size_t' info= 'size to read' />
<arg name= 'flags' type= 'unsigned int' info= 'unused, always pass 0' />
<return type= 'char *' info= 'the returned buffer or None in case of error' />
</function>
<function name= 'virDomainMemoryPeek' file= 'python' >
<info > Read the contents of domain's memory</info>
<arg name= 'dom' type= 'virDomainPtr' info= 'pointer to the domain' />
<arg name= 'start' type= 'unsigned long long' info= 'start of memory to peek' />
<arg name= 'size' type= 'size_t' info= 'size of memory to peek' />
<arg name= 'flags' type= 'unsigned int' info= 'an OR'ed set of virDomainMemoryFlags' />
<return type= 'char *' info= 'the returned buffer or None in case of error' />
</function>
2012-01-31 06:34:51 +00:00
<function name= 'virDomainGetDiskErrors' file= 'python' >
<info > Extract errors on disk devices.</info>
<return type= 'virDomainDiskErrorPtr' info= 'dictionary of disks and their errors or None in case of error' />
<arg name= 'domain' type= 'virDomainPtr' info= 'a domain object' />
<arg name= 'flags' type= 'unsigned int' info= 'unused, always pass 0' />
</function>
2006-01-31 10:24:12 +00:00
</symbols>
2005-12-19 16:34:11 +00:00
</api>