#NEWLINE# @ wsgi . response ( 202 ) #NEWLINE# @ extensions . expected_errors ( 404 ) #NEWLINE# @ wsgi . action ( 'unlock' ) #NEWLINE# def _unlock( self , req , id , body ) : #NEWLINE# #INDENT# 'Unlock a server instance.' #NEWLINE# context = req . environ [ 'nova.context' ] #NEWLINE# authorize ( context , action = 'unlock' ) #NEWLINE# instance = common . get_instance ( self . compute_api , context , id ) #NEWLINE# if ( not self . compute_api . is_expected_locked_by ( context , instance ) ) : #NEWLINE# #INDENT# authorize ( self , target = instance , action = 'unlock:unlock_override' ) #NEWLINE# #UNINDENT# self . compute_api . unlock ( context , instance )