#NEWLINE# def enumerate( self ) : #NEWLINE# #INDENT# 'Get a listing of all volumes managed by this service.\n\n        :return: A ``Deferred`` that fires with an iterator of :class:`Volume`.\n        ' #NEWLINE# enumerating = self . pool . enumerate ( ) #NEWLINE# def enumerated( filesystems ) : #NEWLINE# #INDENT# for filesystem in filesystems : #NEWLINE# #INDENT# basename = filesystem . get_path ( ) . basename ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( node_id , name ) = basename . split ( b'.' , 1 ) #NEWLINE# name = VolumeName . from_bytes ( name ) #NEWLINE# UUID ( node_id ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ( yield Volume ( node_id = node_id . decode ( 'ascii' ) , name = name , service = self , size = filesystem . size ) ) #NEWLINE# #UNINDENT# #UNINDENT# enumerating . addCallback ( enumerated ) #NEWLINE# return enumerating