Skip to content
Snippets Groups Projects
Commit 5f24e3c4 authored by Erik Reid's avatar Erik Reid
Browse files

added some testenv utilities

parent 4bf7a529
No related branches found
No related tags found
No related merge requests found
import json
with open('router-info.json') as f:
db = json.loads(f.read())
cache = dict([(k, db[k]) for k in db if k.startswith('classifier:')])
with open('cached-entries.json', 'w') as f:
f.write(json.dumps(cache))
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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment