from .config import LDAPMigrationConfiguration
-__version__ = '0.9.5'
+__version__ = '0.9.6'
LOG = logging.getLogger(__name__)
CFG_BASENAME = 'ldap-migration.ini'
'extensions': object_class.extensions,
'experimental': object_class.experimental,
'raw_definition': object_class.raw_definition,
+ 'structural': False,
+ 'abstract': False,
}
+ if object_class.kind.lower() == 'abstract':
+ oc['abstract'] = True
+ elif object_class.kind.lower() == 'structural':
+ oc['structural'] = True
self.object_classes[oc_name] = oc
else:
oc_name = object_class.name
'extensions': object_class.extensions,
'experimental': object_class.experimental,
'raw_definition': object_class.raw_definition,
+ 'structural': False,
+ 'abstract': False,
}
+ if object_class.kind.lower() == 'abstract':
+ oc['abstract'] = True
+ elif object_class.kind.lower() == 'structural':
+ oc['structural'] = True
self.object_classes[oc_name] = oc
LOG.debug("Found {} ObjectClasses.".format(len(self.object_classes)))
used_classes.add('organizationalUnit')
object_classes.append('organizationalUnit')
+ has_structural = False
+ for oc in used_classes:
+ if self.object_classes[oc]['structural']:
+ has_structural = True
+ break
+ if not has_structural:
+ if 'mailRecipient' in used_classes:
+ used_classes.add('inetResource')
+ object_classes.append('inetResource')
+
return (object_classes, target_entry)
# -------------------------------------------------------------------------