# HG changeset patch
# User Deepti B. Kalakeri<dkalaker(a)in.ibm.com>
# Date 1219395997 25200
# Node ID f9e7b191ea7c33f5a0f0f63d03bb812f21c5e6e8
# Parent 9685653189eb23d669cd25de192b6cb80308439a
[TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 9685653189eb -r f9e7b191ea7c
suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri
Aug 22 02:00:25 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri
Aug 22 02:06:37 2008 -0700
@@ -68,6 +68,7 @@ def start_guest_get_ref(ip, guest_name,
@do_main(sup_types)
def main():
options = main.options
+ virt = options.virt
status = PASS
rc = -1
@@ -85,14 +86,13 @@ def main():
else:
local_migrate = 0
- status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, options.virt)
+ status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, virt)
if status != PASS:
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
guest_name = cs_ref['Name']
-
status = check_possible_host_migration(service, cs_ref, target_ip)
if status != PASS:
cxml.destroy(options.ip)
@@ -108,9 +108,8 @@ def main():
return status
elif len(ret) == 2:
id = ret[1]['Job'].keybindings['InstanceID']
-
status = check_migration_job(options.ip, id, target_ip,
- guest_name, local_migrate)
+ guest_name, local_migrate, virt)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
diff -r 9685653189eb -r f9e7b191ea7c
suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri
Aug 22 02:00:25 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri
Aug 22 02:06:37 2008 -0700
@@ -29,7 +29,8 @@ from XenKvmLib.common_util import poll_f
from XenKvmLib.common_util import poll_for_state_change
from XenKvmLib import computersystem
from XenKvmLib import vsmigrations
-from XenKvmLib.vsmigrations import check_possible_host_migration, migrate_guest_to_host,
check_migration_job
+from XenKvmLib.vsmigrations import check_possible_host_migration, \
+migrate_guest_to_host, check_migration_job
from XenKvmLib import enumclass
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
@@ -116,6 +117,7 @@ def main():
options = main.options
status = PASS
rc = -1
+ virt = options.virt
try:
service = vsmigrations.Xen_VirtualSystemMigrationService(options.ip)
@@ -136,7 +138,7 @@ def main():
ref_list = []
cs_ref = None
- status, ref_list = setup_env(options.ip, mlist, local_migrate, options.virt)
+ status, ref_list = setup_env(options.ip, mlist, local_migrate, virt)
if status != PASS or len(ref_list) < 1:
return FAIL
@@ -145,7 +147,7 @@ def main():
for type, item in mlist.iteritems():
guest_name = cs_ref['Name']
- status, cxml = start_guest(options.ip, guest_name, type, options.virt)
+ status, cxml = start_guest(options.ip, guest_name, type, virt)
if status != PASS:
break
@@ -166,7 +168,7 @@ def main():
id = ret[1]['Job'].keybindings['InstanceID']
status = check_migration_job(options.ip, id, target_ip,
- guest_name, local_migrate)
+ guest_name, local_migrate, virt)
if status != PASS:
break