#NEWLINE# def validate_bootloader_install_status( task , input_params ) : #NEWLINE# #INDENT# 'Validate if bootloader was installed.\n\n    This method first validates if deploy key sent in vendor passthru\n    was correct one, and then validates whether bootloader installation\n    was successful or not.\n\n    :param task: A TaskManager object.\n    :param input_params: A dictionary of params sent as input to passthru.\n    :raises: InstanceDeployFailure, if bootloader installation was\n        reported from ramdisk as failure.\n    ' #NEWLINE# node = task . node #NEWLINE# if ( input_params [ 'status' ] != 'SUCCEEDED' ) : #NEWLINE# #INDENT# msg = ( _ ( 'Failed to install bootloader on node %(node)s. Error: %(error)s.' ) % { #NEWLINE# #INDENT# 'node' : node . uuid , #NEWLINE# 'error' : input_params . get ( 'error' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# LOG . error ( msg ) #NEWLINE# deploy_utils . set_failed_state ( task , msg ) #NEWLINE# raise exception . InstanceDeployFailure ( msg ) #NEWLINE# #UNINDENT# LOG . info ( _LI ( 'Bootloader successfully installed on node %s' ) , node . uuid )