def statii(self): (sysout, stderr) = self._run_action('status', check_exit_code=False) combined = (sysout + stderr).lower() st = bruntime.STATUS_UNKNOWN if combined.find("is running") != -1: st = bruntime.STATUS_STARTED elif utils.has_any(combined, 'stopped', 'unrecognized', 'not running'): st = bruntime.STATUS_STOPPED return [ bruntime.ProgramStatus(name='apache', status=st, details={ 'STDOUT': sysout, 'STDERR': stderr, }), ]
def statii(self): (sysout, stderr) = self._run_action('status', False) combined = (sysout + stderr).lower() st = bruntime.STATUS_UNKNOWN if combined.find("running") != -1: st = bruntime.STATUS_STARTED elif utils.has_any(combined, 'stop', 'unrecognized'): st = bruntime.STATUS_STOPPED return [ bruntime.ProgramStatus(name=self.applications[0].name, status=st, details={ 'STDOUT': sysout, 'STDERR': stderr, }), ]
def statii(self): # This has got to be the worst status output. # # I have ever seen (its like a weird mix json+crap) (sysout, stderr) = self._run_action('status', check_exit_code=False) st = bruntime.STATUS_UNKNOWN combined = (sysout + stderr).lower() if utils.has_any(combined, 'nodedown', "unable to connect to node", 'unrecognized'): st = bruntime.STATUS_STOPPED elif combined.find('running_applications') != -1: st = bruntime.STATUS_STARTED return [ bruntime.ProgramStatus(status=st, details={ 'STDOUT': sysout, 'STDERR': stderr }) ]