summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-10-05 14:34:47 -0400
committerRob Crittenden <rcritten@redhat.com>2010-10-06 09:20:41 -0400
commit9832780414703e49671b380c7e3042581ecfe70c (patch)
treec2773605bb116dbbb1cd4d9c53096d1d53978d64
parentbf053652bc5ae563c626ac39b735e957c7a9e0d3 (diff)
downloadfreeipa-9832780414703e49671b380c7e3042581ecfe70c.tar.gz
freeipa-9832780414703e49671b380c7e3042581ecfe70c.tar.xz
freeipa-9832780414703e49671b380c7e3042581ecfe70c.zip
Add 'continuous' mode to LDAPDelete. Fix *-del unit tests.
Ticket #321
-rw-r--r--ipalib/plugins/baseldap.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 42d9017ff..2335a7a2b 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -353,6 +353,13 @@ class LDAPMultiQuery(LDAPQuery):
"""
Base class for commands that need to retrieve one or more existing entries.
"""
+ takes_options = (
+ Flag('continue',
+ cli_name='continue',
+ doc=_('Continuous mode: Don\'t stop on errors.'),
+ ),
+ )
+
def get_args(self):
for key in self.obj.get_ancestor_primary_keys():
yield key
@@ -594,6 +601,8 @@ class LDAPDelete(LDAPMultiQuery):
if not delete_entry(pkey):
result = False
except errors.ExecutionError:
+ if not options.get('continuous', False):
+ raise
failed.append(pkey)
else:
deleted.append(pkey)