class IEditableLDAPEntry(Interface): (source)
Known implementations: ldaptor.entry.EditableLDAPEntry
, ldaptor.protocols.ldap.ldapsyntax.LDAPEntryWithClient
Interface definition for editable LDAP entries.
Method | __delitem__ |
Delete all values of an attribute. |
Method | __setitem__ |
Set values of an attribute. Please use lists. Do not modify the lists in place, that's not supported _yet_. |
Method | commit |
Send all pending changes to the LDAP server. |
Method | delete |
Delete this object from the LDAP server. |
Method | move |
Move the object to a new DN. |
Method | set |
Set all applicable passwords for this object. |
Method | undo |
Forget all pending changes. |
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']})
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']
Send all pending changes to the LDAP server. @returns: a Deferred that fires True (operation succeeded) or False (operation failed).
Delete this object from the LDAP server. @return: A Deferred that will complete when the delete is done.
Move the object to a new DN. @param newDN: the new DistinguishedName @return: A Deferred that will complete when the move is done.