Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-18 Thread Martin Kosek
On Sun, 2011-07-17 at 17:42 -0400, Rob Crittenden wrote:
 Rob Crittenden wrote:
  Martin Kosek wrote:
  On Tue, 2011-07-05 at 13:41 -0400, Rob Crittenden wrote:
  Rob Crittenden wrote:
  Rob Crittenden wrote:
  389-ds postop plugins, such as the managed entry and memberof plugins,
  add values after the data has been returned to the client. In the case
  of the managed entry plugin this affects the parent entry as well
  (adds
  an objectclass value).
 
  This wreaks havoc on our tests as the values don't match what we
  expect.
 
  The solution is to wait for the postop plugins to finish their work,
  then return. I've added this as an option. The downside is it is going
  to naturally slow things down, so it is off by default.
 
  It is currently only used in the hostgroup plugin.
 
  The option is wait_for_attr. Add this to ~/.ipa/default.conf and
  set it
  to True and all the current tests will pass (assuming you apply
  patches
  814-816 as well).
 
  So now we won't have any excuses for missing test failures in the unit
  tests...
 
  rob
 
  Bah, found a small problem. Self-NACK.
 
  rob
 
  Updated patch attached.
 
  Note that I don't think there is a way for us to handle things like
  memberof_indirect. We wouldn't know to wait.
 
  rob
 
  Works fine for the hostgroup entry. It's good it can be switched on/off.
 
  But what about other managed entries, like user entry? Would it make
  sense to add a wait here too? Or maybe something systematic to baseldap
  so that we wouldn't have to implement this wait to every managed entry.
 
  Martin
 
 
  I can certainly add it to users to check for managed groups. Making it
  generic would be difficult because some are conditional (such as users).
 
  rob
 
 Added support for managed users as well.
 
 rob

Waiting for managed users work too. However, I have just noticed that
the entire solution works only partially.

It waits for mepOriginEntry objectclass, but it doesn't add the new LDAP
attributes mepmanagedentry and memberof to the command-add result:

# ipa hostgroup-add hgroup3 --desc=foo --all --raw
-
Added hostgroup hgroup3
-
  dn: cn=hgroup3,cn=hostgroups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  cn: hgroup3
  description: foo
  ipauniqueid: 20d1b8e4-b114-11e0-ab28-00163e0ed706
  objectclass: ipaobject
  objectclass: ipahostgroup
  objectclass: nestedGroup
  objectclass: groupOfNames
  objectclass: top
  objectclass: mepOriginEntry
# ipa hostgroup-show hgroup3 --all --raw
  dn: cn=hgroup3,cn=hostgroups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  cn: hgroup3
  description: foo
  ipauniqueid: 20d1b8e4-b114-11e0-ab28-00163e0ed706
  memberof: cn=hgroup3,cn=ng,cn=alt,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com   

  mepmanagedentry: 
cn=hgroup3,cn=ng,cn=alt,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com   
  objectclass: ipaobject
  objectclass: ipahostgroup
  objectclass: nestedGroup
  objectclass: groupOfNames
  objectclass: top
  objectclass: mepOriginEntry

# ipa user-add --first=Foo --last=Bar fbar2 --all --raw
--
Added user fbar2
--
  dn: uid=fbar2,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  uid: fbar2
  givenname: Foo
  sn: Bar
  cn: Foo Bar
  displayname: Foo Bar
  initials: FB
  homedirectory: /home/fbar2
  gecos: Foo Bar
  loginshell: /bin/sh
  krbprincipalname: fb...@idm.lab.bos.redhat.com
  uidnumber: 52464
  gidnumber: 52464
  ipauniqueid: b22ab54c-b115-11e0-b354-00163e0ed706
  krbpwdpolicyreference: 
cn=global_policy,cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  objectclass: top
  objectclass: person
  objectclass: organizationalperson
  objectclass: inetorgperson
  objectclass: inetuser
  objectclass: posixaccount
  objectclass: krbprincipalaux
  objectclass: krbticketpolicyaux
  objectclass: ipaobject
  objectclass: mepOriginEntry
# ipa user-show fbar2 --all --raw
  dn: uid=fbar2,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  uid: fbar2
  givenname: Foo
  sn: Bar
  cn: Foo Bar
  displayname: Foo Bar
  initials: FB
  homedirectory: /home/fbar2
  gecos: Foo Bar
  loginshell: /bin/sh
  krbprincipalname: fb...@idm.lab.bos.redhat.com
  uidnumber: 52464
  gidnumber: 52464
  nsaccountlock: False
  ipauniqueid: b22ab54c-b115-11e0-b354-00163e0ed706
  krbpwdpolicyreference: 
cn=global_policy,cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
  memberof: 
cn=ipausers,cn=groups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com   
  mepmanagedentry: 
cn=fbar2,cn=groups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com   
  objectclass: top
  objectclass: person
  objectclass: organizationalperson
  objectclass: inetorgperson
  objectclass: inetuser
  objectclass: posixaccount
  objectclass: krbprincipalaux
  objectclass: krbticketpolicyaux
  objectclass: ipaobject
  objectclass: mepOriginEntry


I think there attributes should be added in 

Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-18 Thread Rob Crittenden

Martin Kosek wrote:

On Sun, 2011-07-17 at 17:42 -0400, Rob Crittenden wrote:

Rob Crittenden wrote:

Martin Kosek wrote:

On Tue, 2011-07-05 at 13:41 -0400, Rob Crittenden wrote:

Rob Crittenden wrote:

Rob Crittenden wrote:

389-ds postop plugins, such as the managed entry and memberof plugins,
add values after the data has been returned to the client. In the case
of the managed entry plugin this affects the parent entry as well
(adds
an objectclass value).

This wreaks havoc on our tests as the values don't match what we
expect.

The solution is to wait for the postop plugins to finish their work,
then return. I've added this as an option. The downside is it is going
to naturally slow things down, so it is off by default.

It is currently only used in the hostgroup plugin.

The option is wait_for_attr. Add this to ~/.ipa/default.conf and
set it
to True and all the current tests will pass (assuming you apply
patches
814-816 as well).

So now we won't have any excuses for missing test failures in the unit
tests...

rob


Bah, found a small problem. Self-NACK.

rob


Updated patch attached.

Note that I don't think there is a way for us to handle things like
memberof_indirect. We wouldn't know to wait.

rob


Works fine for the hostgroup entry. It's good it can be switched on/off.

But what about other managed entries, like user entry? Would it make
sense to add a wait here too? Or maybe something systematic to baseldap
so that we wouldn't have to implement this wait to every managed entry.

Martin



I can certainly add it to users to check for managed groups. Making it
generic would be difficult because some are conditional (such as users).

rob


Added support for managed users as well.

rob


Waiting for managed users work too. However, I have just noticed that
the entire solution works only partially.

It waits for mepOriginEntry objectclass, but it doesn't add the new LDAP
attributes mepmanagedentry and memberof to thecommand-add result:

# ipa hostgroup-add hgroup3 --desc=foo --all --raw
-
Added hostgroup hgroup3
-
   dn: 
cn=hgroup3,cn=hostgroups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   cn: hgroup3
   description: foo
   ipauniqueid: 20d1b8e4-b114-11e0-ab28-00163e0ed706
   objectclass: ipaobject
   objectclass: ipahostgroup
   objectclass: nestedGroup
   objectclass: groupOfNames
   objectclass: top
   objectclass: mepOriginEntry
# ipa hostgroup-show hgroup3 --all --raw
   dn: 
cn=hgroup3,cn=hostgroups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   cn: hgroup3
   description: foo
   ipauniqueid: 20d1b8e4-b114-11e0-ab28-00163e0ed706
   memberof: cn=hgroup3,cn=ng,cn=alt,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   mepmanagedentry: 
cn=hgroup3,cn=ng,cn=alt,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   objectclass: ipaobject
   objectclass: ipahostgroup
   objectclass: nestedGroup
   objectclass: groupOfNames
   objectclass: top
   objectclass: mepOriginEntry

# ipa user-add --first=Foo --last=Bar fbar2 --all --raw
--
Added user fbar2
--
   dn: uid=fbar2,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   uid: fbar2
   givenname: Foo
   sn: Bar
   cn: Foo Bar
   displayname: Foo Bar
   initials: FB
   homedirectory: /home/fbar2
   gecos: Foo Bar
   loginshell: /bin/sh
   krbprincipalname: fb...@idm.lab.bos.redhat.com
   uidnumber: 52464
   gidnumber: 52464
   ipauniqueid: b22ab54c-b115-11e0-b354-00163e0ed706
   krbpwdpolicyreference: 
