#NEWLINE# @ wsgi . response ( 202 ) #NEWLINE# @ extensions . expected_errors ( ( 404 , 409 , 501 ) ) #NEWLINE# @ wsgi . action ( 'unrescue' ) #NEWLINE# def _unrescue( self , req , id , body ) : #NEWLINE# #INDENT# 'Unrescue an instance.' #NEWLINE# context = req . environ [ 'nova.context' ] #NEWLINE# authorize ( context ) #NEWLINE# instance = common . get_instance ( self . compute_api , context , id ) #NEWLINE# try : #NEWLINE# #INDENT# self . compute_api . unrescue ( context , instance ) #NEWLINE# #UNINDENT# except exception . InstanceUnknownCell as e : #NEWLINE# #INDENT# raise exc . HTTPNotFound ( explanation = e . format_message ( ) ) #NEWLINE# #UNINDENT# except exception . InstanceIsLocked as e : #NEWLINE# #INDENT# raise exc . HTTPConflict ( explanation = e . format_message ( ) ) #NEWLINE# #UNINDENT# except exception . InstanceInvalidState as state_error : #NEWLINE# #INDENT# common . raise_http_conflict_for_instance_invalid_state ( self , 'unrescue' , id )