#NEWLINE# def vmboot( body , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# payload = body [ 'payload' ] #NEWLINE# LOG . info ( 'Got %s' , payload . keys ( ) ) #NEWLINE# for key in payload . keys ( ) : #NEWLINE# #INDENT# if ( payload [ key ] [ 'exit_status' ] == 0 ) : #NEWLINE# #INDENT# LOG . info ( '%s successful, stdout is %s' , key , payload [ key ] [ 'stdout' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . error ( '%s failed with exit code %s' , key , payload [ key ] [ 'exit_status' ] ) #NEWLINE# LOG . error ( 'stdout: %s ' , payload [ key ] [ 'stdout' ] ) #NEWLINE# LOG . error ( 'stderr: %s ' , payload [ key ] [ 'stderr' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# LOG . exception ( e )