for net in nodes_addr.values():
for port in net['ports'].values():
host = port.get('node')
dev = port.get('if')
if host == node['host'] and dev == interface:
for net in nodes_addr.values():
for port in net['ports'].values():
host = port.get('node')
dev = port.get('if')
if host == node['host'] and dev == interface: