From 8a534bf07b55b20566c50211c9f90d638aead3da Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 13 Dec 2010 11:10:37 -0500 Subject: 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 --- ipalib/errors.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ipalib/errors.py') 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*). -- cgit