Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
 def LogDeleteFiles(self, responses):
   # Check that the DeleteFiles flow worked.
   if not responses.success:
     raise flow.FlowError("Could not delete file: %s" % responses.status)
Exemplo n.º 3
0
    def Done(self, responses):
        if not responses.success:
            raise flow.FlowError(str(responses.status))

        for response in responses:
            self.Log(response.data)
Exemplo n.º 4
0
 def Confirmation(self, responses):
     """Confirmation."""
     if not responses.success:
         raise flow.FlowError("Failed to write config. Err: {0}".format(
             responses.status))
Exemplo n.º 5
0
 def Done(self, responses):
     if not responses.success:
         self.Log(responses.status.error_message)
         raise flow.FlowError(responses.status.error_message)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
    def CheckDumpProcessMemoryResults(self, responses):
        if not responses.success:
            raise flow.FlowError(responses.status)

        for response in responses:
            self.SendReply(response)
Exemplo n.º 8
0
 def CheckUpdateAgent(self, responses):
     if not responses.success:
         raise flow.FlowError("Error while calling UpdateAgent: %s" %
                              responses.status)
Exemplo n.º 9
0
 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))