Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
    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,
        )
Esempio n. 4
0
 def _rpc_endpoints(self):
     return [notify.NotifyEndpoint(self.tg), xfr.XfrEndpoint(self.tg)]
Esempio n. 5
0
    def setUp(self):
        super(MdnsNotifyTest, self).setUp()

        self.notify = notify.NotifyEndpoint(mock.Mock())
Esempio n. 6
0
 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)