diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-07-01 15:32:31 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-07-19 13:06:16 +0200 |
commit | 1dd9e1407361bdd6ed337c70dcb1d209ce034cb6 (patch) | |
tree | 1b81a20a3835de965f40f35195ea22fbbe731afc /ipalib/plugins/user.py | |
parent | c09f116f4331175b3fb01f0bd62e78ef47fab716 (diff) | |
download | freeipa-1dd9e1407361bdd6ed337c70dcb1d209ce034cb6.tar.gz freeipa-1dd9e1407361bdd6ed337c70dcb1d209ce034cb6.tar.xz freeipa-1dd9e1407361bdd6ed337c70dcb1d209ce034cb6.zip |
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
Diffstat (limited to 'ipalib/plugins/user.py')
-rw-r--r-- | ipalib/plugins/user.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index e6060c0f3..3068c6291 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) |