# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1249366441 25200
# Node ID a95d4b521cf64765ef1f441d9cdb0f82fd6c37b2
# Parent c1d8168e6ff0a7883fac582d19af5e68ad979bbc
[TEST] Modifying rasd.py lib to support StorageVolRASD.
Tested with KVM on F10 and current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r c1d8168e6ff0 -r a95d4b521cf6 suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Thu Jul 30 22:40:39 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Aug 03 23:14:01 2009 -0700
@@ -47,6 +47,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 +321,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 +355,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):