Beispiel #1
0
def preprocess_NFS_OS(parser):
    if FTOS.OS_is_running(parser["NFS_ip"], parser) == False:
        #FTOS.L1_boot(parser["NFS_NetworkAdaptor"])
        if FTOS.OS_is_running(parser["NFS_ip"], parser) == False:
            raise TA_error.Preprocess_Error("NFS node can not start")
    if FTOS.ssh_is_ready(parser["NFS_ip"], parser["NFS_usr"],
                         parser["NFS_pwd"], parser) == False:
        raise TA_error.Preprocess_Error("NFS node ssh can not access")

    ssh = shell_server.get_ssh(parser["NFS_ip"], parser["NFS_usr"],
                               parser["NFS_pwd"])  #獲得ssh
Beispiel #2
0
def preprocess_slave_OS(parser):
    """
    preprocess  , Host os part , check slave node is booted
    :param parser : is a dict , get from test config file
    """
    if FTOS.OS_is_running(parser["SlaveOS_ip"], parser) == False:
        if parser["IPMI_supported"] == "yes":
            ssh = shell_server.get_ssh(parser["PrimaryOS_ip"],
                                       parser["PrimaryOS_usr"],
                                       parser["PrimaryOS_pwd"])  #獲得ssh
            FTOS.IPMI_boot(parser["SlaveOS_ipmb"], ssh)
            ssh.close()
        elif parser["IPMI_supported"] == "no":
            FTOS.L1_boot(parser["SlaveOS_NetworkAdaptor"])
    if FTOS.OS_is_running(parser["SlaveOS_ip"], parser) == False:
        raise TA_error.Preprocess_Error("SlaveOS node cannot boot")
    if FTOS.ssh_is_ready(parser["SlaveOS_ip"], parser["SlaveOS_usr"],
                         parser["SlaveOS_pwd"], parser) == False:
        raise TA_error.Preprocess_Error("Slave node ssh can not access")