Simple returner for CouchDB. Optional configuration settings are listed below, along with sane defaults.
couchdb.db: 'salt' couchdb.url: 'http://salt:5984/'
To use the couchdb returner, append '--return couchdb' to the salt command. ex:
salt '*' test.ping --return couchdb
salt.returners.couchdb_return.
ensure_views
()¶This function makes sure that all the views that should exist in the design document do exist.
salt.returners.couchdb_return.
get_fun
(fun)¶Return a dict with key being minion and value being the job details of the last run of function 'fun'.
salt.returners.couchdb_return.
get_jid
(jid)¶Get the document with a given JID.
salt.returners.couchdb_return.
get_jids
()¶List all the jobs that we have..
salt.returners.couchdb_return.
get_minions
()¶Return a list of minion identifiers from a request of the view.
salt.returners.couchdb_return.
get_valid_salt_views
()¶Returns a dict object of views that should be part of the salt design document.
salt.returners.couchdb_return.
prep_jid
(nocache, passed_jid=None)¶Do any work necessary to prepare a JID, including sending a custom id
salt.returners.couchdb_return.
returner
(ret)¶Take in the return and shove it into the couchdb database.
salt.returners.couchdb_return.
set_salt_view
()¶Helper function that sets the salt design document. Uses get_valid_salt_views and some hardcoded values.