ObjectDef(object_class=None, schema=None, custom_validator=None)¶
Represent an object in the LDAP server. AttrDefs are stored in a dictionary; the key is the friendly name defined in AttrDef.
AttrDefs can be added and removed using the += ad -= operators
ObjectDef can be accessed either as a sequence and a dictionary. When accessed the whole AttrDef instance is returned
Add an AttrDef to the ObjectDef. Can be called with the += operator. :param definition: the AttrDef object to add, can also be a string containing the name of attribute to add. Can be a list of both
Empty the ObjectDef attribute list
Remove an AttrDef from the ObjectDef. Can be called with the -= operator. :param item: the AttrDef to remove, can also be a string containing the name of attribute to remove