Dne 9.4.2015 v 15:11 Luc de Louw napsal(a):

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.

+1


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

That depends. Is there a difference between "do not set APPEND_CR ticket flag" and "set APPEND_CR ticket flag to false"?


Thanks,

Luc


--
Jan Cholasta

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to