John Dennis wrote:
On 01/29/2010 07:53 AM, Pavel Zuna wrote:
John Dennis wrote:
In this scheme the you don't need to keep state, you don't need to
special case any code, you can use the existing normalize and validate
The problem here is that validate/normalize can only be used on final
values passed to commands. Both validate and normalize are called on the
client and then again on the server. Files need to be loaded on the
client, so you can't do it in a method that is shared.

A File Command class validates by assuring the file is readable, it's normalize reads the contents. Then it calls the matching Str command class with the data it read. The Str class validate and normalizes the string data unaware it originated from a file. On the server side it never sees the File Command parameter, only Str parameter. Think of the File Command as a temporary command parameter which generates the resulting Str parameter.
I think we've been through this before. It would definitely be nice, but it would require a redesign and rewrite of the parameter framework and that's probably not worth it at this point.


Freeipa-devel mailing list

Reply via email to