我使用复制和分片构建mongodb群集。我设置了基于x509的认证。 我对蒙戈为连接到数据库(mongos):如何使用mongoengine连接到mongodb群集
mongo admin --ssl --sslCAFile mongoCA.pem \
--sslPEMKeyFile client.pem -u user -p password --host my.host.com --port 27017
如何连接到使用mongoengine集群?
我没有找到的连接选项描述的方法register_connection:
def register_connection (alias, name = None, host = None, port = None,
read_preference = READ_PREFERENCE,
username = None, password = None, authentication_source = None,
** Kwargs):
例如PyMongo提供必要的选项http://api.mongodb.com/python/current/examples/authentication.html#mongodb-x509但我需要在现有的代码中使用mongoengine。