
Deepti B. Kalakeri wrote:
# HG changeset patch # User Deepti B.Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1247831194 25200 # Node ID d78ebff2b762c75fec14de6bb4a012146ec4b86b # Parent 14b666e2a803048c1ce4e71b550a49c62915b3a3 [TEST] Fixed the RASD/07_parent_disk_pool.py
Verified with KVM and current sources on F10 and SLES11. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com>
diff -r 14b666e2a803 -r d78ebff2b762 suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py --- a/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Thu Jul 16 07:28:51 2009 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Fri Jul 17 04:46:34 2009 -0700 @@ -51,7 +51,7 @@ from XenKvmLib.pool import get_pool_rasds
sup_types = ['KVM', 'Xen', 'XenFV'] -DISKPOOL_REC_LEN = 3 +DISKPOOL_REC_LEN = 7
def get_rec(diskpool_rasd, inst_id='Default'): recs = [] @@ -72,14 +72,21 @@ inst_list = [ 'Default', 'Minimum', 'Maximum', 'Increment' ] n_rec_val = { 'ResourceType' : 17, 'PoolID' : "DiskPool/0", - 'Path' : "/dev/null", } - exp_type_path_host_dir = [('1', 'None', 'None', 'None'), - ('2', '/dev/sda100', 'None', 'None'), - ('3', 'None', 'host_sys.domain.com', - '/var/lib/images')] - - + + pval = "/dev/null" + exp_t_dp_h_sdir_path = sorted([(1L, None, None, None, pval), + (2L, [u'/dev/sda100'], None, None, pval), + (3L, None, u'host_sys.domain.com', + u'/var/lib/images', pval), + (4L, [u'/dev/VolGroup00/LogVol100'], + None, None, pval), + (5L, [u'iscsi-target'], + u'host_sys.domain.com', None, pval), + (6L, None, None, None, pval), + (7L, None, None, None, + "/dev/disk/by-id")])
This seems confusing here. I'm not sure what the various values mean just by looking at the structure. I can tell the first value is the type, the remaining order is confusing. I think this would be better as a dictionary (or some other Python structure) that allows you to give names to the different positions. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com