Get the couchdb options from salt.

def _get_options(ret=None):
    '''
    Get the couchdb options from salt.
    '''
    attrs = {'url': 'url',
             'db': 'db',
             'user': 'user',
             'passwd': 'passwd',
             'redact_pws': 'redact_pws',
             'minimum_return': 'minimum_return'}

    _options = salt.returners.get_returner_options(__virtualname__,
                                                   ret,
                                                   attrs,
                                                   __salt__=__salt__,
                                                   __opts__=__opts__)
    if 'url' not in _options:
        log.debug("Using default url.")
        _options['url'] = "http://salt:5984/"

    if 'db' not in _options:
        log.debug("Using default database.")
        _options['db'] = "salt"

    if 'user' not in _options:
        log.debug("Not athenticating with a user.")
        _options['user'] = None

    if 'passwd' not in _options:
        log.debug("Not athenticating with a password.")
        _options['passwd'] = None

    if 'redact_pws' not in _options:
        log.debug("Not redacting passwords.")
        _options['redact_pws'] = None

    if 'minimum_return' not in _options:
        log.debug("Not minimizing the return object.")
        _options['minimum_return'] = None

    return _options