[libvirt-glib 3/8] Setters for CapabilitiesCpuTopology props

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

---
 .../libvirt-gconfig-capabilities-cpu-topology.c    |   27 ++++++++++++++++++++
 .../libvirt-gconfig-capabilities-cpu-topology.h    |    9 +++++++
 libvirt-gconfig/libvirt-gconfig.sym                |    3 +++
 3 files changed, 39 insertions(+)

diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
index f34a4fe..bd46a0e 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.c
@@ -85,6 +85,15 @@ gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopol
                                                    0);
 }
 
+void
+gvir_config_capabilities_cpu_topology_set_sockets(GVirConfigCapabilitiesCpuTopology *topology,
+                                                  guint64 sockets)
+{
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
+                                               "sockets", G_TYPE_UINT64, sockets,
+                                               NULL);
+}
+
 guint64
 gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopology *topology)
 {
@@ -96,6 +105,15 @@ gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopolog
                                                    0);
 }
 
+void
+gvir_config_capabilities_cpu_topology_set_cores(GVirConfigCapabilitiesCpuTopology *topology,
+                                                guint64 cores)
+{
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
+                                               "cores", G_TYPE_UINT64, cores,
+                                               NULL);
+}
+
 guint64
 gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopology *topology)
 {
@@ -106,3 +124,12 @@ gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopol
                                                    "threads",
                                                    0);
 }
+
+void
+gvir_config_capabilities_cpu_topology_set_threads(GVirConfigCapabilitiesCpuTopology *topology,
+                                                  guint64 threads)
+{
+    gvir_config_object_set_attribute_with_type(GVIR_CONFIG_OBJECT(topology),
+                                               "threads", G_TYPE_UINT64, threads,
+                                               NULL);
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
index b8075a0..c589110 100644
--- a/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
+++ b/libvirt-gconfig/libvirt-gconfig-capabilities-cpu-topology.h
@@ -64,10 +64,19 @@ GVirConfigCapabilitiesCpuTopology *
 gvir_config_capabilities_cpu_topology_new_from_xml(const gchar *xml, GError **error);
 guint64
 gvir_config_capabilities_cpu_topology_get_sockets(GVirConfigCapabilitiesCpuTopology *topology);
+void
+gvir_config_capabilities_cpu_topology_set_sockets(GVirConfigCapabilitiesCpuTopology *topology,
+                                                  guint64 sockets);
 guint64
 gvir_config_capabilities_cpu_topology_get_cores(GVirConfigCapabilitiesCpuTopology *topology);
+void
+gvir_config_capabilities_cpu_topology_set_cores(GVirConfigCapabilitiesCpuTopology *topology,
+                                                guint64 cores);
 guint64
 gvir_config_capabilities_cpu_topology_get_threads(GVirConfigCapabilitiesCpuTopology *topology);
+void
+gvir_config_capabilities_cpu_topology_set_threads(GVirConfigCapabilitiesCpuTopology *topology,
+                                                  guint64 threads);
 
 G_END_DECLS
 
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index c319efc..d412d56 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -400,8 +400,11 @@ LIBVIRT_GCONFIG_0.0.9 {
 
 	gvir_config_capabilities_cpu_topology_get_type;
 	gvir_config_capabilities_cpu_topology_get_cores;
+	gvir_config_capabilities_cpu_topology_set_cores;
 	gvir_config_capabilities_cpu_topology_get_sockets;
+	gvir_config_capabilities_cpu_topology_set_sockets;
 	gvir_config_capabilities_cpu_topology_get_threads;
+	gvir_config_capabilities_cpu_topology_set_threads;
 	gvir_config_capabilities_cpu_topology_new;
 	gvir_config_capabilities_cpu_topology_new_from_xml;
 
-- 
1.7.10.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]