This is returning a char *
<capabilities>
<host>
<cpu>
<model>xxx</model>
</cpu>
</host>
</capabilities>
while the next patch exposes the model from the /domain/cpu/model node
as an actual object, why the difference?
Christophe
On Fri, Jul 04, 2014 at 02:51:26PM +0100, Zeeshan Ali (Khattak) wrote:
Add a method to get the model of the CPU from capabilities.
---
libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c | 6 ++++++
libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h | 2 ++
libvirt-gconfig/libvirt-gconfig.sym | 2 ++
3 files changed, 10 insertions(+)
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
index f4753ff..255c4d7 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.c
@@ -60,6 +60,12 @@ gvir_config_capabilities_cpu_get_arch(GVirConfigCapabilitiesCpu *cpu)
return gvir_config_object_get_node_content(GVIR_CONFIG_OBJECT(cpu),
"arch");
}
+const gchar *
+gvir_config_capabilities_cpu_get_model(GVirConfigCapabilitiesCpu *cpu)
+{
+ return gvir_config_object_get_node_content(GVIR_CONFIG_OBJECT(cpu),
"model");
+}
+
/**
* gvir_config_capabilities_cpu_add_feature:
*
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
index ce3613f..c6c152f 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu.h
@@ -66,6 +66,8 @@ GType gvir_config_capabilities_cpu_get_type(void);
const gchar *
gvir_config_capabilities_cpu_get_arch(GVirConfigCapabilitiesCpu *cpu);
+const gchar *
+gvir_config_capabilities_cpu_get_model(GVirConfigCapabilitiesCpu *cpu);
void gvir_config_capabilities_cpu_add_feature(GVirConfigCapabilitiesCpu *cpu,
GVirConfigCapabilitiesCpuFeature
*feature);
GList *
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index 0d33fdb..86dada6 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -689,6 +689,8 @@ global:
LIBVIRT_GCONFIG_0.1.9 {
global:
+ gvir_config_capabilities_cpu_get_model;
+
gvir_config_capabilities_host_get_secmodels;
gvir_config_capabilities_host_secmodel_get_doi;
--
1.9.3
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list