[Libvirt-cim] [PATCH] [TEST] #2 Add check to verify StorageVolume InstanceID

Sharad Mishra snmishra at us.ibm.com
Wed Mar 17 23:01:44 UTC 2010


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1268864289 25200
# Node ID 2a7a2ab9e729227b40a40d67f6dec9e2555e7bb7
# Parent  3655b03ada11d9e99a1d10b97aaa7cdb737fc493
[TEST] #2 Add check to verify StorageVolume InstanceID.

Updates:
	Moved InstanceID check immediately after call to CreateResourceInPool.

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 at us.ibm.com>

diff -r 3655b03ada11 -r 2a7a2ab9e729 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	Wed Mar 17 15:18:09 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:
+                status = FAIL
+            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




More information about the Libvirt-cim mailing list