On 23/08/16 11:47, David Okwii wrote:
Hi David,
[snip]
> So does dnspython have a way of defining a zone in named.conf? Or is this
> something I've to manually add in other ways? Thanks.
dnspython doesn't know how to manage bind's named.conf file. That's not
within the scope of dnspython's feature set.
You'll have to add zones to named.conf by hand, or write other python
code to do that. For example, with recent versions of bind, you can
dynamically add zones with something like this:
rndc addzone ...
So you can also get your python code to call "rndc" with the appropriate
parameters. Please read the bind documentation for more details about
this. Alternatively, you can get your code to edit named.conf, and then
call "rndc reconfig" to pick up the new zone. Be sure that your code to
edit named.conf is robust.
Regards,
Anand