
# HG changeset patch # User Deepti B.Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1249463264 25200 # Node ID 4ab4184ab2998f32f5cd369fd39fed01917ba5e1 # Parent cb9ab2702c7b693c334bc6709fd71833e7fa843f [TEST] #2 Modifying rasd.py and vsms.py lib to support StorageVolRASD. patch 2: -------- 1) Added the RType constant in the vsms.py 2) Added diskpoolrasd, netpoolrasd, storagevolrasd cn in rasd.py Tested with KVM on F10 and current sources. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r cb9ab2702c7b -r 4ab4184ab299 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Tue Aug 04 05:20:41 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Aug 05 02:07:44 2009 -0700 @@ -40,6 +40,11 @@ masd_cn = 'MemResourceAllocationSettingData' dcrasd_cn = 'GraphicsResourceAllocationSettingData' irasd_cn = 'InputResourceAllocationSettingData' +dpasd_cn = 'DiskPoolResourceAllocationSettingData' +npasd_cn = 'NetPoolResourceAllocationSettingData' +svrasd_cn = 'StorageVolumeResourceAllocationSettingData' + + proccn = 'Processor' memcn = 'Memory' netcn = 'NetworkPort' @@ -47,6 +52,8 @@ dccn = 'DisplayController' pdcn = 'PointingDevice' +libvirt_rasd_storagepool_changes = 934 + def rasd_init_list(vsxml, virt, t_disk, t_dom, t_mac, t_mem, server): """ Creating the lists that will be used for comparisons. @@ -319,6 +326,8 @@ exp_base_num = 4 exp_cdrom = 4 + # StoragePoolRASD record 1 for each of Min, Max, Default, and Incr + exp_storagevol_rasd = 4 exp_len = exp_base_num if id == "DiskPool/0": @@ -351,6 +360,9 @@ volumes = enum_volumes(virt, ip, id[1]) exp_len = (volumes * exp_base_num) + exp_cdrom + if rev >= libvirt_rasd_storagepool_changes and virt != 'LXC': + exp_len += exp_storagevol_rasd + return exp_len def get_exp_net_rasd_len(virt, rev, id): diff -r cb9ab2702c7b -r 4ab4184ab299 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Aug 04 05:20:41 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Aug 05 02:07:44 2009 -0700 @@ -35,6 +35,7 @@ RASD_TYPE_DISK = 17 RASD_TYPE_GRAPHICS = 24 RASD_TYPE_INPUT = 13 +RASD_TYPE_STOREVOL = 32768 VSSD_RECOVERY_NONE = 2 VSSD_RECOVERY_RESTART = 3