@@ -2434,14 +2434,14 @@ def get_target_hugepage_num(params):
24342434
24352435 try :
24362436 remote_virsh_session = virsh .VirshPersistent (** remote_virsh_dargs )
2437- logging .debug (" Check if remote guest exists" )
2437+ logging .debug (f"TEST_STEP: Check if remote guest ' { target_vm_name } ' exists on ' { server_ip } ' " )
24382438 if remote_virsh_session .domain_exists (target_vm_name ) is False :
24392439 test .cancel ("The guest '%s' on remote '%s' should be "
24402440 "installed before the test."
24412441 % (target_vm_name , server_ip ))
24422442 # Check the prepared guest state on remote host.
24432443 # 'shut off' is expected.
2444- logging .debug (" Check if remote guest is in shutoff" )
2444+ logging .debug (f"TEST_STEP: Check if remote guest is in shutoff. " )
24452445 if remote_virsh_session .is_alive (target_vm_name ):
24462446 test .error ("The guest '%s' on remote "
24472447 "'%s' should not be alive."
@@ -2472,27 +2472,26 @@ def get_target_hugepage_num(params):
24722472 % (nfs_mount_dir , image_name )}
24732473 guest_config .sub (pattern2repl )
24742474
2475- logging .debug ("Modify remote guest xml's machine type" )
24762475 arch = platform .machine ()
2477- if arch .count ("ppc64" ):
2478- machine_type = "pseries"
2479-
2476+ specific_machine_type = params .get ("specific_machine_type" , machine_type )
2477+ logging .debug (f"TEST_STEP: Modify remote guest xml's machine type { specific_machine_type } " )
24802478 pattern2repl = {r".*.machine=.*" :
24812479 "<type arch='%s' machine='%s'>hvm</type>"
2482- % (arch , machine_type )}
2480+ % (arch , specific_machine_type )}
2481+ logging .debug (f"Pattern to replace: { pattern2repl } " )
24832482 guest_config .sub (pattern2repl )
24842483
24852484 # undefine remote guest
2486- logging .debug (" Undefine remote guest" )
2485+ logging .debug (f"TEST_STEP: Undefine remote guest { target_vm_name } " )
24872486 remote_virsh_session .undefine (target_vm_name , options = "--nvram" )
24882487
24892488 # redefine remote guest using updated XML
2490- logging .debug ("Redefine remote guest" )
2489+ logging .debug ("TEST_STEP: Redefine remote guest" )
24912490 result = remote_virsh_session .define (xml_path )
2492- logging .debug (result . stdout . strip () )
2491+ logging .debug (f" result of redefine: { result } " )
24932492
24942493 # start remote guest
2495- logging .debug ("Start remote guest" )
2494+ logging .debug ("TEST_STEP: Start remote guest" )
24962495 remote_virsh_session .start (target_vm_name )
24972496
24982497 # dumpxml remote guest
0 commit comments