'Get a detailed list of volumes associated with the current project.
Example GET:
http://localhost/api/cinder/volumes?paginate=true&sort_dir=asc
If invoked as an admin, you may set the GET parameter "all_projects"
to \'true\' to return details for all projects.
The following get parameters may be passed in the GET
:param search_opts: includes options such as name, status, bootable
:param paginate: If true will perform pagination based on settings.
:param marker: Specifies the namespace of the last-seen image.
The typical pattern of limit and marker is to make an
initial limited request and then to use the last
namespace from the response as the marker parameter
in a subsequent limited request. With paginate, limit
is automatically set.
:param sort_dir: The sort direction (\'asc\' or \'desc\').
The listing result is an object with property "items".'

@rest_utils.ajax()
def get(self, request):

    if (request.GET.get('all_projects') == 'true'):
        (result, has_more, has_prev) = api.cinder.volume_list_paged(request, {'all_tenants': 1})
    else:
        (search_opts, kwargs) = rest_utils.parse_filters_kwargs(request, CLIENT_KEYWORDS)
        (result, has_more, has_prev) = api.cinder.volume_list_paged(request, search_opts=search_opts, **kwargs)
    return {'items': [api.cinder.Volume(u).to_dict() for u in result], 'has_more_data': has_more, 'has_prev_data': has_prev}
