def run(self, host, port, from_addr, to_addr, host_id, count=None, **kwargs): "run" result = {'errors': {}, 'host': host_id} logger = self.get_logger(**kwargs) logger.info(_("Starting connection tests to: %(host)s") % { 'host': host}) server = TestDeliveryServers(host, port, to_addr, from_addr) if server.ping(count): result['ping'] = True else: result['ping'] = False result['errors']['ping'] = ' '.join(server.errors) server.reset_errors() if server.smtp_test(): result['smtp'] = True else: result['smtp'] = False result['errors']['smtp'] = ' '.join(server.errors) return result
def run(self, host, port, from_addr, to_addr, host_id, count=None, **kwargs): "run" result = {'errors': {}, 'host': host_id} logger = self.get_logger(**kwargs) logger.info( _("Starting connection tests to: %(host)s") % {'host': host}) server = TestDeliveryServers(host, port, to_addr, from_addr) if server.ping(count): result['ping'] = True else: result['ping'] = False result['errors']['ping'] = ' '.join(server.errors) server.reset_errors() if server.smtp_test(): result['smtp'] = True else: result['smtp'] = False result['errors']['smtp'] = ' '.join(server.errors) return result