From c30e7a92b069a85e69ac52723ad0c9844e475366 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 25 Dec 2015 11:02:24 +0100 Subject: [PATCH] mutliple NS support for Delegations --- db.example.com.py | 2 +- zone.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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: -- 2.30.2