2015-10-10 17:42:44 +02:00
|
|
|
#!/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")
|
2015-10-10 17:42:44 +02:00
|
|
|
db.routers.create_index("status")
|
2017-08-31 13:16:56 +02:00
|
|
|
db.routers.create_index("created")
|
2015-10-10 17:42:44 +02:00
|
|
|
db.routers.create_index("last_contact")
|
|
|
|
db.routers.create_index("netifs.mac")
|
|
|
|
db.routers.create_index([("position", "2dsphere")])
|