« Previous | Next » 

Revision 422d4619

ID422d4619d6c3c5debbdc4e59dfbfd6a295f0295b

Added by Iustin Pop almost 14 years ago

Rework LUSetInstanceParams._GetUpdatedParams

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.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences