
On 20.6.2014 09:14, Michal Privoznik wrote:
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> --- generator.py | 1 + libvirt-override-api.xml | 9 ++++ libvirt-override.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+)
ACK Pavel