monitoring/ffmap/db/routers.py

15 lines
353 B
Python
Raw Normal View History

#!/usr/bin/python3
from pymongo import MongoClient
client = MongoClient()
db = client.freifunk
# create db indexes
2015-11-18 14:48:14 +01:00
db.routers.create_index("hostname")
db.routers.create_index("status")
db.routers.create_index("created")
db.routers.create_index("last_contact")
db.routers.create_index("netifs.mac")
db.routers.create_index([("position", "2dsphere")])