def _VerifyHvparams(what, vm_capable, result,
                    get_hv_fn=hypervisor.GetHypervisor):
  if not vm_capable:
    return

  if constants.NV_HVPARAMS in what:
    result[constants.NV_HVPARAMS] = []
    for source, hv_name, hvparms in what[constants.NV_HVPARAMS]:
      try:
        logging.info("Validating hv %s, %s", hv_name, hvparms)
        get_hv_fn(hv_name).ValidateParameters(hvparms)
      except errors.HypervisorError, err:
        result[constants.NV_HVPARAMS].append((source, hv_name, str(err)))
Map all file types to strings; unknown types become TYPE='x'.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/_VerifyHvparams--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/gopherlib.py/type_to_name