from .idict import CaseInsensitiveDict
from .istringset import CaseInsensitiveStringSet
-__version__ = '0.8.4'
+__version__ = '0.8.5'
LOG = logging.getLogger(__name__)
CFG_BASENAME = 'ldap-migration.ini'
self.struct_dns = CaseInsensitiveDict()
self.migrated_entries = CaseInsensitiveDict()
self.integer_attribute_types = CaseInsensitiveStringSet([])
+ self.src_items_not_found = CaseInsensitiveStringSet([])
super(LDAPMigrationApplication, self).__init__(
appname=appname, verbose=verbose, version=version, base_dir=base_dir,
except ReadLDAPItemError as e:
msg = "Could not get source item: " + str(e)
LOG.error(msg)
+ self.write_result_file(fh, src_dn, '!')
+ self.src_items_not_found.add(src_dn)
continue
print()
self.get_structural_dns()
self.migrate_entries()
if self.verbose > 1:
- mlist = []
+ print()
+ print(self.colored('Migrated items:', 'GREEN'))
+ print(self.colored('###############', 'GREEN'))
for key in self.migrated_entries:
- dn = self.migrated_entries[key]
- mlist.append(dn)
- LOG.debug("Migrated items:\n{}".format(pp(mlist)))
+ print(self.colored(' * {!r}'.format(key), 'GREEN'))
+ if len(self.src_items_not_found):
+ print()
+ print(self.colored('Not migrated items:', 'CYAN'))
+ print(self.colored('###################', 'CYAN'))
+ for dn in self.src_items_not_found:
+ print(self.colored(' * {!r}'.format(dn), 'CYAN'))
+
finally:
self.disconnect()