diff -r 5149c39f3dfc -r 74352351d6f5 pvl/hosts/zone.py --- a/pvl/hosts/zone.py Tue Mar 10 00:11:43 2015 +0200 +++ b/pvl/hosts/zone.py Tue Mar 10 00:26:31 2015 +0200 @@ -2,7 +2,6 @@ Generate zonefile records from hosts """ -import ipaddr import logging; log = logging.getLogger('pvl.hosts.zone') import pvl.dns import pvl.hosts.host @@ -79,7 +78,7 @@ def host_reverse (host, prefix) : """ - Yield (ipaddr.IPAddress, ZoneRecord) tuples for host within given prefix's reverse-dns zone. + Yield (ipaddress.IPAddress, ZoneRecord) tuples for host within given prefix's reverse-dns zone. """ for sublabel, ip in host.addresses(): @@ -168,7 +167,7 @@ Generate DNS ZoneRecords within the given prefix's reverse-dns zone for hosts. hosts: [Host] - Host's to render PTRs for - prefix: ipaddr.IPNetwork - IPv4/IPv6 prefix to render PTRs for within associated in-addr.arpa/ip6.arpa zone + prefix: ipaddress.IPNetwork - IPv4/IPv6 prefix to render PTRs for within associated in-addr.arpa/ip6.arpa zone unknown_host: str - render a PTR to the given host @unknown_domain for unassigned IPs within prefix unknown_domain: str - required if unknown_host is given @@ -191,7 +190,7 @@ if unknown_host : # enumerate all of them - iter_ips = prefix.iterhosts() + iter_ips = prefix.hosts() else : iter_ips = sorted(by_ip)