lib/nodes.py: Use all interface names and types
parent
3d8ab37c45
commit
e26619a4a1
16
lib/nodes.py
16
lib/nodes.py
|
@ -13,19 +13,9 @@ def build_mac_table(nodes):
|
|||
pass
|
||||
|
||||
try:
|
||||
for mac in node['nodeinfo']['network']['mesh']['bat0']['interfaces']['wireless']:
|
||||
macs[mac] = node_id
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
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']:
|
||||
for upper_if in node['nodeinfo']['network']['mesh'].values():
|
||||
for lower_if in upper_if['interfaces'].values():
|
||||
for mac in lower_if:
|
||||
macs[mac] = node_id
|
||||
except KeyError:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue