'Helper function that returns a list of type dicts.'

def _get_volume_types(self, req):

    params = req.params.copy()
    (marker, limit, offset) = common.get_pagination_params(params)
    (sort_keys, sort_dirs) = common.get_sort_params(params)
    filters = {}
    context = req.environ['cinder.context']
    if context.is_admin:
        filters['is_public'] = self._parse_is_public(req.params.get('is_public', None))
    else:
        filters['is_public'] = True
    utils.remove_invalid_filter_options(context, filters, self._get_vol_type_filter_options())
    limited_types = volume_types.get_all_types(context, filters=filters, marker=marker, limit=limit, sort_keys=sort_keys, sort_dirs=sort_dirs, offset=offset, list_result=True)
    return limited_types
