# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1225839014 28800
# Node ID d515ef760ebf138762284a29f149db2895eec94b
# Parent 25e6376dbc3ef5df451bd754a9e3a7386c5df59d
Add support for input devices to Virt_RASD.c
There isn't much to the input device, so the only attributes that get set are
the ResourceType and the InstanceID.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 25e6376dbc3e -r d515ef760ebf schema/ResourceAllocationSettingData.mof
--- a/schema/ResourceAllocationSettingData.mof Sat Nov 08 16:44:35 2008 -0800
+++ b/schema/ResourceAllocationSettingData.mof Tue Nov 04 14:50:14 2008 -0800
@@ -145,3 +145,24 @@
{
};
+[Description ("Xen virtual input device"),
+ Provider("cmpi::Virt_RASD")
+]
+class Xen_InputResourceAllocationSettingData : Xen_ResourceAllocationSettingData
+{
+};
+
+[Description ("KVM virtual input device"),
+ Provider("cmpi::Virt_RASD")
+]
+class KVM_InputResourceAllocationSettingData : KVM_ResourceAllocationSettingData
+{
+};
+
+[Description ("LXC virtual input device"),
+ Provider("cmpi::Virt_RASD")
+]
+class LXC_InputResourceAllocationSettingData : LXC_ResourceAllocationSettingData
+{
+};
+
diff -r 25e6376dbc3e -r d515ef760ebf schema/ResourceAllocationSettingData.registration
--- a/schema/ResourceAllocationSettingData.registration Sat Nov 08 16:44:35 2008 -0800
+++ b/schema/ResourceAllocationSettingData.registration Tue Nov 04 14:50:14 2008 -0800
@@ -5,12 +5,15 @@
Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
Xen_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+Xen_InputResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+KVM_InputResourceAllocationSettingData 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
LXC_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+LXC_InputResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
diff -r 25e6376dbc3e -r d515ef760ebf src/Virt_RASD.c
--- a/src/Virt_RASD.c Sat Nov 08 16:44:35 2008 -0800
+++ b/src/Virt_RASD.c Tue Nov 04 14:50:14 2008 -0800
@@ -313,6 +313,9 @@
} else if (dev->type == CIM_RES_TYPE_GRAPHICS) {
type = CIM_RES_TYPE_GRAPHICS;
base = "GraphicsResourceAllocationSettingData";
+ } else if (dev->type == CIM_RES_TYPE_INPUT) {
+ type = CIM_RES_TYPE_INPUT;
+ base = "InputResourceAllocationSettingData";
} else {
return NULL;
}
@@ -486,6 +489,8 @@
*type = CIM_RES_TYPE_MEM;
else if (STREQ(base, "GraphicsResourceAllocationSettingData"))
*type = CIM_RES_TYPE_GRAPHICS;
+ else if (STREQ(base, "InputResourceAllocationSettingData"))
+ *type = CIM_RES_TYPE_INPUT;
else
goto out;
@@ -516,6 +521,9 @@
break;
case CIM_RES_TYPE_GRAPHICS:
*classname = "GraphicsResourceAllocationSettingData";
+ break;
+ case CIM_RES_TYPE_INPUT:
+ *classname = "InputResourceAllocationSettingData";
break;
default:
rc = CMPI_RC_ERR_FAILED;