12 lines
216 B
Python
Executable file
12 lines
216 B
Python
Executable file
#!/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']))
|