Beispiel #1
0
def preprocess_hostOS_OS_boot(parser):
    """
  preprocess hostOS OS boot
  """
    if not FTOS.is_running(parser["HostOS_name"]):
        if FTOS.is_shutdown(parser["HostOS_name"]):
            status = FTOS.boot(parser["HostOS_name"])
            if status != "success":
                raise TA_error.Preprocess_Error("HostOS OS boot command fail")
        time.sleep(float(parser["pre_hostOS_boot_time"]))
        if not FTOS.is_running(parser["HostOS_name"]):
            raise TA_error.Preprocess_Error("HostOS OS can not boot")
Beispiel #2
0
def preprocess_backupOS_OS_boot(parser):
    """
    preprocess backupOS OS boot

    :called func: preprocess_hostOS_OS
    :param parser: is a dict, get from Test config file
    """
    if not FTOS.is_running(parser["BackupOS_name"]):
        if FTOS.is_shutdown(parser["BackupOS_name"]):
            status = FTOS.boot(parser["BackupOS_name"])
            if status != "success":
                raise TA_error.Preprocess_Error(
                    "BackupOS OS boot command fail")
        time.sleep(float(parser["pre_backupOS_boot_time"]))
        if not FTOS.is_running(parser["BackupOS_name"]):
            raise TA_error.Preprocess_Error("BackupOS OS can not boot")