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

Rob Crittenden rcritten at redhat.com
Wed Oct 6 01:35:33 UTC 2010


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




More information about the Freeipa-devel mailing list