Ejemplo n.º 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))
Ejemplo n.º 2
0
 def Run(self, args):
     operation_ref = command_lib_util.ParseOperation(args.name)
     return bio.Operations().Get(operation_ref)
Ejemplo n.º 3
0
 def Run(self, args):
   operation_ref = command_lib_util.ParseOperation(args.name)
   return bio.Operations(properties.VALUES.core.project.Get()).Get(
       operation_ref)