def list_volumes(self):
        try:
            ebs_volumes = self._list_ebs_volumes()
            message_type = BOTO_LOG_RESULT + u':listed_volumes'
            Message.new(
                message_type=message_type,
                volume_ids=list(volume.id for volume in ebs_volumes),
            ).write()
        except ClientError as e:
            # Work around some internal race-condition in EBS by retrying,
            # since this error makes no sense:
            if e.response['Error']['Code'] == NOT_FOUND:
                return self.list_volumes()
            else:
                raise

        volumes = []
        for ebs_volume in ebs_volumes:
            if _is_cluster_volume(self.cluster_id, ebs_volume):
                volumes.append(
                    _blockdevicevolume_from_ebs_volume(ebs_volume)
                )
        message_type = BOTO_LOG_RESULT + u':listed_cluster_volumes'
        Message.new(
            message_type=message_type,
            volume_ids=list(volume.blockdevice_id for volume in volumes),
        ).write()
        return volumes
Returns a subset of the current dag as a deep copy of the current dag
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/ebs.py/EBSBlockDeviceAPI.list_volumes--crossover with--dataset/ETHPy150Open airbnb/airflow/airflow/models.py/DAG.sub_dag