Add TXT records in .other pseudo-domain to reveal the other_action value
authorMitchell E Berger <mitchb@mit.edu>
Fri, 18 May 2018 01:03:09 +0000 (21:03 -0400)
committerMitchell E Berger <mitchb@mit.edu>
Fri, 18 May 2018 01:03:09 +0000 (21:03 -0400)
debian/changelog
invirt-dns

index 944a09a..e782b06 100644 (file)
@@ -1,6 +1,8 @@
 invirt-dns (0.0.19) precise; urgency=low
 
-  * Add ".other" pseudo-subdomain to find IPs under transition.
+  * Add ".other" pseudo-subdomain to find IPs being used for purposes
+    such as renumberings, and TXT queries in that pseudo-domain to
+    find out what is being done with those IPs.
 
  -- Mitchell Berger <mitchb@mit.edu>  Tue, 15 May 2018 13:48:00 -0400
 
index 7a39f0f..2b920bd 100755 (executable)
@@ -135,6 +135,7 @@ class DatabaseAuthority(common.ResolverBase):
             if value:
                 if other:
                     ip = value.other_ip
+                    action = value.other_action
                 else:
                     ip = value.ip
             else:
@@ -142,6 +143,7 @@ class DatabaseAuthority(common.ResolverBase):
                 if value:
                     if other:
                         ip = value.nics[0].other_ip
+                        action = value.nics[0].other_action
                     else:
                         ip = value.nics[0].ip
                 else:
@@ -155,6 +157,10 @@ class DatabaseAuthority(common.ResolverBase):
             elif type == dns.SOA:
                 results.append(dns.RRHeader(domain, dns.SOA, dns.IN,
                                             ttl, self.soa, auth=True))
+            elif other and type == dns.TXT:
+                record = dns.Record_TXT(action if action else '', ttl=ttl)
+                results.append(dns.RRHeader(name, dns.TXT, dns.IN,
+                                            ttl, record, auth=True))
 
         if len(results) == 0:
             authority = []