#NEWLINE# @ wsgi . response ( 204 ) #NEWLINE# @ wsgi . action ( 'confirmResize' ) #NEWLINE# def _action_confirm_resize( self , req , id , body ) : #NEWLINE# #INDENT# context = req . environ [ 'nova.context' ] #NEWLINE# instance = self . _get_server ( context , req , id ) #NEWLINE# try : #NEWLINE# #INDENT# self . compute_api . confirm_resize ( context , instance ) #NEWLINE# #UNINDENT# except exception . MigrationNotFound : #NEWLINE# #INDENT# msg = _ ( 'Instance has not been resized.' ) #NEWLINE# raise exc . HTTPBadRequest ( explanation = context ) #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 ( state_error , 'confirmResize' , id )