예제 #1
0
파일: command.py 프로젝트: tbielawa/Taboot
 def _process_result(self, result):
     t = TaskResult(self)
     if result[0] == 0:
         t.success = True
     else:
         t.success = False
     t.output = result[1]
     return t
예제 #2
0
파일: command.py 프로젝트: abutcher/Taboot
 def _process_result(self, result):
     t = TaskResult(self)
     if result[0] == 0:
         t.success = True
     else:
         t.success = False
     t.output = result[1]
     return t
예제 #3
0
    def _process_result(self, result):
        t = TaskResult(self)

        if result.startswith("Fail: "):
            t.success = False
        else:
            t.sucess = True
        t.output = result
        return t
예제 #4
0
파일: mod_jk.py 프로젝트: abutcher/Taboot
    def _process_result(self, result):
        t = TaskResult(self)
        if len(result) > 0:
            t.success = True
            if self._action == JK_ENABLE:
                verb = 'Enabled'
            elif self._action == JK_DISABLE:
                verb = 'Disabled'
            elif self._action == JK_STOP:
                verb = 'Stopped'

            t.output = "%s AJP on the following balancer/worker " \
                "pairs:\n" % verb
            for balancer, worker in result:
                t.output += "%s:  %s\n" % (balancer, worker)
        else:
            t.success = False
            t.output = "Failed to find worker host"
        return t
예제 #5
0
 def _process_result(self, result):
     t = TaskResult(self)
     t.success = True
     for r in result:
         if r.startswith("Fail: "):
             t.success = t.success & False
         else:
             t.sucess = t.success & True
     t.output = "".join(result)
     return t
예제 #6
0
    def _process_result(self, result):
        t = TaskResult(self)
        if len(result) > 0:
            t.success = True
            if self._action == JK_ENABLE:
                verb = 'Enabled'
            elif self._action == JK_DISABLE:
                verb = 'Disabled'
            elif self._action == JK_STOP:
                verb = 'Stopped'

            t.output = "%s AJP on the following balancer/worker " \
                "pairs:\n" % verb
            for balancer, worker in result:
                t.output += "%s:  %s\n" % (balancer, worker)
        else:
            t.success = False
            t.output = "Failed to find worker host"
        return t