From 1dd9e1407361bdd6ed337c70dcb1d209ce034cb6 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 1 Jul 2011 15:32:31 -0400 Subject: Optionally wait for 389-ds postop plugins to complete Add a new command that lets you wait for an attribute to appear in a value. Using this you can do things like wait for a managed entry to be created, adding a new objectclass to the parent entry. This is controlled by a new booleon option, wait_for_attr, defaulting to False. https://fedorahosted.org/freeipa/ticket/1144 --- ipalib/plugins/user.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ipalib/plugins/user.py') diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index e6060c0f..3068c629 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -402,6 +402,11 @@ class user_add(LDAPCreate): self.api.Command['user_mod'](keys[-1], **kw) except (errors.EmptyModlist, errors.NotFound): pass + else: + if self.api.env.wait_for_attr: + newentry = wait_for_value(ldap, dn, 'objectclass', 'mepOriginEntry') + entry_from_entry(entry_attrs, newentry) + return dn api.register(user_add) -- cgit