cn=global_policy,cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   objectclass: top
   objectclass: person
   objectclass: organizationalperson
   objectclass: inetorgperson
   objectclass: inetuser
   objectclass: posixaccount
   objectclass: krbprincipalaux
   objectclass: krbticketpolicyaux
   objectclass: ipaobject
   objectclass: mepOriginEntry
# ipa user-show fbar2 --all --raw
   dn: uid=fbar2,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   uid: fbar2
   givenname: Foo
   sn: Bar
   cn: Foo Bar
   displayname: Foo Bar
   initials: FB
   homedirectory: /home/fbar2
   gecos: Foo Bar
   loginshell: /bin/sh
   krbprincipalname: fb...@idm.lab.bos.redhat.com
   uidnumber: 52464
   gidnumber: 52464
   nsaccountlock: False
   ipauniqueid: b22ab54c-b115-11e0-b354-00163e0ed706
   krbpwdpolicyreference: 
cn=global_policy,cn=IDM.LAB.BOS.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   memberof: 
cn=ipausers,cn=groups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   mepmanagedentry: 
cn=fbar2,cn=groups,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com
   objectclass: top
   objectclass: person
   objectclass: organizationalperson
   objectclass: inetorgperson
   objectclass: inetuser
   objectclass: posixaccount
   objectclass: krbprincipalaux
   objectclass: krbticketpolicyaux
   objectclass: ipaobject
   objectclass: mepOriginEntry


I think there attributes should be added in 

Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-17 Thread Rob Crittenden

Rob Crittenden wrote:

Martin Kosek wrote:

On Tue, 2011-07-05 at 13:41 -0400, Rob Crittenden wrote:

Rob Crittenden wrote:

Rob Crittenden wrote:

389-ds postop plugins, such as the managed entry and memberof plugins,
add values after the data has been returned to the client. In the case
of the managed entry plugin this affects the parent entry as well
(adds
an objectclass value).

This wreaks havoc on our tests as the values don't match what we
expect.

The solution is to wait for the postop plugins to finish their work,
then return. I've added this as an option. The downside is it is going
to naturally slow things down, so it is off by default.

It is currently only used in the hostgroup plugin.

The option is wait_for_attr. Add this to ~/.ipa/default.conf and
set it
to True and all the current tests will pass (assuming you apply
patches
814-816 as well).

So now we won't have any excuses for missing test failures in the unit
tests...

rob


Bah, found a small problem. Self-NACK.

rob


Updated patch attached.

Note that I don't think there is a way for us to handle things like
memberof_indirect. We wouldn't know to wait.

rob


Works fine for the hostgroup entry. It's good it can be switched on/off.

But what about other managed entries, like user entry? Would it make
sense to add a wait here too? Or maybe something systematic to baseldap
so that we wouldn't have to implement this wait to every managed entry.

Martin



I can certainly add it to users to check for managed groups. Making it
generic would be difficult because some are conditional (such as users).

rob


Added support for managed users as well.

rob
From e48613247d0fc2cf4fecc8365ebc1909fa891061 Mon Sep 17 00:00:00 2001
From: Rob Crittenden rcrit...@redhat.com
Date: Fri, 1 Jul 2011 15:32:31 -0400
Subject: [PATCH] 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/constants.py|1 +
 ipalib/plugins/baseldap.py |   32 
 ipalib/plugins/hostgroup.py|6 ++
 ipalib/plugins/user.py |4 
 tests/test_xmlrpc/objectclasses.py |4 +++-
 tests/test_xmlrpc/test_group_plugin.py |2 +-
 tests/test_xmlrpc/test_user_plugin.py  |2 +-
 7 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/ipalib/constants.py b/ipalib/constants.py
