示例#1
0
def init(action):
    heartbeat=Heartbeat(name="heartbeat", config="/etc/ha.d")
    
    if action == "start" or action == "restart" or action == "stop":
        heartbeat.init(action)
    
    if action == "remove" or action == "install" or action == "update":
        heartbeat.yum("heartbeat",action)
示例#2
0
def set_extVIP():
    heartbeat = Heartbeat(name="heartbeat", config="/etc/ha.d")
    heartbeat.yum("heartbeat", "install")

    heartbeat.externalVIP()
    heartbeat.chkconfig("on")
    if console.confirm("Do you want to start the " + heartbeat.name + "?",
                       default=False):
        heartbeat.init("start")
示例#3
0
def set_extVIP():
    heartbeat=Heartbeat(name="heartbeat", config="/etc/ha.d")
    heartbeat.yum("heartbeat","install")

    heartbeat.externalVIP()
    heartbeat.chkconfig("on")
    if console.confirm("Do you want to start the "+heartbeat.name+"?", default=False):
        heartbeat.init("start")
示例#4
0
def init(action):
    heartbeat = Heartbeat(name="heartbeat", config="/etc/ha.d")

    if action == "start" or action == "restart" or action == "stop":
        heartbeat.init(action)

    if action == "remove" or action == "install" or action == "update":
        heartbeat.yum("heartbeat", action)