def SendMessage(self, responses): if not responses.success: self.Log(responses.status.error_message) raise flow.FlowError(responses.status.error_message) self.CallClient(server_stubs.Echo, data="Wake up!", next_state="Sleep")
def LogDeleteFiles(self, responses): # Check that the DeleteFiles flow worked. if not responses.success: raise flow.FlowError("Could not delete file: %s" % responses.status)
def Done(self, responses): if not responses.success: raise flow.FlowError(str(responses.status)) for response in responses: self.Log(response.data)
def Confirmation(self, responses): """Confirmation.""" if not responses.success: raise flow.FlowError("Failed to write config. Err: {0}".format( responses.status))
def Done(self, responses): if not responses.success: self.Log(responses.status.error_message) raise flow.FlowError(responses.status.error_message)
def End(self): if self.state.plugin_errors: all_errors = u"\n".join([unicode(e) for e in self.state.plugin_errors]) raise flow.FlowError("Error running plugins: %s" % all_errors)
def CheckDumpProcessMemoryResults(self, responses): if not responses.success: raise flow.FlowError(responses.status) for response in responses: self.SendReply(response)
def CheckUpdateAgent(self, responses): if not responses.success: raise flow.FlowError("Error while calling UpdateAgent: %s" % responses.status)
def TemporaryImageRemoved(self, responses): """Verify that the temporary image has been removed successfully.""" if not responses.success: raise flow.FlowError("Unable to delete the temporary flash image: " "{0}".format(responses.status))