OPSI.ldaptor.inmemory module¶
-
class
OPSI.ldaptor.inmemory.
InMemoryLDIFProtocol
¶ Bases:
OPSI.ldaptor.protocols.ldap.ldifprotocol.LDIF
Receive LDIF data and gather results into an ReadOnlyInMemoryLDAPEntry.
You can override lookupFailed and addFailed to provide smarter error handling. They are called as Deferred errbacks; returning the reason causes error to pass onward and abort the whole operation. Returning None from lookupFailed skips that entry, but continues loading.
When the full LDIF data has been read, the completed Deferred will trigger.
-
addFailed
(reason, entry)¶
-
connectionLost
(reason)¶
-
gotEntry
(entry)¶
-
lookupFailed
(reason, entry)¶
-
-
exception
OPSI.ldaptor.inmemory.
LDAPCannotRemoveRootError
(message=None)¶ Bases:
OPSI.ldaptor.protocols.ldap.ldaperrors.LDAPNamingViolation
Cannot remove root of LDAP tree
-
class
OPSI.ldaptor.inmemory.
ReadOnlyInMemoryLDAPEntry
(*a, **kw)¶ Bases:
OPSI.ldaptor.entry.EditableLDAPEntry
,OPSI.ldaptor.entryhelpers.DiffTreeMixin
,OPSI.ldaptor.entryhelpers.SubtreeFromChildrenMixin
,OPSI.ldaptor.entryhelpers.MatchMixin
,OPSI.ldaptor.entryhelpers.SearchByTreeWalkingMixin
-
addChild
(rdn, attributes)¶ TODO ugly API. Returns the created entry.
-
children
(callback=None)¶
-
commit
()¶
-
delete
()¶
-
deleteChild
(rdn)¶
-
fetch
(*attributes)¶
-
lookup
(dn)¶
-
move
(newDN)¶
-
parent
()¶
-
-
OPSI.ldaptor.inmemory.
fromLDIFFile
(f)¶ Read LDIF data from a file.