def startRouter(servers, **kwargs): ''' Example: mongo = Mongo() mongo.startRouter(servers="172.16.101.229:27020",port=27021,bind_ip="172.16.101.229") ''' mongo_router = MongoRouter(servers=servers, **kwargs) mongo_router.start()
def statusRouter(**kwargs): ''' Get router (mongos) status ''' mongo_router = MongoRouter(**kwargs) return mongo_router.getStatus()