univention.ldap_cache package

Submodules

univention.ldap_cache.frontend module

univention.ldap_cache.frontend.groups_for_user(user_dn, consider_nested_groups=True, cache=None)[source]
univention.ldap_cache.frontend.users_in_group(group_dn, consider_nested_groups=True, readers=(None, None))[source]

univention.ldap_cache.listener_module module

class univention.ldap_cache.listener_module.LdapCacheHandler(*args, **kwargs)[source]

Bases: univention.listener.handler.ListenerModuleHandler

When subclassing, in __init__() first call must be:

super(.., self).__init__(*args, **kwargs)

self.config will be set by the metaclass.

create(dn, new)[source]

Called when a new object was created.

Parameters
  • dn (str) – current objects DN

  • new (dict) – new LDAP objects attributes

modify(dn, old, new, old_dn)[source]

Called when an existing object was modified or moved.

A move can be be detected by looking at old_dn. Attributes can be modified during a move.

Parameters
  • dn (str) – current objects DN

  • old (dict) – previous LDAP objects attributes

  • new (dict) – new LDAP objects attributes

  • old_dn (str or None) – previous DN if object was moved/renamed, None otherwise

remove(dn, old)[source]

Called when an object was deleted.

Parameters
  • dn (str) – current objects DN

  • old (dict) – previous LDAP objects attributes

post_run()[source]

Called only, when no change happens for 15 seconds - for any listener module.

Use for example to close an LDAP connection.

class Configuration(*args, **kwargs)[source]

Bases: univention.listener.handler.ListenerModuleHandler.Configuration

get_priority()[source]
Returns

priority of the handler. Defines the order in which this module is executed inside the listener

Return type

float

univention.ldap_cache.log module

univention.ldap_cache.log.log(*msgs)[source]
univention.ldap_cache.log.debug(*msgs)[source]