[Libvirt-cim] [PATCH] [TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD

yunguol at cn.ibm.com yunguol at cn.ibm.com
Thu Mar 19 07:22:33 UTC 2009


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1237447329 25200
# Node ID 9f70dfab7a1e354ec6cfdc14d4f80f1a79cfdb41
# Parent  a06ef66126e2c8636f0b2ae0d978d38192471e9d
[TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD


Tested for Xen, XenFV, KVM with current sources and rpm
Signed-off-by: Guolian Yun<yunguol at cn.ibm.com>

diff -r a06ef66126e2 -r 9f70dfab7a1e suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py	Wed Mar 18 06:38:30 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py	Thu Mar 19 00:22:09 2009 -0700
@@ -36,11 +36,13 @@
 from XenKvmLib.classes import get_typed_class, inst_to_mof
 from XenKvmLib.rasd import get_default_rasds
 from XenKvmLib.const import do_main, _image_dir, f9_changeset, \
-                            KVM_default_disk_dev, get_provider_version
+Xen_default_disk_dev, XenFV_default_disk_dev, \
+KVM_default_disk_dev, get_provider_version
 from XenKvmLib.vxml import get_class
 from XenKvmLib.common_util import parse_instance_id
 from XenKvmLib.enumclass import EnumInstances
 
+libvirt_cim_dasd_caption = 707
 sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
 test_dom = 'rstest_disk_domain'
 
@@ -66,9 +68,12 @@
 
     for rasd in rasds:
         if rasd.classname == drasd_cn:
-            if disk_type != "" and rasd['Caption'] != disk_type:
+            curr_cim_rev, changeset = get_provider_version(virt, ip)
+            if disk_type != "" and rasd['Caption'] != disk_type and \
+               curr_cim_rev >= libvirt_cim_dasd_caption:
                 continue
             rasd['Address'] = addr
+            rasd['VirtualDevice'] = virt + '_default_disk_dev'
             curr_cim_rev, changeset = get_provider_version(virt, ip)
             if changeset == f9_changeset and virt == 'KVM':
                     rasd['VirtualDevice'] = KVM_default_disk_dev




More information about the Libvirt-cim mailing list