]> mj.ucw.cz Git - pynsc.git/blob - example/__init__.py
Unify processing of arguments to record-generating methods
[pynsc.git] / example / __init__.py
1 from nsconfig import Nsc
2 from nsconfig.daemon.bind import NscDaemonBind
3
4 nsc = Nsc(
5     admin_email='admin@example.org',
6     origin_server='ns.example.org',
7     daemon=NscDaemonBind(control_command='echo'),
8 )
9
10 for rev in ['10.1.0.0/16', '10.2.0.0/16', 'fd12:3456:789a::/48']:
11     rz = nsc.add_zone(reverse_for=rev)
12     rz[""].NS('ns1.example.org', 'ns2.example.org')
13
14 nsc.add_zone('example.net', follow_primary='10.42.0.1')
15
16 import example.example_org