[libvirt] [PATCH 0/2] Expose virNodeGetCPUStats and virNodeGetMemoryStats in python

Peter Krempa pkrempa at redhat.com
Mon Nov 28 17:19:26 UTC 2011


These patches add two API functions to the libvirt python bindings, that
were missing.

The constants denoting a summary stat value instead of a separate per-node
values was declared using a preprocessor macro:
...
#define VIR_NODE_MEMORY_STATS_ALL_CELLS (-1)
#define VIR_NODE_CPU_STATS_ALL_CPUS (-1)
...
This inhibits automatic generation of these constants in the automaticaly
generated python library code.

If this change is too controversial, there's another option: Including these
constants in the python library (using libvirt-override.py). Please let me know
which of those options you prefer.

Thanks

Peter

Peter Krempa (2):
  python: Expose binding for virNodeGetCPUStats()
  python: Expose binding for virNodeGetMemoryStats()

 include/libvirt/libvirt.h.in    |   12 +++--
        - change macro definitions to enums

 python/libvirt-override-api.xml |   14 ++++++
        - add doc's about newly added functions

 python/libvirt-override.c       |   95 +++++++++++++++++++++++++++++++++++++++
        - add code for calling those functions and reclaiming return values.

 3 files changed, 117 insertions(+), 4 deletions(-)

-- 
1.7.3.4




More information about the libvir-list mailing list