def _GetQueryImplementation(name):
  """Returns the implementation for a query type.

  @param name: Query type, must be one of L{constants.QR_VIA_OP}

  """
  try:
    return _QUERY_IMPL[name]
  except __HOLE__:
    raise errors.OpPrereqError("Unknown query resource '%s'" % name,
                               errors.ECODE_INVAL)
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/query.py/_GetQueryImplementation