Skip to content
Snippets Groups Projects
update-test-db.py 327 B
import json
import os
import redis


r = redis.StrictRedis(host="test-dashboard02.geant.org")

d = {}
for k in r.keys():
    print(k)
    d[k.decode('utf-8')] = r.get(k).decode('utf-8')

data_filename = os.path.join(os.path.dirname(__file__), "router-info.json")

with open(data_filename, "w") as f:
    f.write(json.dumps(d))