Ejemplo n.º 1
0
def run():
    ipmi_operator = Operator()
    try:
        result = ipmi_operator.startNode(HOST)
        if result.code == "succeed":
            return False
        return True
    except Exception as e:
        print "UT_Start_Wrong_Node Except:" + str(e)
        return False
Ejemplo n.º 2
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