This series adds a new API "virConnectGetCPUModelNames" that allows to
retrieve the list of CPU models known by the hypervisor for a specific
architecture.
This new function is mainly needed by virt-manager to not read
directly the cpu_map.xml file (it could also be different when
accessing a remote daemon).
I have amended all the comments reported for v2.
*v3 main changes
- virConnectGetCPUModelNames returns the number of models instead of
0 on success.
- Use VIR_INSERT_ELEMENT instead of VIR_EXPAND_N.
- Fix a potential memory leak in the python bindings.
- Move virsh changes to a separate commit.
- Remove API documentation from libvirt.h.
*v2 main changes
- set a hard limit for the number of CPU models that is possible to
fetch from a remote server.
- Use VIR_EXPAND_N instead of VIR_REALLOC_N.
- s|1.1.2|1.1.3|
Giuseppe Scrivano (7):
libvirt: add new public API virConnectGetCPUModelNames
cpu: add function to get the models for an arch
virConnectGetCPUModelNames: implement the remote protocol
virConnectGetCPUModelNames: add the support for qemu
virConnectGetCPUModelNames: add the support for the test protocol
virsh: add function to get the CPU models for an arch
python: add bindings for virConnectGetCPUModelNames
daemon/remote.c | 43 +++++++++++++++++++++++++++++++
include/libvirt/libvirt.h.in | 4 +++
python/generator.py | 1 +
python/libvirt-override-api.xml | 7 +++++
python/libvirt-override.c | 52 +++++++++++++++++++++++++++++++++++++
python/libvirt-override.py | 11 ++++++++
src/cpu/cpu.c | 56 ++++++++++++++++++++++++++++++++++++++++
src/cpu/cpu.h | 3 +++
src/driver.h | 7 +++++
src/libvirt.c | 46 +++++++++++++++++++++++++++++++++
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 5 ++++
src/qemu/qemu_driver.c | 14 ++++++++++
src/remote/remote_driver.c | 57 +++++++++++++++++++++++++++++++++++++++++
src/remote/remote_protocol.x | 20 ++++++++++++++-
src/remote_protocol-structs | 11 ++++++++
src/test/test_driver.c | 11 ++++++++
tools/virsh-host.c | 54 ++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 5 ++++
19 files changed, 407 insertions(+), 1 deletion(-)
--
1.8.3.1