'List all volumes.
@inherits: :class:`NodeDriver.list_volumes`
:keyword ex_volume_ids: a list of volume\'s ids used to filter volumes.
Only the volumes which\'s id in this list
will be returned.
:type ex_volume_ids: ``list`` of ``str``
:keyword ex_filters: volume attribute and value pairs to filter
volumes. Only the volumes which matchs all will
be returned.
If the filter attribute need a json array value,
use ``list`` object, the driver will convert it.
:type ex_filters: ``dict``'

def list_volumes(self, ex_volume_ids=None, ex_filters=None):

    params = {'Action': 'DescribeDisks', 'RegionId': self.region}
    if ex_volume_ids:
        if isinstance(ex_volume_ids, list):
            params['DiskIds'] = self._list_to_json_array(ex_volume_ids)
        else:
            raise AttributeError('ex_volume_ids    should    be    a    list    of    volume    ids.')
    if ex_filters:
        if (not isinstance(ex_filters, dict)):
            raise AttributeError('ex_filters    should    be    a    dict    of    volume    attributes.')
        else:
            for key in ex_filters.keys():
                params[key] = ex_filters[key]
    def _parse_response(resp_object):
        disk_elements = findall(resp_object, 'Disks/Disk', namespace=self.namespace)
        volumes = [self._to_volume(each) for each in disk_elements]
        return volumes
    return self._request_multiple_pages(self.path, params, _parse_response)
