tldap.backend.fake_transactions
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)[source]
The LDAP connection class.
-
add(dn, modlist, onfailure=None)[source]
Add a DN to the LDAP database; See ldap module. Doesn’t return a result
if transactions enabled.
-
commit()[source]
Attempt to commit all changes to LDAP database. i.e. forget all
rollbacks. However stay inside transaction management.
-
delete(dn, onfailure=None)[source]
delete a dn in the ldap database; see ldap module. doesn’t return a
result if transactions enabled.
-
enter_transaction_management()[source]
Start a transaction.
-
fail()[source]
for testing purposes only. always fail in commit
-
is_dirty()[source]
Are there uncommitted changes?
-
is_managed()[source]
Are we inside transaction management?
-
leave_transaction_management()[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, modlist, onfailure=None)[source]
Modify a DN in the LDAP database; See ldap module. Doesn’t return a
result if transactions enabled.
-
modify_no_rollback(dn, modlist)[source]
Modify a DN in the LDAP database; See ldap module. Doesn’t return a
result if transactions enabled.
-
rename(dn, newrdn, new_base_dn=None, onfailure=None)[source]
rename a dn in the ldap database; see ldap module. doesn’t return a
result if transactions enabled.
-
reset()[source]
Reset transaction back to original state, discarding all
uncompleted transactions.
-
rollback()[source]
Roll back to previous database state. However stay inside transaction
management.