#NEWLINE# @ extensions . expected_errors ( ( 403 , 404 , 501 ) ) #NEWLINE# @ common . check_cells_enabled #NEWLINE# def delete( self , req , id ) : #NEWLINE# #INDENT# "Delete a child or parent cell entry.  'id' is a cell name." #NEWLINE# context = req . environ [ 'nova.context' ] #NEWLINE# authorize ( context , action = 'delete' ) #NEWLINE# try : #NEWLINE# #INDENT# num_deleted = self . cells_rpcapi . cell_delete ( context , id ) #NEWLINE# #UNINDENT# except exception . CellsUpdateUnsupported as e : #NEWLINE# #INDENT# raise exc . HTTPForbidden ( explanation = e . format_message ( ) ) #NEWLINE# #UNINDENT# if ( num_deleted == 0 ) : #NEWLINE# #INDENT# raise exc . HTTPNotFound ( explanation = ( _ ( "Cell %s doesn't exist." ) % id ) )