'List all the volumes created.
Params can be a string (must be urlencoded) or a dictionary.
For a full list of available parameters, please refer to the official
API reference:
http://developer.openstack.org/api-ref/block-storage/v2/#list-volumes-with-details
http://developer.openstack.org/api-ref/block-storage/v2/#list-volumes'

def list_volumes(self, detail=False, params=None):

    url = 'volumes'
    if detail:
        url += '/detail'
    if params:
        url += ('?%s' % self._prepare_params(params))
    (resp, body) = self.get(url)
    body = json.loads(body)
    self.expected_success(200, resp.status)
    return rest_client.ResponseBody(resp, body)
