lib/nodes.py: Use all interface names and types

master
Jan-Philipp Litza 2016-05-27 23:24:07 +02:00 committed by Thomas Hooge
parent 3d8ab37c45
commit e26619a4a1
1 changed files with 4 additions and 14 deletions

View File

@ -13,20 +13,10 @@ def build_mac_table(nodes):
pass pass
try: try:
for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['wireless']: for upper_if in node['nodeinfo']['network']['mesh'].values():
macs[mac] = node_id for lower_if in upper_if['interfaces'].values():
except KeyError: for mac in lower_if:
pass macs[mac] = node_id
try:
for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['tunnel']:
macs[mac] = node_id
except KeyError:
pass
try:
for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['other']:
macs[mac] = node_id
except KeyError: except KeyError:
pass pass