def postprocess_NFS_OS_reboot(parser): """ when test case done , Host OS reboot :param parser: is a dict, get from Test config file """ ssh = shell_server.get_ssh(parser["NFS_ip"], parser["NFS_usr"], parser["NFS_pwd"]) #獲得ssh if FTOS.OS_is_running(parser["NFS_ip"], parser): FTOS.reboot(ssh)
def postprocess_Host_OS_reboot(parser): """ post process host os part :param parser: is a dict, get from Test config file """ ssh = shell_server.get_ssh(parser["PrimaryOS_ip"], parser["PrimaryOS_usr"], parser["PrimaryOS_pwd"]) #獲得ssh if not FTVM.is_shutoff(parser["vm_name"], parser["PrimaryOS_ip"], ssh): raise TA_error.Postprocess_Error( "vm %s in PrimaryOS cannot shutdown " % parser["vm_name"]) if parser["pos_hostOS_restart"] == "yes": if FTOS.OS_is_running(parser["PrimaryOS_ip"], parser): FTOS.reboot(ssh)