# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1257876810 28800
# Node ID b383b1665be8709c1ad0370b57ee8de2cd4083fe
# Parent d4c6c9dc6d583eb3b023c17119a2b2f21c9e648f
[TEST] Fix hard coding of storage pool path in RPCS tests
Instead of hardcoding, the value from const.py should be used. This way,
if the path name is changed in the future, it only needs to be changed in
one place.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r d4c6c9dc6d58 -r b383b1665be8
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Tue
Nov 10 09:08:06 2009 -0800
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Tue
Nov 10 10:13:30 2009 -0800
@@ -32,7 +32,7 @@
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from XenKvmLib.const import do_main, platform_sup, default_pool_name, \
- get_provider_version
+ get_provider_version, _image_dir
from XenKvmLib.vsms import RASD_TYPE_STOREVOL
from XenKvmLib.rasd import libvirt_rasd_storagepool_changes
from XenKvmLib import rpcs_service
@@ -43,7 +43,7 @@
from XenKvmLib.common_util import destroy_diskpool
from XenKvmLib.pool import create_pool, undefine_diskpool, DIR_POOL
-pool_attr = { 'Path' : "/tmp" }
+pool_attr = { 'Path' : _image_dir }
vol_name = "cimtest-vol.img"
def get_stovol_rasd_from_sdc(virt, server, dp_inst_id):
diff -r d4c6c9dc6d58 -r b383b1665be8
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/13_delete_storagevolume.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/13_delete_storagevolume.py Tue
Nov 10 09:08:06 2009 -0800
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/13_delete_storagevolume.py Tue
Nov 10 10:13:30 2009 -0800
@@ -31,7 +31,7 @@
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from XenKvmLib.xm_virt_util import virsh_version
from XenKvmLib.const import do_main, platform_sup, get_provider_version, \
- default_pool_name
+ default_pool_name, _image_dir
from XenKvmLib import rpcs_service
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.pool import create_pool, DIR_POOL, \
@@ -39,7 +39,7 @@
get_stovol_default_settings, cleanup_pool_vol,\
get_sto_vol_rasd_for_pool
-pool_attr = { 'Path' : "/tmp" }
+pool_attr = { 'Path' : _image_dir }
vol_name = "cimtest-vol.img"
@do_main(platform_sup)
diff -r d4c6c9dc6d58 -r b383b1665be8
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/14_delete_storagevolume_errs.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/14_delete_storagevolume_errs.py Tue
Nov 10 09:08:06 2009 -0800
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/14_delete_storagevolume_errs.py Tue
Nov 10 10:13:30 2009 -0800
@@ -35,7 +35,7 @@
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from XenKvmLib.xm_virt_util import virsh_version
from XenKvmLib.const import do_main, platform_sup, get_provider_version,\
- default_pool_name
+ default_pool_name, _image_dir
from XenKvmLib import rpcs_service
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.pool import create_pool, DIR_POOL, \
@@ -43,7 +43,7 @@
get_stovol_default_settings, cleanup_pool_vol, \
get_sto_vol_rasd_for_pool
-pool_attr = { 'Path' : "/tmp" }
+pool_attr = { 'Path' : _image_dir }
vol_name = "cimtest-vol.img"
invalid_scen = { "INVALID_ADDRESS" : { 'val' :
'Junkvol_path',
'msg' : 'no storage vol with '\