#NEWLINE# @ wsgi . response ( 204 ) #NEWLINE# def delete( self , req , gid , pid ) : #NEWLINE# #INDENT# def _delete_children( context , gid , pid ) : #NEWLINE# #INDENT# processes = db . process_get_all ( context , gid , { #NEWLINE# #INDENT# 'ppid' : pid , #NEWLINE# #UNINDENT# } ) #NEWLINE# for process in processes : #NEWLINE# #INDENT# _delete_children ( context , gid , process [ 'pid' ] ) #NEWLINE# _delete ( context , gid , process [ 'pid' ] , process [ 'nova_instance_id' ] ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# def _delete( context , gid , pid , nova_id ) : #NEWLINE# #INDENT# self . manager . process_delete ( context , nova_id ) #NEWLINE# try : #NEWLINE# #INDENT# db . process_delete ( context , gid , pid ) #NEWLINE# #UNINDENT# except exception . NotFound as e : #NEWLINE# #INDENT# LOG . exception ( e ) #NEWLINE# #UNINDENT# #UNINDENT# self . _uuid_check ( gid , pid ) #NEWLINE# context = req . environ [ 'rack.context' ] #NEWLINE# try : #NEWLINE# #INDENT# process = db . process_get_by_pid ( context , context , pid ) #NEWLINE# #UNINDENT# except exception . NotFound as e : #NEWLINE# #INDENT# raise webob . exc . HTTPNotFound ( explanation = e . format_message ( ) ) #NEWLINE# #UNINDENT# _delete_children ( context , gid , pid ) #NEWLINE# _delete ( context , gid , pid , process [ 'nova_instance_id' ] )