def GetUpdatedParams(old_params, update_dict,
                      use_default=True, use_none=False):
  params_copy = copy.deepcopy(old_params)
  for key, val in update_dict.iteritems():
    if ((use_default and val == constants.VALUE_DEFAULT) or
          (use_none and val is None)):
      try:
        del params_copy[key]
      except KeyError:
        pass
    else:
      params_copy[key] = val
  return params_copy
Return the new version of a parameter dictionary.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/GetUpdatedParams