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