# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1268952745 25200
# Node ID f3604141cbff1e1ccc2ec97d5594c5d54f965516
# Parent 3655b03ada11d9e99a1d10b97aaa7cdb737fc493
[TEST] #3 Add check to verify StorageVolume InstanceID.
Updates:
Moved InstanceID check immediately after call to CreateResourceInPool.
Added exception on failure.
This test verifies that the InstanceID of StorageVolume is not dependent on the pool path
in RASD. Rather it is set by virStorageVolGetPath.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 3655b03ada11 -r f3604141cbff
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Thu
Jan 28 14:00:59 2010 -0800
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Thu
Mar 18 15:52:25 2010 -0700
@@ -231,6 +231,11 @@
if res[0] != PASS:
raise Exception("Failed to create the Vol %s" % vol_name)
+ if res[1]['Resource']['InstanceID'] != exp_vol_path:
+ raise Exception("Incorrect InstanceID")
+ else:
+ status = PASS
+
found = verify_vol(server, virt, pool_name, exp_vol_path, found)
stovol_status = verify_template_rasd_exists(virt, server,
dp_inst_id,
@@ -239,7 +244,8 @@
ret = cleanup_pool_vol(server, virt, pool_name,
clean_pool, exp_vol_path)
if res[0] == PASS and found == 1 and \
- ret == PASS and stovol_status == PASS:
+ ret == PASS and stovol_status == PASS and \
+ status == PASS:
status = PASS
else:
return FAIL