示例#1
0
    def Run(self, args):
        operations = bio.Operations(properties.VALUES.core.project.Get())

        operation_ref = command_lib_util.ParseOperation(args.name)
        op = operations.Get(operation_ref)

        operation_string = StringIO()
        print_format = display.Displayer(self, args).GetFormat()
        resource_printer.Print(op, print_format, out=operation_string)

        if not console_io.PromptContinue(
                message='{0}\n{1}'.format(operation_string.getvalue(),
                                          'This operation will be canceled')):
            raise errors.BioError('Cancel aborted by user.')

        operations.Cancel(operation_ref)

        log.status.Print('Canceled [{0}].'.format(args.name))
示例#2
0
 def Run(self, args):
     operation_ref = command_lib_util.ParseOperation(args.name)
     return bio.Operations().Get(operation_ref)
示例#3
0
    def Run(self, args):
        """Run the list command."""

        return bio.Operations().List()
示例#4
0
  def Run(self, args):
    """Run the list command."""

    return bio.Operations(properties.VALUES.core.project.Get()).List()
示例#5
0
 def Run(self, args):
   operation_ref = command_lib_util.ParseOperation(args.name)
   return bio.Operations(properties.VALUES.core.project.Get()).Get(
       operation_ref)