From: Tim Beale Date: Wed, 20 Feb 2019 03:41:47 +0000 (+1300) Subject: dns_hub: Minor variable rename X-Git-Tag: talloc-2.2.0~165 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2cd65a7a4e7a767ebb9c1b68ba8b3d88797a2165;p=thirdparty%2Fsamba.git dns_hub: Minor variable rename We've dropped the iface logic now - this dictionary maps from realm-to-IP. Signed-off-by: Tim Beale Reviewed-by: Andrew Bartlett --- diff --git a/selftest/target/dns_hub.py b/selftest/target/dns_hub.py index 00c1ebdbfb2..f1a5eee2b54 100755 --- a/selftest/target/dns_hub.py +++ b/selftest/target/dns_hub.py @@ -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