[Libvirt-cim] [PATCH] Add a user-friendly Caption field to DiskPool for display purposes

Dan Smith danms at us.ibm.com
Wed Apr 16 18:08:20 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1208369293 25200
# Node ID f7e2c322ac0ab1d109192a362d508ca4a2a87310
# Parent  5c4ec6bc6f409e9a892f786cc7b7d32152fdc5a6
Add a user-friendly Caption field to DiskPool for display purposes

for now, just make the Caption the tag field, which is the pool name
if using libvirt's storage API, otherwise the tag in the pool config file.

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 5c4ec6bc6f40 -r f7e2c322ac0a src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c	Wed Apr 16 08:28:12 2008 -0700
+++ b/src/Virt_DevicePool.c	Wed Apr 16 11:08:13 2008 -0700
@@ -786,6 +786,9 @@ static CMPIInstance *diskpool_from_path(
         CMSetProperty(inst, "AllocationUnits",
                       (CMPIValue *)"Megabytes", CMPI_chars);
 
+        CMSetProperty(inst, "Caption",
+                      (CMPIValue *)pool->tag, CMPI_chars);
+
         if (!diskpool_set_capacity(conn, inst, pool))
                 CU_DEBUG("Failed to set capacity for disk pool: %s",
                          pool->tag);




More information about the Libvirt-cim mailing list