def get_config(request):
    """Return a dictionary with config options."""
    config = {}
    options = ['exec', 'host', 'port', 'params', 'logsdir', 'tz_aware']
    for option in options:
        option_name = 'mongo_' + option
        conf = request.config.getoption(option_name) or request.config.getini(
            option_name)
        config[option] = conf
    return config
