from .config import LDAPMigrationConfiguration
from .idict import CaseInsensitiveDict
+from .istringset import CaseInsensitiveStringSet
-__version__ = '0.6.6'
+__version__ = '0.6.7'
LOG = logging.getLogger(__name__)
CFG_BASENAME = 'ldap-migration.ini'
self.attribute_types = CaseInsensitiveDict()
self.dns = CaseInsensitiveDict()
self.struct_dns = CaseInsensitiveDict()
+ self.integer_attribute_types = CaseInsensitiveStringSet([])
super(LDAPMigrationApplication, self).__init__(
appname=appname, verbose=verbose, version=version, base_dir=base_dir,
res['cfg_file'] = self.cfg_file
res['dns'] = self.dns.as_dict(short=short)
res['struct_dns'] = self.struct_dns.as_dict(short=short)
+ res['integer_attribute_types'] = self.integer_attribute_types.as_list()
return res
self.discover_target_object_classes()
self.discover_target_attribute_types()
+ self.discover_integer_attribute_types()
# -------------------------------------------------------------------------
def discover_target_object_classes(self):
else:
LOG.debug("Discovered AttributeTypes:\n" + pp(list(self.attribute_types.keys())))
+ # -------------------------------------------------------------------------
+ def discover_integer_attribute_types(self):
+
+ for key in self.attribute_types.keys():
+ attribute_type = self.attribute_types[key]
+ if not attribute_type['syntax']:
+ continue
+ if attribute_type['syntax'] == '1.3.6.1.4.1.1466.115.121.1.27':
+ self.integer_attribute_types.add(key)
+
+ if self.verbose > 2:
+ LOG.debug("Discovered Integer AttributeTypes:\n" + pp(
+ self.integer_attribute_types.as_list()))
+
# -------------------------------------------------------------------------
def check_tmp_dir(self):
"""Checking existence of temp-dir and creating it, if necessary."""