diff --git a/plsc_flat.py b/plsc_flat.py index 9ef14d0..91b6993 100755 --- a/plsc_flat.py +++ b/plsc_flat.py @@ -58,17 +58,6 @@ def create(src, dst): co_dn = f"dc=flat,dc={service},{dst.basedn}" - # Create flat dn if it doesn't exist - flat_dns = dst.rfind(f"dc={service}", "(&(objectClass=dcObject)(dc=flat))") - if len(flat_dns) == 0: - flat_dn = f"dc=flat,dc={service},{dst.basedn}" - flat_entry = {'objectClass': ['dcObject', 'organizationalUnit'], 'dc': ['flat'], 'ou': ['flat']} - dst.add(flat_dn, flat_entry) - for ou in ['Groups', 'People']: - ou_dn = 'ou=' + ou + ',' + flat_dn - ou_entry = {'objectClass': ['top', 'organizationalUnit'], 'ou': [ou]} - dst.add(ou_dn, ou_entry) - logging.debug(" - People") src_dns = src.rfind(f"ou=People,o={co_id},dc=ordered,dc={service}", '(ObjectClass=person)')