#NEWLINE# def _volumes_size_map( self ) : #NEWLINE# #INDENT# LOG . info ( 'Calculate size of each volume.' ) #NEWLINE# volumes_size_map = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for position in self . clouds : #NEWLINE# #INDENT# for v in self . data [ position ] [ 'volumes' ] : #NEWLINE# #INDENT# LOG . debug ( 'Calculating size of volume %s on %s cloud' , v [ 'id' ] , position ) #NEWLINE# volume_type_id = v . get ( 'volume_type_id' , None ) #NEWLINE# srcpaths = self . _paths ( v , volume_type_id ) #NEWLINE# src = self . find_dir ( position , srcpaths , v ) #NEWLINE# vol_size = self . volume_size ( self . clouds [ position ] , src ) #NEWLINE# volumes_size_map [ v [ 'id' ] ] = vol_size #NEWLINE# LOG . info ( 'Volume %s(%s) size is %s.' , v . get ( 'display_name' , '' ) , v [ 'id' ] , sizeof_format . sizeof_fmt ( vol_size ) ) #NEWLINE# #UNINDENT# #UNINDENT# return volumes_size_map