ldapsync: add a --source-filter parameter
This commit is contained in:
parent
d3d8d3e8f5
commit
9797c45ead
|
@ -61,6 +61,8 @@ Base DN of the source is remapped to another DN in the target directory''')
|
|||
help='bind DN for a source LDAP directory')
|
||||
parser.add_argument('--source-bind-password',
|
||||
help='bind password for a source LDAP directory')
|
||||
parser.add_argument('--source-filter',
|
||||
help='filter to apply to a source LDAP directory')
|
||||
|
||||
parser.add_argument('--target-uri',
|
||||
type=source_uri,
|
||||
|
@ -112,7 +114,8 @@ Base DN of the source is remapped to another DN in the target directory''')
|
|||
elif options.source_bind_dn and options.source_bind_password:
|
||||
conn.simple_bind_s(options.source_bind_dn, options.source_bind_password)
|
||||
|
||||
source = ldap_source.LDAPSource(conn, base_dn=options.source_base_dn, attributes=attributes)
|
||||
source = ldap_source.LDAPSource(conn, base_dn=options.source_base_dn, attributes=attributes,
|
||||
filterstr=options.source_filter)
|
||||
|
||||
if options.verbose:
|
||||
print 'to', options.target_uri
|
||||
|
|
Loading…
Reference in New Issue