fail2ban.server.jails module
****************************

class fail2ban.server.jails.Jails

   Bases: "Mapping"

   Handles the jails.

   This class handles the jails. Creation, deletion or access to a
   jail must be done through this class. This class is thread-safe
   which is not the case of the jail itself, including filter and
   actions. This class is based on Mapping type, and the *add* method
   must be used to add additional jails.

   -[ Methods ]-

   +------------+--------------------------------------------------------------------------------------------+
   | "add"(sel  | Adds a jail.                                                                               |
   | f, name,   |                                                                                            |
   | backend[,  |                                                                                            |
   | db])       |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "get"(sel  |                                                                                            |
   | f, key[,   |                                                                                            |
   | default])  |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "items"(s  |                                                                                            |
   | elf)       |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "keys"(se  |                                                                                            |
   | lf)        |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "values"(  |                                                                                            |
   | self)      |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+

   +------------+------------+
   | **exists** |            |
   +------------+------------+

   add(self, name, backend, db=None)

      Adds a jail.

      Adds a new jail if not already present which should use the
      given backend.

      Parameters:
         **name** : str
            The name of the jail.

         **backend** : str
            The backend to use.

         **db** : Fail2BanDb
            Fail2Ban's persistent database instance.

      Raises:
         DuplicateJailException
            If jail name is already present.

   exists(self, name)
