ascension

Migrate DNS zones to the GNU Name System
Log | Files | Refs | README | LICENSE

commit 0bef02239cbed4edde528d0e7f16f9127a8e8839
parent 225e677789cf7a2a1e50bc56acba4899d06257c8
Author: rexxnor <rexxnor+gnunet@brief.li>
Date:   Wed, 22 May 2019 17:27:36 +0200

added check for obsolete records, addded SOA to supported ones

Diffstat:
Mascension/ascension.py | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/ascension/ascension.py b/ascension/ascension.py @@ -21,7 +21,7 @@ """ Usage: ascension <domain> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] - ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] + ascension <domain> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension <domain> -n <transferns> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension <domain> -n <transferns> <port> [-d] [-p] [-s] [--minimum-ttl=<ttl>] [--dry-run] ascension -p | --public @@ -67,7 +67,7 @@ GNUNET_ARM_COMMAND = 'gnunet-arm' # in this list and not in the OBSOLETE_RECORD_TYPES list will # create a warning (information loss during migration). SUPPORTED_RECORD_TYPES = [ - "A", "AAAA", "NS", "MX", "SRV", "TXT", "CNAME", + "A", "AAAA", "NS", "MX", "SRV", "TXT", "CNAME", "SOA" ] # Record types that exist in DNS but that won't ever exist in GNS # as they are not needed anymore (so we should not create a warning @@ -211,7 +211,12 @@ class Ascender(): for rdataset in listofrdatasets: for record in rdataset: rdtype = dns.rdatatype.to_text(record.rdtype) + if rdtype == "SOA": + continue if rdtype not in SUPPORTED_RECORD_TYPES: + if rdtype not in OBSOLETE_RECORD_TYPES: + logging.critical("%s records not supported!", + rdtype) continue try: @@ -250,10 +255,6 @@ class Ascender(): else: # build recordline recordline.append("-R") - - # TODO possible regression here; maybe use a separate - # list to pass those arguments to prevent quoting - # issues in the future. recordline.append('%d %s %s %s' % (int(ttl), rdtype,