예제 #1
0
파일: show.py 프로젝트: bopopescu/packmybot
    def Run(self, args):
        """Runs the command.

    Args:
      args: The arguments that were provided to this command invocation.

    Returns:
      A Job message.
    """
        job = job_utils.GetJobForArgs(self.context, args)

        # Extract the basic display information for the job
        dataflow_messages = self.context[commands.DATAFLOW_MESSAGES_MODULE_KEY]
        shown_job = job_display.DisplayInfo(job, dataflow_messages)

        # TODO(user): "Prettify" the environment, etc, since it includes
        # JSON as a string in  some of the fields.
        if args.environment:
            shown_job.environment = job.environment

        if args.steps:
            shown_job.steps = [
                self._PrettyStep(step) for step in step_json.ExtractSteps(job)
            ]

        return shown_job
예제 #2
0
  def Run(self, args):
    """Runs the command.

    Args:
      args: The arguments that were provided to this command invocation.

    Returns:
      A Job message.
    """
    return job_utils.GetJobForArgs(self.context, args, args.full, required=True)
예제 #3
0
    def Run(self, args):
        """Runs the command.

    Args:
      args: All the arguments that were provided to this command invocation.

    Returns:
      An iterator over the steps in the given job.
    """
        return step_json.ExtractSteps(
            job_utils.GetJobForArgs(self.context, args))