# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1217473313 25200
# Node ID 66f3ea74ac3d93f77ca3ca81eee75d080f27d558
# Parent fc92abb3ae7cab32dec6718412be1c0d88874a4a
[TEST] Fix the create_diskpool_conf() function to creates a new netpool as the default
Also, update ResourceAllocationFromPool.01 & 02 to cleanup the netpool
when the test are done.
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r fc92abb3ae7c -r 66f3ea74ac3d
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Jul 30
06:55:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Jul 30
20:01:53 2008 -0700
@@ -33,7 +33,7 @@ from CimTest.Globals import logger, do_m
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \
-create_netpool_conf
+create_netpool_conf, destroy_netpool
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -152,6 +152,7 @@ def main():
break
cleanup_restore(options.ip, options.virt)
+ destroy_netpool(options.ip, options.virt, test_network)
vsxml.undefine(options.ip)
return status
diff -r fc92abb3ae7c -r 66f3ea74ac3d
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Jul 30
06:55:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Jul 30
20:01:53 2008 -0700
@@ -34,7 +34,7 @@ from CimTest.ReturnCodes import PASS, FA
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib import enumclass
from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \
-create_netpool_conf
+create_netpool_conf, destroy_netpool
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -184,6 +184,7 @@ def main():
return status
cleanup_restore(server, virt)
+ destroy_netpool(server, virt, test_network)
vsxml.undefine(server)
return status
diff -r fc92abb3ae7c -r 66f3ea74ac3d suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Jul 30 06:55:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Jul 30 20:01:53 2008 -0700
@@ -360,7 +360,7 @@ def create_diskpool_conf(server, virt):
return status, diskid
-def create_netpool_conf(server, virt, use_existing=True):
+def create_netpool_conf(server, virt, use_existing=False):
status = PASS
test_network = None
try: