Exemplo n.º 1
0
def dostart(srvid, ip, username, password, nohupstart, start, nohupstop, stop,
            needcheck, check, status):
    service = Service(srvid, ip, username, password, nohupstart, start,
                      nohupstop, stop, needcheck, check, status)

    if service.start_service():
        mylogger.info(
            "[------------ %s start [success]. Going to next service >>>>>>>>>>]"
            % service.__str__())
        return True
    else:
        mylogger.error(
            "[------------ %s start [failed]. Workflow terminated! XXXXXXXXXX]"
            % service.__str__())
        return False
Exemplo n.º 2
0
def docheck(srvid, ip, username, password, nohupstart, start, nohupstop, stop,
            needcheck, check, status):
    service = Service(srvid, ip, username, password, nohupstart, start,
                      nohupstop, stop, needcheck, check, status)

    mylogger.info("-" * 105)
    mylogger.info(":[[ -" + service.check_service1() + "- ]]  : " +
                  service.__str__() + "")
    mylogger.info("-" * 105)