univention.s4connector package¶
-
class
univention.s4connector.
attribute
(ucs_attribute='', ldap_attribute='', con_attribute='', con_other_attribute='', required=0, single_value=False, compare_function=None, mapping=(), reverse_attribute_check=False, sync_mode='sync', udm_option=None)[source]¶
-
univention.s4connector.
check_ucs_lastname_user
(s4connector, key, ucs_object)[source]¶ check if required values for lastname are set
-
univention.s4connector.
make_lower
(mlValue)[source]¶ lower string cases for mlValue which can be string or a list of values which can be given to mlValue
-
class
univention.s4connector.
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=[], con_create_extenstions=[], post_con_create_functions=[], post_con_modify_functions=[], post_ucs_modify_functions=[], post_attributes=None, mapping_table=None, position_mapping=[], con_sync_function=None, ucs_sync_function=None, disable_delete_in_ucs=False, identify=None, con_subtree_delete_objects=[])[source]¶
-
univention.s4connector.
set_primary_group_user
(s4connector, key, ucs_object)[source]¶ check if correct primary group is set
-
univention.s4connector.
set_ucs_passwd_user
(s4connector, key, ucs_object)[source]¶ set random password to fulfill required values
-
class
univention.s4connector.
ucs
(CONFIGBASENAME, _property, baseConfig, listener_dir)[source]¶ -
-
_filter_match
(filter, attributes)[source]¶ versucht eine Liste von Attributen auf einen LDAP-Filter zu matchen Besonderheiten des Filters: - immer case-sensitive - nur * als Wildcard - geht “lachser” mit Verschachtelten Klammern um
-
_get_last_entryCSN_commited_by_connector
(entryUUID)[source]¶ Remember the entryCSN of a change committed by the S4-Connector itself
-
_ignore_object
(key, object)[source]¶ parse if object should be ignored because of ignore_subtree or ignore_filter
Parameters: - key – the property_type from the mapping
- object – a mapped or unmapped S4 or UCS object
-
_object_mapping
(key, old_object, object_type='con')[source]¶ Create a mapped object from Samba or UCS object definition.
Parameters: - key – the mapping key
- old_object – the object definition in univention directory listener style
- object_type – “con” if old_object is a S4 object. “ucs” if old_object is a UCS object.
Ptype old_object: dict
Ptype object_type: str
-
_remember_entryCSN_commited_by_connector
(entryUUID, entryCSN)[source]¶ Remember the entryCSN of a change committed by the S4-Connector itself
-
_ucs__set_values
(property_type, object, ucs_object, modtype='modify')¶
-
_ucs__sync_file_from_ucs
(filename, append_error='', traceback_level=1)¶
-
delete_in_ucs
(property_type, object, module, position)[source]¶ Removes an Samba-4 object in UCS-LDAP
-
poll_ucs
()[source]¶ poll changes from UCS: iterates over files exported by directory-listener module
-
search_ucs
(filter='(objectClass=*)', base='', scope='sub', attr=[], unique=0, required=0, timeout=-1, sizelimit=0)[source]¶
-
sync_from_ucs
(property_type, object, pre_mapped_ucs_dn, old_dn=None, old_ucs_object=None, new_ucs_object=None)[source]¶
-
sync_to_ucs
(property_type, object, pre_mapped_s4_dn, original_object)[source]¶ Synchronize an object from Samba4-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 Samba 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_s4_dn – pass
- original_object – pass
Ptype object: dict
-
Subpackages¶
- univention.s4connector.s4 package
- Submodules
- univention.s4connector.s4.computer module
- univention.s4connector.s4.dc module
- univention.s4connector.s4.dns module
- univention.s4connector.s4.main module
- univention.s4connector.s4.mapping module
- univention.s4connector.s4.ntsecurity_descriptor module
- univention.s4connector.s4.password module
- univention.s4connector.s4.query_config module
- univention.s4connector.s4.sid_mapping module
- univention.s4connector.s4.user module
Submodules¶
univention.s4connector.lockingdb module¶
-
class
univention.s4connector.lockingdb.
LockingDB
(filename)[source]¶ A local database which includes the list of objects which are currently locked. That means the synchronisation of these objects has not been finished. https://forge.univention.org/bugzilla/show_bug.cgi?id=35391
-
_LockingDB__create_tables
()¶
-
_LockingDB__execute_sql_commands
(sql_commands, fetch_result=False)¶
-
univention.s4connector.s4cache module¶
-
class
univention.s4connector.s4cache.
S4Cache
(filename)[source]¶ Local cache for the current Samba 4 state of the s4connector. With this cache the connector has the possibility to create a diff between the new Samba 4 object and the old one from cache.
-
_S4Cache__create_tables
()¶
-
_S4Cache__execute_sql_commands
(sql_commands, fetch_result=False)¶
-