dns_hub: Minor variable rename
[kai/samba-autobuild/.git] / selftest / target / dns_hub.py
index 00c1ebdbfb243cfbd2d181b62e0766b8373c4f8c..f1a5eee2b54ce1d06361bd0b8a7f5ae2a69910fc 100755 (executable)
@@ -72,15 +72,16 @@ class DnsHandler(sserver.BaseRequestHandler):
     def get_pdc_ipv4_addr(self, lookup_name):
         """Maps a DNS realm to the IPv4 address of the PDC for that testenv"""
 
-        testenv_iface_mapping = self.server.realm_to_ip_mappings
+        realm_to_ip_mappings = self.server.realm_to_ip_mappings
 
         # sort the realms so we find the longest-match first
-        testenv_realms = sorted(testenv_iface_mapping.keys(), key=len)
+        testenv_realms = sorted(realm_to_ip_mappings.keys(), key=len)
         testenv_realms.reverse()
 
         for realm in testenv_realms:
             if lookup_name.endswith(realm):
-                return testenv_iface_mapping[realm]
+                # return the corresponding IP address for this realm's PDC
+                return realm_to_ip_mappings[realm]
 
         return None