Commit f9533d81 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add FQN for ipv6 domains

parent bedc366a
......@@ -32,16 +32,22 @@ def ethers(tree):
result = ""
host = {}
for i in filter(lambda i: i.ethernet[0], tree._host_._interface_):
host[i.ethernet[0]] = [ i.name[0:] ]
host[i.ethernet[0]] = set([ i.name[0:] ])
for ip in filter(util.address, i._ip_):
fqn = util.fqn(tree, ip)
if fqn:
host[i.ethernet[0]].append(fqn[0:-1])
host[i.ethernet[0]].add(fqn[0:-1])
pass
pass
for ipv6 in filter(util.address, i._ipv6_):
fqn = util.fqn(tree, ipv6)
if fqn:
host[i.ethernet[0]].add(fqn[0:-1])
pass
pass
pass
for k in sorted(host, cmp=util.by_mac):
for h in host[k]:
for h in sorted(host[k]):
result += "%-15s %s\n" % (k, h)
return result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment