Exemple #1
0
 def _on_task_done(self, result):
     """What to execute after successfully finished processing a task."""
     try:
         callback = util.get_attribute(self.parent, "on_task_done")
         callback(self, result)
     except exception.ArestorException:
         LOG.debug("%(command)r: No callback found for task_done.",
                   {"command": self.name})
Exemple #2
0
 def _on_task_fail(self, exc):
     """What to do when the program fails processing a task."""
     try:
         callback = util.get_attribute(self.parent, "on_task_fail")
         callback(self, exc)
     except exception.ArestorException:
         LOG.debug("%(command)r: No callback found for task_done.",
                   {"command": self.name})
Exemple #3
0
 def args(self):
     """The command line arguments parsed by the client."""
     if self._args is None:
         self._args = util.get_attribute(self.parent, "args")
     return self._args
Exemple #4
0
 def command_line(self):
     """Command line provided to parser."""
     if self._command_line is None:
         self._command_line = util.get_attribute(self.parent,
                                                 "command_line")
     return self._command_line