#NEWLINE# @ base . remotable #NEWLINE# def destroy( self ) : #NEWLINE# #INDENT# if ( not self . obj_attr_is_set ( 'id' ) ) : #NEWLINE# #INDENT# raise exception . ObjectActionError ( action = 'destroy' , reason = 'already destroyed' ) #NEWLINE# #UNINDENT# db . block_device_mapping_destroy ( self . _context , self . id ) #NEWLINE# delattr ( self , base . get_attrname ( 'id' ) ) #NEWLINE# cell_type = cells_opts . get_cell_type ( ) #NEWLINE# if ( cell_type == 'compute' ) : #NEWLINE# #INDENT# cells_api = cells_rpcapi . CellsAPI ( ) #NEWLINE# cells_api . bdm_destroy_at_top ( self . _context , self . instance_uuid , device_name = self . device_name , volume_id = self . volume_id )