On Mon, Jun 14, 2010 at 4:07 AM, Iustin Pop <[email protected]> wrote:
> Currently, this function does three things:
> - special handling of constants.VALUE_DEFAULT
> - type enforcing of the resulting dict
> - filling the dictionary with defaults
>
> However, except for the first one, the second two do not belong in this
> function:
> - in the future, not all parameter dictionaries will be able to be
>  enforced
> - filling the dictionary with defaults cannot be done via a defaults
>  dict in all cases, and should be done by the specialized functions
>  (ideally we'd pass a partial function instance here, but we don't have
>  that yet…)
>
> As such, we remove the last items, and move them to the callers; this is
> overall the same complexity, as we were calling this function in just
> three places and constructing the many arguments was also complicated.
>
> Furthermore, we move the function out of LUSetInstanceParams, as in the
> future it will be used by LUSetClusterParams too.

As a global module-level function the name is totally not explicative.
Also, this new function will be unusable for os parameters anyway,
because constants.VALUE_DEFAULT is a valid value name, and thus
shoudn't be removed from the dict.
(thus we need to change the luxi wire protocol to pass the parameters
to be reset separately, and not with the VALUE_DEFAULT value).

What do you think?

Thanks,

Guido

Reply via email to