fail2ban.client.jailsreader module¶
- class fail2ban.client.jailsreader.JailsReader(force_enable=False, **kwargs)¶
Bases:
ConfigReader
- Attributes:
- jails
- share_config
Methods
convert
([allow_no_files])Convert read before __opts and jails to the commands stream
getOptions
([section, ignoreWrong])Reads configuration for jail(s) and adds enabled jails to __jails
options
(section[, withDefault])Return a list of option names for the given section name.
read
()Overloads a default (not shared) read of config reader.
get
getBaseDir
has_option
has_section
merge_defaults
merge_section
sections
setBaseDir
- convert(allow_no_files=False)¶
Convert read before __opts and jails to the commands stream
- Parameters:
- allow_missingbool
Either to allow log files to be missing entirely. Primarily is used for testing
- getOptions(section=None, ignoreWrong=True)¶
Reads configuration for jail(s) and adds enabled jails to __jails
- property jails¶
- read()¶
Overloads a default (not shared) read of config reader.
To prevent multiple reads of config files with it includes, reads into the config reader, if it was not yet cached/shared by ‘name’.