[Freeipa-devel] [PATCH] Generate additional positional arguments for baseldap commands from takes_args.

Pavel Zuna pzuna at redhat.com
Wed Oct 6 10:13:04 UTC 2010


On 10/06/2010 03:35 AM, Rob Crittenden wrote:
> Pavel Zuna wrote:
>> takes_args defined in a baseldap subclass is now transformed into
>> positional arguments that go after primary keys. Before this patch,
>> takes_args in crud subclasses were ignored.
>>
>> example:
>>
>> --- snip ---
>>
>> class user_something(LDAPRetrieve):
>> takes_args = (
>> Str('randomarg'),
>> )
>>
>> --- snip ---
>>
>> # ipa help something
>> Usage: ipa [global-options] user-something LOGIN RANDOMARG
>>
>>
>> Pavel
>
> Nack, this breaks the pwpolicy plugin tests (though I'm not 100% sure
> why). pwpolicy-del defines its own get_args(). I'm guessing it is
> failing because the local get_args returns a string and the multivalue
> stuff is expecting a list so pulling the string apart one character at a
> time. If you run pwpolicy-del testpolicy it will fail with a not found
> on 't' policy.
>
> I think simply removing the get_args() from pwpolicy will fix it:
>
> rob

Fixed version attached.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pzuna-freeipa-0027-2-takesargs.patch
Type: text/x-patch
Size: 2428 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20101006/73029064/attachment.bin>


More information about the Freeipa-devel mailing list