#NEWLINE# @ boto3_log #NEWLINE# def destroy_volume( self , blockdevice_id ) : #NEWLINE# #INDENT# '\n        Destroy EBS volume identified by blockdevice_id.\n\n        :param String blockdevice_id: EBS UUID for volume to be destroyed.\n\n        :raises UnknownVolume: If there does not exist a Flocker cluster\n            volume identified by input blockdevice_id.\n        :raises Exception: If we failed to destroy Flocker cluster volume\n            corresponding to input blockdevice_id.\n        ' #NEWLINE# destroy_result = None #NEWLINE# ebs_volume = self . _get_ebs_volume ( blockdevice_id ) #NEWLINE# ebs_volume . load ( ) #NEWLINE# if ( ebs_volume . state == 'available' ) : #NEWLINE# #INDENT# destroy_result = ebs_volume . delete ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise InvalidStateException ( ebs_volume , ebs_volume . state , [ 'available' ] ) #NEWLINE# #UNINDENT# if blockdevice_id : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# _wait_for_volume_state_change ( VolumeOperations . DESTROY , ebs_volume ) #NEWLINE# #UNINDENT# except UnknownVolume : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( 'Failed to delete volume: {!r}' . format ( blockdevice_id ) )