#NEWLINE# def check_attached( self , context , volume ) : #NEWLINE# #INDENT# if ( volume [ 'status' ] != 'in-use' ) : #NEWLINE# #INDENT# msg = ( _ ( "volume '%(vol)s' status must be 'in-use'. Currently in '%(status)s' status" ) % { #NEWLINE# #INDENT# 'vol' : volume [ 'id' ] , #NEWLINE# 'status' : volume [ 'status' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# raise exception . InvalidVolume ( reason = self )