Package easyLDAP :: Module easyLDAP_class_tree :: Class easyLDAP_tree
[frames] | no frames]

Class easyLDAP_tree

source code

easyLDAP_class_base.easyLDAP --+
                               |
                              easyLDAP_tree

Instance Methods
 
__init__(self, dn_or_cachetree, bind_dn=None, bind_pw=None, filter='objectClass=*', config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base..., update_schema_cache=False, use_cache_history=True, ldapsession=None) source code
 
__len__(self) source code
 
__call__(self, **kwargs) source code
 
__deepcopy__(self, memo)
Creates a deepcopy of the easyLDAP tree class.
source code
 
__delitem__(self, dn) source code
 
refresh_cache(self)
dummy method, will be used in classes easyLDAP_object, easyLDAP_tree, etc.
source code
 
get_tree(self, linear=False, retrieve_data=False, hashed=False)
get_tree('DN')
source code
 
get_object_from_tree(self, dn) source code
 
has_dn(self, dn)
thisClass.has_dn ('myDN')
source code
 
get_tree_basedn(thisClass)
returns the base DN of the cached easyLDAPtree.
source code
 
get_tree_depth(self) source code
 
get_tree_dnlist(self) source code
 
get_tree_hash(self) source code
 
get_tree_pyldap(self) source code
 
get_subtree_data(self, dn) source code
 
get_subtree_cachetree(self, dn) source code
 
get_subtree(self, dn) source code
 
has_parent_dn(self, dn)
thisClass.has_parent_dn ('myDN')
source code
 
new_object(self, object_dn, object_data=None) source code
 
remove_object(self, object_dn) source code
 
clear_cache(self) source code
 
show_cache(self) source code
 
flush_cache(self) source code
 
push_cache_history(self) source code
 
undo(self) source code
 
redo(self) source code
 
find_newUidNumber(self, min_uidNumber=None, max_uidNumber=None, searchbase=None)
self.find_newUidNumber (minUID,maxUID,myPEOPLEBASEDN)
source code
 
find_newGidNumber(self, min_gidNumber=None, max_gidNumber=None, searchbase=None)
searches the connected LDAP server for the lowest vacant gidNumber between minGID and maxGID.
source code

Inherited from easyLDAP_class_base.easyLDAP: __del__, adminbind, adminbind_norefresh, anonymous_bind, anonymous_bind_norefresh, attrtype_needs_objectclass, bind, bind_norefresh, check_objectclass_dependencies, cn_bind, cn_bind_norefresh, generate_attributetypes_dict, generate_ldapsyntaxes_dict, generate_objectclass_dict, generate_reverse_attributetypes_dict, get_admin_dn, get_attributetypes, get_attrtype_aliases, get_basedn, get_cache_reference, get_groups_basedn, get_hosts_basedn, get_objectclasses, get_parent_dn, get_parent_rdn, get_people_basedn, get_samba3_algorithmicRidBase, get_samba3_domainSID, get_samelevel_dns, get_sublevel_dns, get_sublevel_rdns, get_subtree_dns, get_used_attroptions, get_used_attrtype_oids, get_used_attrtypes, has_oid_set, has_samba2_schema, has_samba3_schema, has_valid_attrtype, is_collectiveattr, is_nousermodattr, is_obsoleteattr, is_pyldapobject, is_pyldaptree, is_singlevalueattr, is_valid_attrtype, is_valid_objectclass, map_attrtype2ldapsyntax, map_attrtype2ldapsyntaxname, map_attrtype2ldapsyntaxoid, map_attrtype2objectclasses, map_attrtype2valuemaxlen, map_attrtypes2oids, map_cn2dn, map_dn2ufn, map_gid2dn, map_gid2gidNumber, map_gidNumber2gid, map_objectclass2attr, map_oid2attrtypes, map_ou2dn, map_uid2dn, map_uid2posixgroups, map_uid2uniquemembergroups, map_uidNumber2uid, search, show_objectclass, uid_bind, uid_bind_norefresh

Class Variables
  SearchFilter = 'objectClass=*'
Method Details

__init__(self, dn_or_cachetree, bind_dn=None, bind_pw=None, filter='objectClass=*', config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base..., update_schema_cache=False, use_cache_history=True, ldapsession=None)
(Constructor)

source code 
Overrides: easyLDAP_class_base.easyLDAP.__init__

__deepcopy__(self, memo)

source code 

Creates a deepcopy of the easyLDAP tree class.

Overrides: easyLDAP_class_base.easyLDAP.__deepcopy__

refresh_cache(self)

source code 

dummy method, will be used in classes easyLDAP_object, easyLDAP_tree, etc.

Overrides: easyLDAP_class_base.easyLDAP.refresh_cache
(inherited documentation)

get_tree(self, linear=False, retrieve_data=False, hashed=False)

source code 

get_tree('DN')

returns the data of a single ldap object from the cached easyLDAP tree.

has_dn(self, dn)

source code 

thisClass.has_dn ('myDN')

checks, if the given distinguished name 'myDN' exists in the server's LDAP directory. The searches starts with the thisClass.BaseDN.

Overrides: easyLDAP_class_base.easyLDAP.has_dn
(inherited documentation)

has_parent_dn(self, dn)

source code 

thisClass.has_parent_dn ('myDN')

tests the existence of the referred object with a live search request to the LDAP server.

Overrides: easyLDAP_class_base.easyLDAP.has_parent_dn

find_newUidNumber(self, min_uidNumber=None, max_uidNumber=None, searchbase=None)

source code 

self.find_newUidNumber (minUID,maxUID,myPEOPLEBASEDN)

live searches the connected LDAP server for the lowest vacant uidNumber between minUID and maxUID.

If myPEOPLEBASEDN is not specified, the easyLDAP thisClass.PeoplebaseDN is presumed.

The method only checks vacant uidNumber in the connected LDAP tree. Other sources for posixUserIDs (/etc/passwd, NIS, etc.) are not taken into consideration!

If an error occurs or no vacant uidNumber can be found, the method returns '-1'.

Overrides: easyLDAP_class_base.easyLDAP.find_newUidNumber

find_newGidNumber(self, min_gidNumber=None, max_gidNumber=None, searchbase=None)

source code 

searches the connected LDAP server for the lowest vacant gidNumber between minGID and maxGID.

If myGROUPSBASEDN is not specified, the easyLDAP thisClass.GroupBaseDN is presumed.

The method only checks vacant gidNumber in the connected LDAP tree. Other sources for posixGroupIDs (/etc/groups, NIS, etc.) are not taken into consideration!

If an error occurs or no vacant gidNumber can be found, the method returns '-1'.

Overrides: easyLDAP_class_base.easyLDAP.find_newGidNumber