from ..argparse_actions import NonNegativeItegerOptionAction
from ..argparse_actions import LimitedFloatOptionAction
-__version__ = '0.6.0'
+__version__ = '0.6.1'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
self.src_connect_info = None
self.tgt_connect_info = None
- self.src_dns = []
+ self.src_dns = CIDict()
+ self.src_struct_dns = CIStringSet()
+
self.tgt_dns_current = CIDict()
+ self.tgt_struct_dns_current = CIStringSet()
self.limit = 0
self.wait_after_write = self.default_wait_after_write
msg = _("Found DNs in instance {!r}:").format(self.src_instance)
LOG.debug(msg + '\n' + pp(sorted_dns))
+ self.src_struct_dns = CIStringSet()
+ for dn in sorted_dns:
+
+ entry = self.src_dns[dn]
+ if not entry['childs']:
+ continue
+ self.src_struct_dns.add(dn)
+
+ if self.verbose > 2:
+ msg = _("Found structural DNs in instance {!r}:").format(self.src_instance)
+ LOG.debug(msg + '\n' + pp(self.src_struct_dns.as_list()))
+
# -------------------------------------------------------------------------
def get_current_tgt_entries(self):
"""Get DNs of all entries in the target LDAP instance and sort them."""
msg = _("Found DNs in instance {!r}:").format(self.tgt_instance)
LOG.debug(msg + '\n' + pp(sorted_dns))
+ self.tgt_struct_dns_current = CIStringSet()
+ for dn in sorted_dns:
+
+ entry = self.tgt_dns_current[dn]
+ if not entry['childs']:
+ continue
+ self.tgt_struct_dns_current.add(dn)
+
+ if self.verbose > 2:
+ msg = _("Found structural DNs in instance {!r}:").format(self.tgt_instance)
+ LOG.debug(msg + '\n' + pp(self.tgt_struct_dns_current.as_list()))
+
# -------------------------------------------------------------------------
def eval_sync_entries(self):
"""Evaluating entries, which have to be synced, instead of to be removed and recreated."""