equal
deleted
inserted
replaced
43 """ |
43 """ |
44 Yield (ip, fqnd) for hosts within given prefix. |
44 Yield (ip, fqnd) for hosts within given prefix. |
45 """ |
45 """ |
46 |
46 |
47 for host in hosts : |
47 for host in hosts : |
48 if not host.ip : |
48 if prefix.version == 4 : |
|
49 ip = host.ip |
|
50 elif prefix.version == 6 : |
|
51 ip = host.ip6 |
|
52 else : |
|
53 raise ValueError("%s: unknown ip version: %s" % (prefix, prefix.version)) |
|
54 |
|
55 if not ip : |
49 continue |
56 continue |
50 |
57 |
51 if host.ip not in prefix : |
58 if ip not in prefix : |
52 continue |
59 continue |
53 |
60 |
54 yield host.ip, pvl.dns.zone.fqdn(host, host.domain) |
61 yield ip, pvl.dns.zone.fqdn(host, host.domain) |
55 |
62 |
56 def process_hosts_reverse (options, hosts, prefix) : |
63 def process_hosts_reverse (options, hosts, prefix) : |
57 """ |
64 """ |
58 Generate DNS ZoneRecords within the given prefix's reverse-dns zone for hosts. |
65 Generate DNS ZoneRecords within the given prefix's reverse-dns zone for hosts. |
59 """ |
66 """ |