From: Ralf Jung Date: Fri, 25 Dec 2015 10:02:24 +0000 (+0100) Subject: mutliple NS support for Delegations X-Git-Url: https://git.ralfj.de/zonemaker.git/commitdiff_plain/c30e7a92b069a85e69ac52723ad0c9844e475366?ds=sidebyside mutliple NS support for Delegations --- diff --git a/db.example.com.py b/db.example.com.py index ca620ef..1087113 100644 --- a/db.example.com.py +++ b/db.example.com.py @@ -40,7 +40,7 @@ __zone__ = Zone('example.com.', serialfile = 'db.example.com.srl', # 'orgstuff': CName('example.org.'), # CNAMEs cannot be combined with other records # - 'sub1': Delegation('ns.example.org.'), # this adds an NS record + 'sub1': Delegation('ns.example.org.', 'ns'), # this adds an NS record 'sub2': SecureDelegation('ns.example.com.', 12345, Algorithm.RSA_SHA256, Digest.SHA256, '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF'), # this adds an NS and a DS record # 'local': { diff --git a/zone.py b/zone.py index cbde170..5030e9c 100644 --- a/zone.py +++ b/zone.py @@ -296,8 +296,8 @@ def CName(name: str) -> Name: return Name(CNAME(name)) -def Delegation(name: str) -> Name: - return Name(NS(name)) +def Delegation(name: str, *names) -> Name: + return Name(NS(name), list(map(NS, names))) def SecureDelegation(name: str, tag: int, alg: int, digest: int, key: str) -> Name: