def dns_application(self): # Create an instance of the RequestHandler class application = handler.RequestHandler() if cfg.CONF['service:agent'].notify_delay > 0.0: application = dnsutils.LimitNotifyMiddleware(application) application = dnsutils.SerializationMiddleware(application) return application
def setUp(self): super(AgentRequestHandlerTest, self).setUp() self.config(allow_notify=["0.0.0.0"], backend_driver="fake", transfer_source="1.2.3.4", group='service:agent') self.handler = handler.RequestHandler() self.addr = ["0.0.0.0", 5558]
def setUp(self): super(AgentRequestHandlerTest, self).setUp() self.CONF.set_override('allow_notify', ['0.0.0.0'], 'service:agent') self.CONF.set_override('backend_driver', 'fake', 'service:agent') self.CONF.set_override('transfer_source', '1.2.3.4', 'service:agent') self.handler = handler.RequestHandler() self.addr = ['0.0.0.0', 5558]
def test_init(self): self.CONF.set_override('masters', ['192.168.0.1', '192.168.0.2'], 'service:agent') hndlr = handler.RequestHandler() self.assertEqual([{ 'host': '192.168.0.1', 'port': 53 }, { 'host': '192.168.0.2', 'port': 53 }], hndlr.masters)
def _dns_application(self): # Create an instance of the RequestHandler class application = handler.RequestHandler() application = dnsutils.SerializationMiddleware(application) return application