# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1224011460 25200
# Node ID b9a93806b73aaaccef8ade2cc43170e77fe01755
# Parent 7848509a32e4c2d01165877085d9929e7313d33e
Expose LXC_ProcRASD so that the scheduling parameters are visible
Also make ProcRASD not set the VirtualQuantity field if it's zero,
so that LXC_ProcRASD's value appears undefined instead of 0.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 7848509a32e4 -r b9a93806b73a schema/ResourceAllocationSettingData.registration
--- a/schema/ResourceAllocationSettingData.registration Tue Oct 14 12:10:59 2008 -0700
+++ b/schema/ResourceAllocationSettingData.registration Tue Oct 14 12:11:00 2008 -0700
@@ -10,3 +10,4 @@
KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
diff -r 7848509a32e4 -r b9a93806b73a src/Virt_RASD.c
--- a/src/Virt_RASD.c Tue Oct 14 12:10:59 2008 -0700
+++ b/src/Virt_RASD.c Tue Oct 14 12:11:00 2008 -0700
@@ -306,8 +306,13 @@
CMSetProperty(inst, "Limit",
(CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64);
} else if (dev->type == CIM_RES_TYPE_PROC) {
- CMSetProperty(inst, "VirtualQuantity",
- (CMPIValue *)&dev->dev.vcpu.quantity, CMPI_uint64);
+ if (dev->dev.vcpu.quantity > 0) {
+ CMSetProperty(inst,
+ "VirtualQuantity",
+ (CMPIValue *)&dev->dev.vcpu.quantity,
+ CMPI_uint64);
+ }
+
set_proc_rasd_params(broker, ref, host, inst);
}