Ejemplo n.º 1
0
    def setUp(self):
        super(PowerDNSBackendTestCase, self).setUp()

        self.domain = objects.Domain(id='e2bed4dc-9d01-11e4-89d3-123b93f75cba',
                                     name='example.com.',
                                     email='*****@*****.**')

        self.target = objects.PoolTarget.from_dict({
            'id':
            '4588652b-50e7-46b9-b688-a9bad40a873e',
            'type':
            'powerdns',
            'masters': [{
                'host': '192.0.2.1',
                'port': 53
            }, {
                'host': '192.0.2.2',
                'port': 35
            }],
            'options': [{
                'key': 'connection',
                'value': 'memory://',
                'key': 'host',
                'value': '192.0.2.3',
                'key': 'port',
                'value': 53
            }],
        })

        self.backend = impl_powerdns.PowerDNSBackend(self.target)
Ejemplo n.º 2
0
    def setUp(self):
        super(PowerDNSBackendTestCase, self).setUp()

        self.masters = [
            '127.0.1.1:53',
            '127.0.1.2:53',
        ]

        self.domain = objects.Domain(id='e2bed4dc-9d01-11e4-89d3-123b93f75cba',
                                     name='example.com.',
                                     email='*****@*****.**')

        backend_options = [
            objects.BackendOption(key="host", value="127.0.0.1"),
            objects.BackendOption(key="port", value=5353),
            objects.BackendOption(key="masters", value=self.masters),
        ]

        self.backend = impl_powerdns.PowerDNSBackend(backend_options)