index 23e80257d0a9b513ceb2478411ede8bcf1acdbe9..026e0735441eabf8dbe63fffa85da69aa151c5d7 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -148,6 +148,7 @@ DEFAULT_CONFIG = (
 # Enable certain optional plugins:
 ('enable_ra', False),
 ('ra_plugin', 'selfsign'),
+('wait_for_attr', False),
 
 # Used when verifying that the API hasn't changed. Not for production.
 ('validate_api', False),
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 8d58422bd630c20dd44e56255a02103c504b292c..8d1002d1fc1da025de9598718fd3e9c007f5b1fd 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -238,6 +238,38 @@ def wait_for_memberof(keys, entry_start, completed, show_command, adding=True):
 
 return entry_attrs
 
+def wait_for_value(ldap, dn, attr, value):
+
+389-ds postoperation plugins are executed after the data has been
+returned to a client. This means that plugins that add data in a
+postop are not included in data returned to the user.
+
+The downside of waiting is that this increases the time of the
+command.
+
+# Loop a few times to give the postop-plugin a chance to complete
+# Don't sleep for more than 6 seconds.
+x = 0
+while x  20:
+# sleep first because the first search, even on a quiet system,
+# almost always fails.
+time.sleep(.3)
+x = x + 1
+
+# FIXME: put a try/except around here? I think it is probably better
+# to just let the exception filter up to the caller.
+(dn, entry_attrs) = ldap.get_entry( dn, ['*'])
+if attr in entry_attrs:
+if isinstance(entry_attrs[attr], (list, tuple)):
+values = map(lambda y:y.lower(), entry_attrs[attr])
+if value.lower() in values:
+break
+else:
+if value.lower() == entry_attrs[attr].lower():
+break
+
+return entry_attrs[attr]
+
 class LDAPObject(Object):
 
 Object representing a LDAP entry.
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index 11ed66376b343f7698e8e2bf32167b35f15bc0b8..3441a93b7356e14656d7f539a6636ac81d2e2645 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -98,6 

Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-15 Thread Martin Kosek
On Tue, 2011-07-05 at 13:41 -0400, Rob Crittenden wrote:
 Rob Crittenden wrote:
  Rob Crittenden wrote:
  389-ds postop plugins, such as the managed entry and memberof plugins,
  add values after the data has been returned to the client. In the case
  of the managed entry plugin this affects the parent entry as well (adds
  an objectclass value).
 
  This wreaks havoc on our tests as the values don't match what we expect.
 
  The solution is to wait for the postop plugins to finish their work,
  then return. I've added this as an option. The downside is it is going
  to naturally slow things down, so it is off by default.
 
  It is currently only used in the hostgroup plugin.
 
  The option is wait_for_attr. Add this to ~/.ipa/default.conf and set it
  to True and all the current tests will pass (assuming you apply patches
  814-816 as well).
 
  So now we won't have any excuses for missing test failures in the unit
  tests...
 
  rob
 
  Bah, found a small problem. Self-NACK.
 
  rob
 
 Updated patch attached.
 
 Note that I don't think there is a way for us to handle things like 
 memberof_indirect. We wouldn't know to wait.
 
 rob

Works fine for the hostgroup entry. It's good it can be switched on/off.

But what about other managed entries, like user entry? Would it make
sense to add a wait here too? Or maybe something systematic to baseldap
so that we wouldn't have to implement this wait to every managed entry.

Martin

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-15 Thread Rob Crittenden

Martin Kosek wrote:

On Tue, 2011-07-05 at 13:41 -0400, Rob Crittenden wrote:

Rob Crittenden wrote:

Rob Crittenden wrote:

389-ds postop plugins, such as the managed entry and memberof plugins,
add values after the data has been returned to the client. In the case
of the managed entry plugin this affects the parent entry as well (adds
an objectclass value).

This wreaks havoc on our tests as the values don't match what we expect.

The solution is to wait for the postop plugins to finish their work,
then return. I've added this as an option. The downside is it is going
to naturally slow things down, so it is off by default.

It is currently only used in the hostgroup plugin.

The option is wait_for_attr. Add this to ~/.ipa/default.conf and set it
to True and all the current tests will pass (assuming you apply patches
814-816 as well).

So now we won't have any excuses for missing test failures in the unit
tests...

rob


Bah, found a small problem. Self-NACK.

rob


Updated patch attached.

Note that I don't think there is a way for us to handle things like
memberof_indirect. We wouldn't know to wait.

rob


Works fine for the hostgroup entry. It's good it can be switched on/off.

But what about other managed entries, like user entry? Would it make
sense to add a wait here too? Or maybe something systematic to baseldap
so that we wouldn't have to implement this wait to every managed entry.

Martin



I can certainly add it to users to check for managed groups. Making it 
generic would be difficult because some are conditional (such as users).


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-05 Thread Rob Crittenden

Rob Crittenden wrote:

Rob Crittenden wrote:

389-ds postop plugins, such as the managed entry and memberof plugins,
add values after the data has been returned to the client. In the case
of the managed entry plugin this affects the parent entry as well (adds
an objectclass value).

This wreaks havoc on our tests as the values don't match what we expect.

The solution is to wait for the postop plugins to finish their work,
then return. I've added this as an option. The downside is it is going
to naturally slow things down, so it is off by default.

It is currently only used in the hostgroup plugin.

The option is wait_for_attr. Add this to ~/.ipa/default.conf and set it
to True and all the current tests will pass (assuming you apply patches
814-816 as well).

So now we won't have any excuses for missing test failures in the unit
tests...

rob


Bah, found a small problem. Self-NACK.

rob


Updated patch attached.

Note that I don't think there is a way for us to handle things like 
memberof_indirect. We wouldn't know to wait.


rob
From 298182164a8426c121a70ecb51e4be1c9e8bef75 Mon Sep 17 00:00:00 2001
From: Rob Crittenden rcrit...@redhat.com
Date: Fri, 1 Jul 2011 15:32:31 -0400
Subject: [PATCH] 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/constants.py |1 +
 ipalib/plugins/baseldap.py  |   32 
 ipalib/plugins/hostgroup.py |7 +++
 3 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/ipalib/constants.py b/ipalib/constants.py
index 23e80257d0a9b513ceb2478411ede8bcf1acdbe9..026e0735441eabf8dbe63fffa85da69aa151c5d7 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -148,6 +148,7 @@ DEFAULT_CONFIG = (
 # Enable certain optional plugins:
 ('enable_ra', False),
 ('ra_plugin', 'selfsign'),
+('wait_for_attr', False),
 
 # Used when verifying that the API hasn't changed. Not for production.
 ('validate_api', False),
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 2e9991317c5d97cae4495e957a692dfc1f6dfa75..2967c1274d164eba933f36a61c313ef4d975703f 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -238,6 +238,38 @@ def wait_for_memberof(keys, entry_start, completed, show_command, adding=True):
 
 return entry_attrs
 
+def wait_for_value(ldap, dn, attr, value):
+
+389-ds postoperation plugins are executed after the data has been
+returned to a client. This means that plugins that add data in a
+postop are not included in data returned to the user.
+
+The downside of waiting is that this increases the time of the
+command.
+
+# Loop a few times to give the postop-plugin a chance to complete
+# Don't sleep for more than 6 seconds.
+x = 0
+while x  20:
+# sleep first because the first search, even on a quiet system,
+# almost always fails.
+time.sleep(.3)
+x = x + 1
+
+# FIXME: put a try/except around here? I think it is probably better
+# to just let the exception filter up to the caller.
+(dn, entry_attrs) = ldap.get_entry( dn, ['*'])
+if attr in entry_attrs:
+if isinstance(entry_attrs[attr], (list, tuple)):
+values = map(lambda y:y.lower(), entry_attrs[attr])
+if value.lower() in values:
+break
+else:
+if value.lower() == entry_attrs[attr].lower():
+break
+
+return entry_attrs[attr]
+
 class LDAPObject(Object):
 
 Object representing a LDAP entry.
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index c5b96056bfdcd6d039ff1eec68124684324b081d..1d201f3b0d2965822effb69f8a41e38061d5b2b4 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -98,6 +98,13 @@ class hostgroup_add(LDAPCreate):
 
 msg_summary = _('Added hostgroup %(value)s')
 
+def post_callback(self, ldap, dn, entry_attrs, *keys, **options):
+if self.api.env.wait_for_attr:
+ldap = self.obj.backend
+entry_attrs['objectclass'] = wait_for_value(ldap, dn, 'objectclass', 'mepOriginEntry')
+return dn
+
+
 api.register(hostgroup_add)
 
 
-- 
1.7.4

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Re: [Freeipa-devel] [PATCH] 817 Add option to wait for values

2011-07-01 Thread Rob Crittenden

Rob Crittenden wrote:

389-ds postop plugins, such as the managed entry and memberof plugins,
add values after the data has been returned to the client. In the case
of the managed entry plugin this affects the parent entry as well (adds
an objectclass value).

This wreaks havoc on our tests as the values don't match what we expect.

The solution is to wait for the postop plugins to finish their work,
then return. I've added this as an option. The downside is it is going
to naturally slow things down, so it is off by default.

It is currently only used in the hostgroup plugin.

The option is wait_for_attr. Add this to ~/.ipa/default.conf and set it
to True and all the current tests will pass (assuming you apply patches
814-816 as well).

So now we won't have any excuses for missing test failures in the unit
tests...

rob


Bah, found a small problem. Self-NACK.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel