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

Martin Kosek mkosek at redhat.com
Wed Nov 23 16:09:44 UTC 2011


On Sat, 2011-11-05 at 13:43 +0100, Martin Kosek wrote:
> 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

I rebased the patch (API.txt format was changed) and tested that it
still works ok.

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


More information about the Freeipa-devel mailing list