def run():
    ipmi_operator = Operator()
    try:
        result = ipmi_operator.rebootNode(HOST)
        if result.code == "succeed":
            return False
        return True
    except Exception as e:
        print "UT_Reboot_Wrong_Node Except:" + str(e)
        return False
def run():
    operator = Operator()
    try:
        result = operator.getAllInfoByNode(HOST)
        if result.code == "succeed":
            return True
        else:
            return False
    except Exception as e:
        print "UT_Get_All_Sensor_Value Except:" + str(e)
        return False
def run():
    operator = Operator()
    try:
        result = operator.getNodeInfoByType(HOST, TYPE)
        if result.code == "succeed":
            return False
        else:
            return True
    except Exception as e:
        print "UT_Get_Sensor_Value_By_Type Except:" + str(e)
        return False
Exemple #4
0
def run():
    ipmi_operator = Operator()
    ipmi_manager = IPMIManager()
    result = ipmi_manager.shutOffNode(HOST)
    time.sleep(20)
    if result.code != "succeed":
        print "shutoff node fail"
    try:
        result = ipmi_operator.startNode(HOST)
        if result.code == "succeed":
            return True
        return False
    except Exception as e:
        print "UT_Start_Node Except:" + str(e)
        return False
def run():
    ClusterManager.init()
    cluster_id = ClusterManager.createCluster(CLUSTER_NAME, write_DB=False)
    cluster_id = cluster_id.data.get("cluster_id")
    ClusterManager.addNode(cluster_id, NODE_NAME, write_DB=False)
    ipmi_operator = Operator()

    try:
        result = ipmi_operator.shutOffNode(HOST)
        if result.code == "succeed":
            return False
        else:
            return True
    except Exception as e:
        print "UT_ShutOff_Node_In_Cluster Except:" + str(e)
        return False
    finally:
        ClusterManager.deleteNode(cluster_id, NODE_NAME[0], write_DB=False)
Exemple #6
0
def run():
    ipmi_operator = Operator()
    ipmi_manager = IPMIManager()

    try:
        result = ipmi_operator.shutOffNode(HOST)
        time.sleep(20)
        if result.code == "succeed":
            print "boot node"
            result = ipmi_manager.startNode(HOST)
            if result.code == "succeed":
                print "boot node successfully"
            else:
                print "boot node fail"
            return True
        return False
    except Exception as e:
        print "UT_ShutOff_Node Except:" + str(e)
        return False