# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1210084905 25200
# Node ID 618967ffe41001ad705b2babfd972a0ab1aedaf8
# Parent 9116b5e9f5305739202e10c7a3f8b155fa9540a2
[TEST] Modifying common_util.py to use appropriate diskpool conf file.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 9116b5e9f530 -r 618967ffe410 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue May 06 02:49:02 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue May 06 07:41:45 2008 -0700
@@ -32,9 +32,16 @@ from XenKvmLib.classes import get_typed_
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+from XenKvmLib.const import CIM_REV
test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
+libvirtcim_rev = 558
+
+if CIM_REV < libvirtcim_rev:
+ disk_file = '/tmp/diskpool.conf'
+else:
+ disk_file = '/etc/libvirt/diskpool.conf'
+
back_disk_file = disk_file + "." + "backup"
def print_field_error(fieldname, ret_value, exp_value):
@@ -245,6 +252,7 @@ def conf_file():
Creating diskpool.conf file.
"""
status = PASS
+ logger.info("Disk conf file : %s", disk_file)
try:
f = open(disk_file, 'w')
f.write('%s %s' % (test_dpath, '/'))