Add DNS nameservers to networks

This commit is contained in:
2019-12-08 23:32:03 -05:00
parent 9cb5561e77
commit 1fb560e996
6 changed files with 56 additions and 12 deletions

View File

@ -222,7 +222,11 @@ class DNSNetworkInstance(object):
(domain_id, network_domain, 'nsX.{d} root.{d} 1 10800 1800 86400 86400'.format(d=self.config['upstream_domain']), 'SOA', 86400, 0)
)
ns_servers = ['pvc-ns.{}'.format(self.config['upstream_domain'])]
if self.network.name_servers:
ns_servers = self.network.name_servers
else:
ns_servers = ['pvc-dns.{}'.format(self.config['upstream_domain'])]
for ns_server in ns_servers:
sql_curs.execute(
"""