#NEWLINE# def run( self , **kwargs ) : #NEWLINE# #INDENT# ':returns: dictionary {<source-volume-id>: <destination-volume>}' #NEWLINE# new_volumes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# volumes = self . get_cinder_volumes ( ** kwargs ) #NEWLINE# volumes = [ v [ 'volume' ] for v in volumes . itervalues ( ) ] #NEWLINE# view = VolumeMigrationView ( volumes ) #NEWLINE# view . initial_message ( ) #NEWLINE# for ( i , volume ) in enumerate ( volumes ) : #NEWLINE# #INDENT# view . before_migration ( i , volume ) #NEWLINE# migrated_volume = self . migrate_volume ( volume ) #NEWLINE# view . after_migration ( i , volume ) #NEWLINE# new_volumes [ volume [ 'id' ] ] = migrated_volume #NEWLINE# #UNINDENT# return new_volumes