#NEWLINE# def stub_host_power_action( context , host_name , action ) : #NEWLINE# #INDENT# if ( host_name == 'notimplemented' ) : #NEWLINE# #INDENT# raise NotImplementedError ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( host_name == 'dummydest' ) : #NEWLINE# #INDENT# raise exception . ComputeHostNotFound ( host = host_name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( host_name == 'service_not_available' ) : #NEWLINE# #INDENT# raise exception . ComputeServiceUnavailable ( host = host_name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return action