[Libvirt-cim] [PATCH] [TEST] Call destroy_netpool() to remove the created netpool in tc

yunguol at cn.ibm.com yunguol at cn.ibm.com
Wed Jul 30 07:12:53 UTC 2008


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1217401967 25200
# Node ID 484734992819e58369974ac579a6c39c1bcd0cfa
# Parent  2efc46fd30f33e06c20ca8c771abed65725a3fdb
[TEST] Call destroy_netpool() to remove the created netpool in tc

Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>

diff -r 2efc46fd30f3 -r 484734992819 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py	Wed Jul 23 17:42:47 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py	Wed Jul 30 00:12:47 2008 -0700
@@ -33,7 +33,7 @@
 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 @@
             break
 
     cleanup_restore(options.ip, options.virt)
+    destroy_netpool(options.ip, options.virt, test_network)
     vsxml.undefine(options.ip)
     return status 
         
diff -r 2efc46fd30f3 -r 484734992819 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py	Wed Jul 23 17:42:47 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py	Wed Jul 30 00:12:47 2008 -0700
@@ -34,7 +34,7 @@
 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 @@
             return status
 
     cleanup_restore(server, virt)
+    destroy_netpool(server, virt, test_network)
     vsxml.undefine(server)    
     return status
 
diff -r 2efc46fd30f3 -r 484734992819 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py	Wed Jul 23 17:42:47 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py	Wed Jul 30 00:12:47 2008 -0700
@@ -63,7 +63,7 @@
 CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS
 from XenKvmLib.classes import get_typed_class
 from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \
-create_netpool_conf
+create_netpool_conf, destroy_netpool
 from XenKvmLib.common_util import print_field_error
 
 platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -148,9 +148,9 @@
     
     except Exception, detail:
         logger.error("Exception: %s", detail)
-        return FAIL, dpool, npool, mpool, ppool
+        return FAIL, dpool, npool, mpool, ppool, test_network
 
-    return PASS, dpool, npool, mpool, ppool
+    return PASS, dpool, npool, mpool, ppool, test_network
 
 def verify_rasd_fields(loop, assoc_info, cllist, rtype, rangelist):
     for inst in assoc_info:
@@ -200,7 +200,7 @@
     server = options.ip
     virt = options.virt
 
-    status, dpool, npool, mpool, ppool = get_pool_details(virt, server)
+    status, dpool, npool, mpool, ppool, test_network = get_pool_details(virt, server)
     if status != PASS or dpool.InstanceID == None or mpool.InstanceID == None \
        or npool.InstanceID == None or ppool.InstanceID == None:
         cleanup_restore(server, virt)
@@ -208,6 +208,7 @@
 
     status = verify_sdc_with_ac(virt, server, dpool, npool, mpool, ppool)
     cleanup_restore(server, virt)
+    destroy_netpool(server, virt, test_network)
     return status
     
 if __name__ == "__main__":




More information about the Libvirt-cim mailing list