tldap.backend package¶
Submodules¶
tldap.backend.base module¶
This module provides the LDAP base functions with a subset of the functions from the real ldap module.
- class tldap.backend.base.LdapBase(settings_dict: dict)[source]¶
Bases:
object
The vase LDAP connection class.
- add(dn: str, mod_list: dict) None [source]¶
Add a DN to the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- commit() None [source]¶
Attempt to commit all changes to LDAP database. i.e. forget all rollbacks. However stay inside transaction management.
- delete(dn: str) None [source]¶
delete a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
- leave_transaction_management() None [source]¶
End a transaction. Must not be dirty when doing so. ie. commit() or rollback() must be called if changes made. If dirty, changes will be discarded.
- modify(dn: str, mod_list: dict) None [source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- modify_no_rollback(dn: str, mod_list: dict) None [source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- rename(dn: str, new_rdn: str, new_base_dn: str | None = None) None [source]¶
rename a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
- reset(force_flush_cache: bool = False) None [source]¶
Reset transaction back to original state, discarding all uncompleted transactions.
- rollback() None [source]¶
Roll back to previous database state. However stay inside transaction management.
tldap.backend.fake_transactions module¶
This module provides the LDAP functions with transaction support faked, with a subset of the functions from the real ldap module.
- class tldap.backend.fake_transactions.LDAPwrapper(settings_dict: dict)[source]¶
Bases:
LdapBase
The LDAP connection class.
- add(dn: str, mod_list: dict) None [source]¶
Add a DN to the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- commit() None [source]¶
Attempt to commit all changes to LDAP database. i.e. forget all rollbacks. However stay inside transaction management.
- delete(dn: str) None [source]¶
delete a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
- leave_transaction_management() None [source]¶
End a transaction. Must not be dirty when doing so. ie. commit() or rollback() must be called if changes made. If dirty, changes will be discarded.
- modify(dn: str, mod_list: dict) None [source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- modify_no_rollback(dn: str, mod_list: dict)[source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- rename(dn: str, new_rdn: str, new_base_dn: str | None = None) None [source]¶
rename a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
tldap.backend.no_transactions module¶
This module provides the LDAP functions with transaction support disabled, with a subset of the functions from the real ldap module.
- class tldap.backend.no_transactions.LDAPwrapper(settings_dict: dict)[source]¶
Bases:
LdapBase
The LDAP connection class.
- add(dn: str, mod_list: dict) None [source]¶
Add a DN to the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- commit() None [source]¶
Attempt to commit all changes to LDAP database. i.e. forget all rollbacks. However stay inside transaction management.
- delete(dn: str) None [source]¶
delete a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
- leave_transaction_management() None [source]¶
End a transaction. Must not be dirty when doing so. ie. commit() or rollback() must be called if changes made. If dirty, changes will be discarded.
- modify(dn: str, mod_list: dict) None [source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- modify_no_rollback(dn: str, mod_list: dict) None [source]¶
Modify a DN in the LDAP database; See ldap module. Doesn’t return a result if transactions enabled.
- rename(dn: str, new_rdn: str, new_base_dn: str | None = None) None [source]¶
rename a dn in the ldap database; see ldap module. doesn’t return a result if transactions enabled.
Module contents¶
- class tldap.backend.DefaultConnectionProxy[source]¶
Bases:
object
Proxy for accessing the default DatabaseWrapper object’s attributes. If you need to access the DatabaseWrapper object itself, use connections[DEFAULT_LDAP_ALIAS] instead.
- tldap.backend.connections = <tldap.utils.ConnectionHandler object>¶
An object containing a list of all LDAP connections.