@require_context
def group_type_get_all(context, inactive=False, filters=None, marker=None, limit=None, sort_keys=None, sort_dirs=None, offset=None, list_result=False):
 session = get_session()
 with session.begin():
  filters = (filters or {})
  filters['context'] = context
  query = _generate_paginate_query(context, session, marker, limit, sort_keys, sort_dirs, filters, offset, models.GroupTypes)
  if (query is None):
   if list_result:
    return []
   return {}
  rows = query.all()
  if list_result:
   result = [_dict_with_group_specs_if_authorized(context, row) for row in rows]
   return result
  result = {row['name']: _dict_with_group_specs_if_authorized(context, row) for row in rows}
  return result

@ require_context def group_type_get_all ( context , inactive = False , filters = None , marker = None , limit = None , sort_keys = None , sort_dirs = None , offset = None , list_result = False ) : session = get_session ( ) with session . begin ( ) : filters = ( filters or { } ) filters [ 'context' ] = context query = _generate_paginate_query ( context , session , marker , limit , sort_keys , sort_dirs , filters , offset , models . GroupTypes ) if ( query is None ) : if list_result : return [ ] return { } rows = query . all ( ) if list_result : result = [ _dict_with_group_specs_if_authorized ( context , row ) for row in rows ] return result result = { row [ 'name' ] : _dict_with_group_specs_if_authorized ( context , row ) for row in rows } return result
returns a dict describing all group_types with name as key .