def GetQueryResponse(query, ctx, sort_by_name=True):
  return objects.QueryResponse(data=query.Query(ctx, sort_by_name=sort_by_name),
                               fields=query.GetFields()).ToDict()
Prepares the response for a query.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/GetQueryResponse