search(self,
filterText=None,
filterObject=None,
attributes=(),
scope=None,
derefAliases=None,
sizeLimit=0,
timeLimit=0,
typesOnly=0,
callback=None)
| source code
|
Perform an LDAP search with this object as the base.
- Parameters:
filterText - LDAP search filter as a string.
filterObject - LDAP search filter as LDAPFilter. Note if both filterText and
filterObject are given, they are combined with AND. If neither is
given, the search is made with a filter that matches everything.
attributes - List of attributes to retrieve for the result objects. An empty
list and means all.
scope - Whether to recurse into subtrees.
derefAliases - Whether to deref LDAP aliases. TODO write better documentation.
sizeLimit - At most how many entries to return. 0 means unlimited.
timeLimit - At most how long to use for processing the search request. 0
means unlimited.
typesOnly - Whether to return attribute types only, or also values.
callback - Callback function to call for each resulting LDAPEntry. None
means gather the results into a list and give that to the
Deferred returned from here.
- Returns:
- A Deferred that will complete when the search is done. The
Deferred gives None if callback was given and a list of the
search results if callback is not given or is None.
|