You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
401 B
Plaintext
14 lines
401 B
Plaintext
9 years ago
|
#!/usr/bin/python
|
||
|
from __future__ import division, print_function
|
||
|
import requests
|
||
|
|
||
|
|
||
|
r = requests.get('http://mapsrv0.ffka.net/json/ffka/nodes.json')
|
||
|
j = r.json()
|
||
|
|
||
|
for nodeid in j['nodes'].keys():
|
||
|
nodeinfo = j['nodes'][nodeid]['nodeinfo']
|
||
|
hostname = nodeinfo['hostname']
|
||
|
for i, mac in enumerate(nodeinfo['network']['mesh_interfaces']):
|
||
|
print('{} {}_int{}'.format(mac, hostname, i))
|