#NEWLINE# def volume_get( request , volume_id ) : #NEWLINE# #INDENT# volume_data = cinderclient ( request ) . volumes . get ( volume_id ) #NEWLINE# for attachment in volume_data . attachments : #NEWLINE# #INDENT# if ( 'server_id' in attachment ) : #NEWLINE# #INDENT# instance = nova . server_get ( request , attachment [ 'server_id' ] ) #NEWLINE# attachment [ 'instance_name' ] = instance . name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# attachment [ 'instance_name' ] = _ ( 'Unknown instance' ) #NEWLINE# #UNINDENT# #UNINDENT# return Volume ( volume_data )