[Libvirt-cim] [PATCH 2 of 4] [TEST] 06 - Remove cleanup_guest_netpool() def and call it from vsmigration.py

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri May 29 21:19:58 UTC 2009


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1242946256 25200
# Node ID fdb53fac065cd041292fbc9b6dc0dcd712b99b0b
# Parent  42a5cacd8bb2b96c2a9075d331da0c567661976d
[TEST] 06 - Remove cleanup_guest_netpool() def and call it from vsmigration.py

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 42a5cacd8bb2 -r fdb53fac065c suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py	Thu May 21 15:50:56 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py	Thu May 21 15:50:56 2009 -0700
@@ -35,9 +35,9 @@
 from XenKvmLib.const import do_main, default_network_name
 from CimTest.ReturnCodes import PASS, FAIL, SKIP
 from XenKvmLib.classes import get_typed_class
-from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate
-from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\
-                                  destroy_netpool
+from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate, \
+                                   cleanup_guest_netpool
+from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf
 
 sup_types = ['KVM', 'Xen']
 
@@ -67,45 +67,6 @@
 
     return PASS, cxml
 
-def cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname):
-    # Clean the domain on target machine.
-    # This is req when migration is successful, also when migration is not
-    # completely successful VM might be created on the target machine 
-    # and hence need to clean.
-    target_list = domain_list(t_sysname, virt)
-    if target_list  != None and test_dom in target_list:
-        ret_value = cxml.destroy(t_sysname)
-        if not ret_value:
-            logger.info("Failed to destroy the migrated domain '%s' on '%s'",
-                         test_dom, t_sysname)
-
-        ret_value = cxml.undefine(t_sysname)
-        if not ret_value:
-            logger.info("Failed to undefine the migrated domain '%s' on '%s'",
-                         test_dom, t_sysname)
-
-    # clean the networkpool created on the remote machine
-    target_net_list = net_list(t_sysname, virt)
-    if target_net_list != None and default_network_name in target_net_list:
-        ret_value = destroy_netpool(t_sysname, virt, default_network_name)
-        if ret_value != PASS:
-            logger.info("Unable to destroy networkpool '%s' on '%s'",
-                         default_network_name, t_sysname)
-
-    # Remote Migration not Successful, clean the domain on src machine
-    src_list = domain_list(s_sysname, virt)
-    if src_list != None and test_dom in src_list:
-        ret_value = cxml.cim_destroy(s_sysname)
-        if not ret_value:
-            logger.info("Failed to destroy the domain '%s' on the source '%s'",
-                         test_dom, s_sysname)
-
-        ret_value = cxml.undefine(s_sysname)
-        if not ret_value:
-            logger.info("Failed to undefine the domain '%s' on source '%s'",
-                         test_dom, s_sysname)
-
-
 @do_main(sup_types)
 def main():
     options = main.options




More information about the Libvirt-cim mailing list