#NEWLINE# def bdm_destroy_at_top( self , message , instance_uuid , device_name , volume_id ) : #NEWLINE# #INDENT# 'Destroy a block device mapping in API cells by device name\n        or volume_id.  device_name or volume_id can be None, but not both.\n        ' #NEWLINE# if ( not self . _at_the_top ( ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if device_name : #NEWLINE# #INDENT# self . db . block_device_mapping_destroy_by_instance_and_device ( message . ctxt , instance_uuid , device_name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if volume_id : #NEWLINE# #INDENT# self . db . block_device_mapping_destroy_by_instance_and_volume ( message . ctxt , instance_uuid , volume_id )