Skip to content
  • Iustin Pop's avatar
    Rework LUSetInstanceParams._GetUpdatedParams · 422d4619
    Iustin Pop authored
    
    
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    422d4619