pvl.dns-zone: remove --forward-mx support
authorTero Marttila <tero.marttila@aalto.fi>
Fri, 27 Feb 2015 11:54:22 +0200
changeset 637 6674b18f6829
parent 636 d21df33dd1d4
child 638 92a78c787fe9
pvl.dns-zone: remove --forward-mx support
bin/pvl.dns-zone
--- a/bin/pvl.dns-zone	Fri Feb 27 11:53:25 2015 +0200
+++ b/bin/pvl.dns-zone	Fri Feb 27 11:54:22 2015 +0200
@@ -58,9 +58,6 @@
     parser.add_option('--forward-txt',          action='store_true',
             help="Generate TXT records for forward zone")
 
-    parser.add_option('--forward-mx',           metavar='MX',
-            help="Generate MX records for forward zone")
-
     # reverse stage
     parser.add_option('--reverse-domain',       metavar='DOMAIN',
             help="Domain to use for hosts in reverse zone")
@@ -173,7 +170,7 @@
         else :
             yield line, rr
 
-def process_zone_forwards (zone, txt=False, mx=False) :
+def process_zone_forwards (zone, txt=False) :
     """
         Process zone data -> forward zone data.
     """
@@ -188,14 +185,7 @@
 
                 if comment :
                     yield line, ZoneRecord.TXT(None, comment, ttl=r.ttl)
-
            
-            # XXX: RP, do we need it?
-
-            if mx :
-                # XXX: is this even a good idea?
-                yield line, ZoneRecord.MX(None, 10, mx, ttl=r.ttl)
-
 def process_zone_reverse (zone, origin, domain) :
     """
         Process zone data -> reverse zone data.
@@ -283,7 +273,7 @@
     if options.forward_zone :
         log.info("Generate forward zone...")
 
-        zone = list(process_zone_forwards(zone, txt=options.forward_txt, mx=options.forward_mx))
+        zone = list(process_zone_forwards(zone, txt=options.forward_txt))
 
     if options.reverse_zone :
         if ':' in options.reverse_zone :