def connectionLost(self, reason): # parse returned data log.debug(self.factory.data) parse = OutputParser(self.factory.data) loss = parse.getPingLoss() gain = parse.getPingGain() host = self.getHost() # threshold checks, messaging, and workflow self.processRules(gain, host=host, loss=loss, gain=gain) # update state information self.updateState() # dump info to log file log.info('State Data: '+str(self.factory.state.data)+'\n') # final cleanup LocalAgentClient.connectionLost(self, reason) ClientMixin.teardown(self)
def connectionLost(self, reason): # parse returned data log.debug(self.factory.data) parse = OutputParser(self.factory.data) loss = parse.getPingLoss() gain = parse.getPingGain() host = self.getHost() # threshold checks, messaging, and workflow self.processRules(gain, host=host, loss=loss, gain=gain) # update state information self.updateState() # dump info to log file log.info('State Data: ' + str(self.factory.state.data) + '\n') # final cleanup LocalAgentClient.connectionLost(self, reason) ClientMixin.teardown(self)
def connectionLost(self, reason): results = self.factory.data log.debug(results) # push the returned data through the threshold checks status = self.rules.check(gain) self.workflow.checkTransition(status, self.factory.cfg) #self.rules.setMsg(results['gain'], self.getHost()) #self.rules.setSubj(self.getHost(), results['loss']) #if self.rules.isSendMessage(): # self.rules.sendIt() # dump info to log file log.debug('Service: %s' % self.factory.uid) log.debug("Status: %s for %s" % (self.rules.status, host)) # update state information self.updateState() # dump info to log file log.info('State Data: ' + str(self.factory.state.data) + '\n') # final cleanup ClientMixin.connectionLost(self)
def connectionLost(self, reason): results = self.factory.data log.debug(results) # push the returned data through the threshold checks status = self.rules.check(gain) self.workflow.checkTransition(status, self.factory.cfg) #self.rules.setMsg(results['gain'], self.getHost()) #self.rules.setSubj(self.getHost(), results['loss']) #if self.rules.isSendMessage(): # self.rules.sendIt() # dump info to log file log.debug('Service: %s' % self.factory.uid) log.debug("Status: %s for %s" % (self.rules.status, host)) # update state information self.updateState() # dump info to log file log.info('State Data: '+str(self.factory.state.data)+'\n') # final cleanup ClientMixin.connectionLost(self)
def connectionMade(self): self.factory.deferred.callback("success") self.transport.loseConnection() ClientMixin.connectionMade(self)
def connectionMade(self): HTTPPageGetter.connectionMade(self) ClientMixin.connectionMade(self)
def connectionMade(self): LocalAgentClient.connectionMade(self) ClientMixin.setup(self)