mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix find and remove functions to pass database param
This commit is contained in:
parent
c1157cdaee
commit
6f74477129
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue