ffmap-backend/nodes2bathosts.py

12 lines
216 B
Python
Raw Normal View History

2012-09-19 11:28:24 +02:00
#!/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']))