interface documentation

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 setPassword Set all applicable passwords for this object.
Method undo Forget all pending changes.
def __delitem__(self, key): (source)

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']})

def __setitem__(self, key, value): (source)

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']

def commit(self): (source)

Send all pending changes to the LDAP server. @returns: a Deferred that fires True (operation succeeded) or False (operation failed).

def delete(self): (source)

Delete this object from the LDAP server. @return: A Deferred that will complete when the delete is done.

def move(self, newDN): (source)

Move the object to a new DN. @param newDN: the new DistinguishedName @return: A Deferred that will complete when the move is done.

def setPassword(self, newPasswd): (source)

Set all applicable passwords for this object. @param newPasswd: A string containing the new password. @return: A Deferred that will complete when the operation is done.

def undo(self): (source)

Forget all pending changes.