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"(nam  | Adds a jail.                                                                               |
   | e,         |                                                                                            |
   | backend[,  |                                                                                            |
   | db])       |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "get"(k[,  |                                                                                            |
   | d])        |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "items"()  |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "keys"()   |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+
   | "values"() |                                                                                            |
   +------------+--------------------------------------------------------------------------------------------+

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

   add(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(name)
