summaryrefslogtreecommitdiff
path: root/libvirt-override-api.xml
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2014-06-20 09:08:39 +0200
committerMichal Privoznik <mprivozn@redhat.com>2014-06-20 09:08:39 +0200
commitc8ba859bc78f5e3b0ed2590f4e8a7fa6c26ac08f (patch)
tree8511bef07ac931420b570ba7e1d093f917df2bea /libvirt-override-api.xml
parent98a1ae0f1f6156343fa87fce01db2c5838700920 (diff)
downloadlibvirt-python-c8ba859bc78f5e3b0ed2590f4e8a7fa6c26ac08f.tar.gz
Implement new virNodeGetFreePages API
The API expose information on host's free pages counts. For easier access, in python this API returns a dictionary such as: In [4]: conn.getFreePages([2048,1*1024*1024], -1, 5) Out[4]: {-1: {2048: 114, 1048576: 4}, 0: {2048: 3, 1048576: 1}, 1: {2048: 100, 1048576: 1}, 2: {2048: 10, 1048576: 1}, 3: {2048: 1, 1048576: 1}} At the top level of the returned dictionary there's a pair of <NUMA node> and another dictionary that contains detailed information on each supported page size. The information then consists of fairs of <page size> and <count of free pages>. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'libvirt-override-api.xml')
-rw-r--r--libvirt-override-api.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml
index 935e04d..bbf0ab1 100644
--- a/libvirt-override-api.xml
+++ b/libvirt-override-api.xml
@@ -624,5 +624,14 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='int' info='unused, pass 0'/>
</function>
+ <function name="virNodeGetFreePages" file='python'>
+ <info>Returns the number of available pages for a list of cells and page sizes</info>
+ <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
+ <arg name='pages' type='char *' info='list of desired page sizes'/>
+ <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='flags' type='int' info='unused, pass 0'/>
+ <return type='char *' info='the list available memory in the cells'/>
+ </function>
</symbols>
</api>