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
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
def _process_result(self, result): t = TaskResult(self) if result.startswith("Fail: "): t.success = False else: t.sucess = True t.output = result return t
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
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
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