12 lines
216 B
Python
12 lines
216 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import json
|
||
|
import sys
|
||
|
|
||
|
nodes = json.load(sys.stdin)
|
||
|
|
||
|
for node in nodes['nodes']:
|
||
|
if node['name']:
|
||
|
for mac in node['macs'].split(','):
|
||
|
print("%s %s" % (mac.strip(), node['name']))
|