tldap.base¶
Contains base class used for tldap objects.
-
class
tldap.base.
LDAPobject
(using=None, settings=None, **kwargs)[source]¶ The base class used for tldap objects.
-
dn
¶ Get the current dn.
-
classmethod
get_default_base_dn
(using, settings)[source]¶ Get the default base_dn for this class.
Parameters: - cls – This class.
- using – The LDAP database alias.
- settings – A set of parameters that may be useful in derived classes.
Returns: Fully qualified base dn. May be None if unsuccessful.
-
rename
(new_base_dn=None, **kwargs)[source]¶ Rename this entry. Use like object.rename(uid=”new”) or object.rename(cn=”new”). Can pass a list in using, as all connections must be renamed at once.
Parameters: - self – object to rename.
- new_base_dn – move entry to this parent.
- kwargs – Contains new rdn of object.
-
save
(force_add=False, force_modify=False)[source]¶ Saves the current instance. Override this in a subclass if you want to control the saving process.
Parameters: - self – object to save.
- force_add – Assume object doesn’t already exist and must be created.
- force_modify – Assume oobject already exists and must be updated.
-
schema_list
= []¶ Class variable to be overriden for class that provides a list of schemas to be used.
-