class LDAPEntryWithClient(entry.EditableLDAPEntry): (source)
Known subclasses: ldaptor.protocols.ldap.ldapsyntax.LDAPEntryWithAutoFill
Implements interfaces: ldaptor.interfaces.IConnectedLDAPEntry
, ldaptor.interfaces.IEditableLDAPEntry
, ldaptor.interfaces.ILDAPEntry
Undocumented
Method | __contains__ |
TODO |
Method | __delitem__ |
Delete all values of an attribute. |
Method | __eq__ |
Comparison. Only equality is supported. |
Method | __getitem__ |
Get all values of an attribute. |
Method | __hash__ |
Undocumented |
Method | __init__ |
Initialize the object. |
Method | __len__ |
TODO |
Method | __ne__ |
Inequality comparison. See L{__eq__}. |
Method | __nonzero__ |
Always return True |
Method | __repr__ |
Undocumented |
Method | __setitem__ |
Set values of an attribute. Please use lists. Do not modify the lists in place, that's not supported _yet_. |
Method | add |
Undocumented |
Method | bind |
Try to authenticate with given secret. |
Method | build |
Undocumented |
Method | commit |
Send all pending changes to the LDAP server. |
Method | delete |
Delete this object from the LDAP server. |
Method | fetch |
Fetch the attributes of this object from the server. |
Method | get |
Get all values of an attribute. |
Method | has |
TODO |
Method | items |
TODO |
Method | journal |
Add a Modification into the list of modifications that need to be flushed to the LDAP server. |
Method | keys |
TODO |
Method | lookup |
Lookup the referred to by dn. |
Method | move |
Move the object to a new DN. |
Method | naming |
Return an LDAPEntry for the naming context that contains this object. |
Method | search |
Perform an LDAP search with this object as the base. |
Method | set |
Update the password for the entry with a new password and salt passed as bytes. |
Method | set |
Set the password on this object. |
Method | set |
Set the Samba password on this object. |
Method | set |
Set the Samba password on this object if it is a sambaSamAccount or sambaAccount. |
Method | to |
Undocumented |
Method | undo |
Forget all pending changes. |
Instance Variable | client |
Undocumented |
Instance Variable | complete |
Undocumented |
Instance Variable | dn |
Undocumented |
Method | _assert |
Undocumented |
Method | _can |
Called by JournaledLDAPAttributeSet when it is about to remove a value of an attributeType. |
Method | _can |
Called by JournaledLDAPAttributeSet when it is about to remove all values of an attributeType. |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _check |
Undocumented |
Method | _commit |
Undocumented |
Method | _eb |
Undocumented |
Method | _handle |
Undocumented |
Method | _set |
Undocumented |
Class Variable | _set |
Undocumented |
Class Variable | _set |
Undocumented |
Instance Variable | _journal |
Undocumented |
Instance Variable | _remote |
Undocumented |
Instance Variable | _state |
State of an LDAPEntry is one of: |
Inherited from BaseLDAPEntry
(via EditableLDAPEntry
):
Method | __bool__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | diff |
Compute differences between this and another LDAP entry. |
Method | get |
Undocumented |
Method | has |
Undocumented |
Method | _bind |
Undocumented |
Class Variable | _object |
Undocumented |
Class Variable | _object |
Undocumented |
Class Variable | _user |
Undocumented |
Instance Variable | _attributes |
Undocumented |
Inherited from WireStrAlias
(via EditableLDAPEntry
, BaseLDAPEntry
):
Method | __str__ |
Undocumented |
Delete all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={ ... 'anAttribute': ['itsValue', 'secondValue'], ... 'another': ['moreValues'], ... }) >>> del o['anAttribute'] >>> o LDAPEntry(dn='cn=foo,dc=example,dc=com', attributes={'another': ['moreValues']})
ldaptor.entry.BaseLDAPEntry.__eq__
Comparison. Only equality is supported. >>> client=ldapclient.LDAPClient() >>> a=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> b=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> a==b 1 >>> c=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='ou=different,dc=example,dc=com') >>> a==c 0 Comparison does not consider the client of the object. >>> anotherClient=ldapclient.LDAPClient() >>> d=LDAPEntry(client=anotherClient, ... dn='dc=example,dc=com') >>> a==d 1
ldaptor.entry.BaseLDAPEntry.__getitem__
Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o['anAttribute'] ['itsValue']
ldaptor.entry.BaseLDAPEntry.__init__
ldaptor.protocols.ldap.ldapsyntax.LDAPEntryWithAutoFill
Initialize the object. @param client: The LDAP client connection this object belongs to. @param dn: Distinguished Name of the object, as a string. @param attributes: Attributes of the object. A dictionary of attribute types to list of attribute values.
Set values of an attribute. Please use lists. Do not modify the lists in place, that's not supported _yet_. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o['anAttribute']=['foo', 'bar'] >>> o['anAttribute'] ['bar', 'foo']
ldaptor.entry.BaseLDAPEntry.bind
Try to authenticate with given secret. @return: Deferred ILDAPEntry (that is, self). @raise ldaperrors.LDAPInvalidCredentials: password was incorrect.
ldaptor.entry.EditableLDAPEntry.commit
Send all pending changes to the LDAP server. @returns: a Deferred that fires True (operation succeeded) or False (operation failed).
ldaptor.entry.EditableLDAPEntry.delete
Delete this object from the LDAP server. @return: A Deferred that will complete when the delete is done.
Fetch the attributes of this object from the server. @param attributes: Attributes to fetch. If none, fetch all attributes. Fetched attributes are overwritten, and if fetching all attributes, attributes that are not on the server are removed. @return: A Deferred that will complete when the operation is done.
ldaptor.entry.BaseLDAPEntry.get
Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o.get('anAttribute') ['itsValue'] >>> o.get('foo') >>> o.get('foo', []) []
ldaptor.protocols.ldap.ldapsyntax.LDAPEntryWithAutoFill
Add a Modification into the list of modifications that need to be flushed to the LDAP server. Normal callers should not use this, they should use the o['foo']=['bar', 'baz'] -style API that enforces schema, handles errors and updates the cached data.
Lookup the referred to by dn. @return: A Deferred returning an ILDAPEntry, or failing with e.g. LDAPNoSuchObject.
ldaptor.entry.EditableLDAPEntry.move
Move the object to a new DN. @param newDN: the new DistinguishedName @return: A Deferred that will complete when the move is done.
Perform an LDAP search with this object as the base. @param filterText: LDAP search filter as a string. @param 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. @param attributes: List of attributes to retrieve for the result objects. An empty list and means all. @param scope: Whether to recurse into subtrees. @param derefAliases: Whether to deref LDAP aliases. TODO write better documentation. @param sizeLimit: At most how many entries to return. 0 means unlimited. @param timeLimit: At most how long to use for processing the search request. 0 means unlimited. @param typesOnly: Whether to return attribute types only, or also values. @param 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. @return: 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.
Set the password on this object. @param newPasswd: A string containing the new password. @return: A Deferred that will complete when the operation is done.
Set the Samba password on this object. @param newPasswd: A string containing the new password. @param style: one of 'sambaSamAccount', 'sambaAccount' or None. Specifies the style of samba accounts used. None is default and is the same as 'sambaSamAccount'. @return: A Deferred that will complete when the operation is done.
Set the Samba password on this object if it is a sambaSamAccount or sambaAccount. @param newPasswd: A string containing the new password. @return: A Deferred that will complete when the operation is done.