'Return a list of volumes.
:keyword ex_location: Location used to filter
:type ex_location: :class:`NodeLocation` or ``None``
:return: A list of volume objects.
:rtype: ``list`` of :class:`StorageVolume`'

def list_volumes(self, ex_location=None):

    action = self._get_project_action('volume')
    data = {}
    if ex_location:
        data['region'] = ex_location.id
    response = self.connection.request(action, data=data)
    return self._to_volumes(response.object)
