# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1243504212 25200
# Node ID 8eda9601bbace5fe53e4df54d6528d4fd3edf809
# Parent ff0fb8fca1512987cb6a8210e7a3e95396dfa0a9
[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.
diff -r ff0fb8fca151 -r 8eda9601bbac
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu
May 28 02:38:21 2009 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu
May 28 02:50:12 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"
@@ -76,15 +76,17 @@
"IPRangeStart" : range_addr_start,
"IPRangeEnd" : range_addr_end
}
- for item in range(0, 3):
- status = create_netpool(options.ip, options.virt,
- test_pool, pool_attr, mode_type=item)
+ net_type = ["isolated", "nat", "route"]
+ for item in range(0, len(net_type)):
+ logger.info("Creating '%s' type network", net_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 status
- status = verify_pool(options.ip, options.virt, np,
- test_pool, pool_attr, mode_type=item)
+ status = verify_pool(options.ip, options.virt,
+ test_pool, pool_attr, mode_type=item)
if status != PASS:
logger.error("Error in networkpool verification")
destroy_netpool(options.ip, options.virt, test_pool)
diff -r ff0fb8fca151 -r 8eda9601bbac
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu
May 28 02:38:21 2009 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu
May 28 02:50:12 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,22 @@
"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 status
- status = verify_pool(options.ip, options.virt, np,
- test_pool, pool_attr)
+ 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 status
+ 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']