mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Fix find and remove functions to pass database param
This commit is contained in:
parent
c1157cdaee
commit
6f74477129
@ -308,7 +308,7 @@ def insert(objects, collection, user=None, password=None,
|
||||
|
||||
def find(collection, query=None, user=None, password=None,
|
||||
host=None, port=None, database='admin'):
|
||||
conn = _connect(user, password, host, port)
|
||||
conn = _connect(user, password, host, port, database)
|
||||
if not conn:
|
||||
return 'Failed to connect to mongo database'
|
||||
|
||||
@ -340,7 +340,7 @@ def remove(collection, query=None, user=None, password=None,
|
||||
salt '*' mongodb.remove mycollection '[{"foo": "FOO", "bar": "BAR"}, {"foo": "BAZ", "bar": "BAM"}]' <user> <password> <host> <port> <database>
|
||||
|
||||
"""
|
||||
conn = _connect(user, password, host, port)
|
||||
conn = _connect(user, password, host, port, database)
|
||||
if not conn:
|
||||
return 'Failed to connect to mongo database'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user