# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1229590303 28800
# Node ID bac8c62509fa9e94ba8983826ed300b4f946b65f
# Parent adfa38df8c3b9600ff08796631c0eae7d3249ffe
[TEST] Fixing 14_define_sys_disk.py tc of VSMS to work with F9 rpm for KVM.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r adfa38df8c3b -r bac8c62509fa
suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue
Dec 16 23:18:31 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu
Dec 18 00:51:43 2008 -0800
@@ -25,12 +25,14 @@
from VirtLib.utils import run_remote
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import do_main, _image_dir
from XenKvmLib.common_util import create_using_definesystem
from XenKvmLib.test_doms import destroy_and_undefine_domain
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.rasd import get_default_rasds
from XenKvmLib.vsms import get_vssd_mof
+from XenKvmLib.const import get_provider_version
+from XenKvmLib.const import do_main, _image_dir, f9_changeset, \
+ KVM_default_disk_dev
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = 'rstest_disk_domain'
@@ -60,6 +62,9 @@
if disk_type != "" and rasd['Caption'] != disk_type:
continue
rasd['Address'] = addr
+ curr_cim_rev, changeset = get_provider_version(virt, ip)
+ if changeset == f9_changeset and virt == 'KVM':
+ rasd['VirtualDevice'] = KVM_default_disk_dev
rasd_list.append(inst_to_mof(rasd))
params = { 'vssd' : vssd,
diff -r adfa38df8c3b -r bac8c62509fa suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Dec 16 23:18:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Dec 18 00:51:43 2008 -0800
@@ -28,6 +28,9 @@
from XenKvmLib.classes import get_typed_class
platform_sup = ["Xen", "KVM", "XenFV"]
+
+#RPM changeset values
+f9_changeset="1fcf330fadf8+"
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
Show replies by date