[Libvirt-cim] [PATCH 4 of 4] [TEST] Modifying RPCS/04_CreateChildResourcePool.py and RPCS/07_DeleteChildResourcePool.py

Deepti B. Kalakeri deeptik at linux.vnet.ibm.com
Tue May 26 07:12:39 UTC 2009


# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1243321835 25200
# Node ID b417a41ea09985ad7aaabc642496c86e25c5d404
# Parent  d79401609c9ce45ef70e6f5ddea3f81c10b21b33
[TEST] Modifying RPCS/04_CreateChildResourcePool.py and RPCS/07_DeleteChildResourcePool.py

Modifying RPCS/04_CreateChildResourcePool.py and RPCS/07_DeleteChildResourcePool.py to align with
the changes to create_pool() and verify_pool() changes of pool.py.

Tested with KVM on F10 with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>

diff -r d79401609c9c -r b417a41ea099 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py	Tue May 26 00:06:28 2009 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py	Tue May 26 00:10:35 2009 -0700
@@ -54,7 +54,7 @@
 from XenKvmLib.const import do_main, platform_sup
 from XenKvmLib.classes import get_typed_class
 from XenKvmLib.common_util import destroy_netpool
-from XenKvmLib.pool import create_netpool, verify_pool, undefine_netpool
+from XenKvmLib.pool import create_pool, verify_pool, undefine_netpool
 
 test_pool = "testpool"
 
@@ -77,13 +77,13 @@
                  "IPRangeEnd"   : range_addr_end
                 }
     for item in range(0, 3):    
-        status = create_netpool(options.ip, options.virt, 
-                                test_pool, pool_attr, mode_type=item)
+        status = create_pool(options.ip, options.virt, 
+                             test_pool, pool_attr, mode_type=item)
         if status != PASS:
             logger.error("Error in networkpool creation")
             return FAIL
 
-        status = verify_pool(options.ip, options.virt, np,
+        status = verify_pool(options.ip, options.virt,
                              test_pool, pool_attr, mode_type=item)
         if status != PASS:
             logger.error("Error in networkpool verification")
diff -r d79401609c9c -r b417a41ea099 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py	Tue May 26 00:06:28 2009 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py	Tue May 26 00:10:35 2009 -0700
@@ -52,7 +52,7 @@
 from XenKvmLib.enumclass import EnumInstances, EnumNames
 from XenKvmLib.classes import get_typed_class
 from XenKvmLib.common_util import destroy_netpool
-from XenKvmLib.pool import create_netpool, verify_pool
+from XenKvmLib.pool import create_pool, verify_pool
 
 cim_errno  = pywbem.CIM_ERR_NOT_SUPPORTED
 cim_mname  = "DeleteResourcePool"
@@ -71,7 +71,8 @@
             rpcs_conn.DeleteResourcePool()
         except pywbem.CIMError, (err_no, desc):
             if err_no == cim_errno :
-                logger.info("Got expected exception for '%s' service", cim_mname)
+                logger.info("Got expected exception for '%s' service",
+                            cim_mname)
                 logger.info("Errno is '%s' ", err_no)
                 logger.info("Error string is '%s'", desc)
                 return PASS
@@ -87,21 +88,23 @@
                      "IPRangeEnd"   : "192.168.0.15",
                      "ForwardMode" : "nat"
                     }
-        np = get_typed_class(options.virt, 'NetworkPool')
-        np_id = "NetworkPool/%s" % test_pool
 
-        status = create_netpool(options.ip, options.virt, test_pool, pool_attr)
+        status = create_pool(options.ip, options.virt, 
+                             test_pool, pool_attr)
         if status != PASS:
             logger.error("Error in networkpool creation")
             return FAIL
         
-        status = verify_pool(options.ip, options.virt, np, 
+        status = verify_pool(options.ip, options.virt,  
                              test_pool, pool_attr)
+
         if status != PASS:
             logger.error("Error in networkpool verification")
             destroy_netpool(options.ip, options.virt, test_pool)
             return FAIL
 
+        np = get_typed_class(options.virt, 'NetworkPool')
+        np_id = "NetworkPool/%s" % test_pool
         netpool = EnumNames(options.ip, np)
         for i in range(0, len(netpool)):
             ret_pool = netpool[i].keybindings['InstanceID']




More information about the Libvirt-cim mailing list