[Freeipa-devel] [PATCH] 157 Add --delattr option to complement --setattr/--addattr

Martin Kosek mkosek at redhat.com
Sat Nov 5 12:43:25 UTC 2011


On Fri, 2011-11-04 at 09:23 -0400, Rob Crittenden wrote:
> Martin Kosek wrote:
> > Add a --delattr option to round out multi-valued attribute manipulation.
> > The new option is be available for all LDAPUpdate based commands.
> >
> > --delattr is evaluated last, it can remove any value present either
> > in --addattr/--setattr options or stored in LDAP.
> >
> > https://fedorahosted.org/freeipa/ticket/1929
> 
> Should --delattr raise an error if the value doesn't exist?
> 
> I think it probably should.
> 
> rob

You are right, it would be more expected behavior. I fixed that. In the
process of implementing the change I found that current --*attr
processing is not good, so I refactored it completely to one function
available for all baseldap.py commands.

In the process I found out that we don't have any common class for all
baseldap.py commands and the result is BaseLDAPCommand which can now
handle attribute processing and provide it to other LDAP commands.

And I also fixed one group unit test. Now all unit tests were OK.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-157-2-add-delattr-option-to-complement-setattr-addattr.patch
Type: text/x-patch
Size: 86755 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111105/81b3897d/attachment.bin>


More information about the Freeipa-devel mailing list