'List all volumes attached to a data center.
:return: ``list`` of :class:`StorageVolume`
:rtype: ``list``'

def list_volumes(self):

    datacenters = self.ex_list_datacenters()
    volumes = list()
    for datacenter in datacenters:
        volumes_href = datacenter.extra['entities']['volumes']['href']
        response = self.connection.request(action=volumes_href, params={'depth': 3}, method='GET', with_full_url=True)
        mapped_volumes = self._to_volumes(response.object)
        volumes += mapped_volumes
    return volumes
