'Returns a list of messages, transformed through view builder.'

@wsgi.Controller.api_version(MESSAGES_BASE_MICRO_VERSION)
def index(self, req):

    context = req.environ['cinder.context']
    api_version = req.api_version_request
    check_policy(context, 'get_all')
    filters = None
    marker = None
    limit = None
    offset = None
    sort_keys = None
    sort_dirs = None
    if api_version.matches('3.5'):
        filters = req.params.copy()
        (marker, limit, offset) = common.get_pagination_params(filters)
        (sort_keys, sort_dirs) = common.get_sort_params(filters)
    if api_version.matches(common.FILTERING_VERSION):
        support_like = (True if api_version.matches(common.LIKE_FILTER_VERSION) else False)
        common.reject_invalid_filters(context, filters, 'message', support_like)
    messages = self.message_api.get_all(context, filters=filters, marker=marker, limit=limit, offset=offset, sort_keys=sort_keys, sort_dirs=sort_dirs)
    for message in messages:
        self._build_user_message(message)
    messages = self._view_builder.index(req, messages)
    return messages
