def setUp(self): super(MdnsNotifyTest, self).setUp() self.nameserver = objects.PoolNameserver.from_dict({ 'id': 'f278782a-07dc-4502-9177-b5d85c5f7c7e', 'host': '127.0.0.1', 'port': 65255 }) self.mock_tg = mock.Mock() self.notify = notify.NotifyEndpoint(self.mock_tg)
def setUp(self): super(MdnsNotifyTest, self).setUp() server_values = { 'id': 'f278782a-07dc-4502-9177-b5d85c5f7c7e', 'host': '127.0.0.1', 'port': 65255, 'backend': 'fake' } self.server = objects.PoolServer.from_dict(server_values) self.mock_tg = mock.Mock() self.notify = notify.NotifyEndpoint(self.mock_tg)
def __init__(self): self._storage = None super(Service, self).__init__( self.service_name, cfg.CONF['service:mdns'].topic, threads=cfg.CONF['service:mdns'].threads, ) self.override_endpoints( [notify.NotifyEndpoint(self.tg), xfr.XfrEndpoint(self.tg)]) self.dns_service = service.DNSService( self.dns_application, self.tg, cfg.CONF['service:mdns'].listen, cfg.CONF['service:mdns'].tcp_backlog, cfg.CONF['service:mdns'].tcp_recv_timeout, )
def _rpc_endpoints(self): return [notify.NotifyEndpoint(self.tg), xfr.XfrEndpoint(self.tg)]
def setUp(self): super(MdnsNotifyTest, self).setUp() self.notify = notify.NotifyEndpoint(mock.Mock())
def setUp(self, *mocks): super(MdnsNotifyTest, self).setUp() notify.CONF = RoObject({'service:mdns': RoObject(all_tcp=False)}) self.tg = Mock(name='tg') self.notify = notify.NotifyEndpoint(self.tg)