summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-13 11:10:37 -0500
committerRob Crittenden <rcritten@redhat.com>2010-12-13 17:58:43 -0500
commit8a534bf07b55b20566c50211c9f90d638aead3da (patch)
tree8573bdf703d2f00e52f5e74c756141d933f8aff9 /ipalib/errors.py
parentced639eb990792dd01213063f23c3be265adcb3b (diff)
downloadfreeipa-8a534bf07b55b20566c50211c9f90d638aead3da.tar.gz
freeipa-8a534bf07b55b20566c50211c9f90d638aead3da.tar.xz
freeipa-8a534bf07b55b20566c50211c9f90d638aead3da.zip
Give the memberof plugin time to work when adding/removing reverse members.
When we add/remove reverse members it looks like we're operating on group A but we're really operating on group B. This adds/removes the member attribute on group B and the memberof plugin adds the memberof attribute into group A. We need to give the memberof plugin a chance to do its work so loop a few times, reading the entry to see if the number of memberof is more or less what we expect. Bail out if it is taking too long. ticket 560
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index f99a3a45a..a06e5bcce 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1158,6 +1158,23 @@ class ManagedGroupExistsError(ExecutionError):
errno = 4024
format = _('Unable to create private group. Group \'%(group)s\' already exists.')
+
+class ReverseMemberError(ExecutionError):
+ """
+ **4025** Raised when verifying that all reverse members have been added or removed.
+
+ For example:
+
+ >>> raise ReverseMemberError(verb=u'added', exc=u'Group \'foo\' not found.')
+ Traceback (most recent call last):
+ ...
+ A problem was encounted when verifying that all members were added: Group 'foo' not found.
+ """
+
+ errno = 4025
+ format = _('A problem was encounted when verifying that all members were %(verb)s: %(exc)s')
+
+
class BuiltinError(ExecutionError):
"""
**4100** Base class for builtin execution errors (*4100 - 4199*).