[Freeipa-devel] [PATCH] otptoken_yubikey, append CR by default and add a option for not doing so

Luc de Louw ldelouw at redhat.com
Thu Apr 9 13:11:43 UTC 2015


On 04/09/2015 02:28 PM, Jan Cholasta wrote:
>>>> Let's say you now introduce --no-cr flag. What if we decide to change
>>>> the default to False? How would you then change the option/API?
>>>
>>> You would have to add --cr flag.
>>
>> That was the point - some clients would send "ct" flag, some "no_cr"
>> and there
>> would have to be special handling.
>>
>>>> It is more flexible IMO to just use something like
>>>>
>>>> --cr=TRUE|FALSE with TRUE being the default
>>>
>>> I would say --append-cr=TRUE|FALSE with no default, meaning do not
>>> add the flag
>>> to the config at all.
>>
>> I though the idea was to append the CR by default, i.e.
>> --append-cr=TRUE|FALSE
>> with TRUE being the default.
>>
>
> If you want to hardcode the default into the plugin, there is no benefit
> in using Bool over Flag, because Flag is actually a Bool with hardcoded
> default value.
>

I actually started with a bool, default=True. I had the problem that the 
Default value was ignored, the value was None.

Changing the default behavior is IMHO bad anyway does not matter if Bool 
or Flag.

Please advise what is you wish to be implemented :-)

Thanks,

Luc




More information about the Freeipa-devel mailing list