univention.connector package
Contents
univention.connector package¶
- univention.connector.set_ucs_passwd_user(connector, key, ucs_object)[source]¶
set random password to fulfill required values
- univention.connector.check_ucs_lastname_user(connector, key, ucs_object)[source]¶
check if required values for lastname are set
- univention.connector.set_primary_group_user(connector, key, ucs_object)[source]¶
check if correct primary group is set
- class univention.connector.attribute(ucs_attribute='', ldap_attribute='', con_attribute='', con_other_attribute='', required=0, single_value=False, compare_function='', mapping=(), reverse_attribute_check=False, sync_mode='sync', con_depends='', con_attribute_encoding='UTF-8')[source]¶
Bases:
object
A mapping attribute description
- Parameters
ucs_attribute (str) – The property name of the object in UDM
ldap_attribute (str) – The LDAP attribute name of the object in UCS LDAP
con_attribute (str) – The LDAP attribute name of the object in AD LDAP
con_other_attribute (str) – Further LDAP attribute name of the object in AD LDAP.
required (bool) – unused
single_value (bool) – Whether the attribute is single_value in the AD LDAP.
compare_function (callable) – A comparision function which compares raw ldap attribute values.
mapping – Mapping functions for (sync_to_ad, sync_to_ucs)
reverse_attribute_check – Make a reverse check of this mapping, if the mapping is not 1:1.
sync_mode – The syncronization direction (read, write, sync)
- Ptype mapping
tuple
- Ptype reverse_attribute_check
bool
- Ptype sync_mode
str
- class univention.connector.property(ucs_default_dn='', con_default_dn='', ucs_module='', ucs_module_others=[], sync_mode='', scope='', con_search_filter='', ignore_filter=None, match_filter=None, ignore_subtree=[], con_create_objectclass=[], con_create_attributes=[], dn_mapping_function=[], attributes=None, ucs_create_functions=[], post_con_create_functions=[], post_con_modify_functions=[], post_ucs_modify_functions=[], post_attributes=None, mapping_table=None, position_mapping=[], con_subtree_delete_objects=[])[source]¶
Bases:
object
- class univention.connector.ucs(CONFIGBASENAME, _property, configRegistry, listener_dir, logfilename, debug_level)[source]¶
Bases:
object
- search_ucs(filter='(objectClass=*)', base='', scope='sub', attr=[], unique=0, required=0, timeout=- 1, sizelimit=0)[source]¶
- poll_ucs()[source]¶
poll changes from UCS: iterates over files exported by directory-listener module
- sync_to_ucs(property_type, object, pre_mapped_ad_dn, original_object)[source]¶
Synchronize an object from AD-LDAP to UCS Open-LDAP.
- Parameters
property_type – the type of the object to be synced, must be part of the mapping. (e.g. “user”, “group”, “dc”, “windowscomputer”, etc.)
object – A dictionary describing the AD object. modtype: A modification type (“add”, “modify”, “move”, “delete”) dn: The DN of the object in the UCS-LDAP olddn: The olddn of the object object in UCS-LDAP (e.g. on “move” operation)
pre_mapped_ad_dn – pass
original_object – pass
- Ptype object
dict