from .config import LDAPMigrationConfiguration
from .idict import CaseInsensitiveDict
-__version__ = '0.5.2'
+__version__ = '0.5.3'
LOG = logging.getLogger(__name__)
CFG_BASENAME = 'ldap-migration.ini'
new_dn = self.mangle_dn(old_dn)
if self.verbose > 2:
LOG.debug("Found DN {!r}.".format(old_dn))
- self.register_dn_tokens(old_dn, entry['attributes']['objectClass'])
+ self.register_dn_tokens(old_dn, entry['attributes']['objectClass'], self.dns)
fh.write("{old} => {new}\n".format(old=old_dn, new=new_dn))
# if item_count >= 100:
# break
LOG.info("Found {nr} structural items in subtree of {sfx!r}.".format(
nr=count_dns, sfx=self.config.suffix))
+ if self.verbose > 2:
+ LOG.debug("Registred structural DN tokens:\n{}".format(pp(self.struct_dns.as_dict())))
# -------------------------------------------------------------------------
def _get_structural_dns(self, fh, cur_hash, count_dns, is_root=False):
count_dns += 1
+ self.register_dn_tokens(my_dn, cur_hash['object_classes'], cur_hash=self.struct_dns)
+
for key in cur_hash['childs'].keys():
count_dns = self._get_structural_dns(fh, cur_hash['childs'][key], count_dns, False)