def MergeAndVerifyHvState(op_input, obj_input):
  if op_input:
    invalid_hvs = set(op_input) - constants.HYPER_TYPES
    if invalid_hvs:
      raise errors.OpPrereqError("Invalid hypervisor(s) in hypervisor state:"
                                 " %s" % utils.CommaJoin(invalid_hvs),
                                 errors.ECODE_INVAL)
    if obj_input is None:
      obj_input = {}
    type_check = constants.HVSTS_PARAMETER_TYPES
    return _UpdateAndVerifySubDict(obj_input, op_input, type_check)

  return None
Combines the hv state from an opcode with the one of the object
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/common.py/MergeAndVerifyHvState