예제 #1
0
  def CommonArgs(parser):
    # Flags not specific to any platform
    service_presentation = presentation_specs.ResourcePresentationSpec(
        'JOB',
        resource_args.GetJobResourceSpec(prompt=True),
        'Job to create.',
        required=True,
        prefixes=False)
    flags.AddImageArg(parser)
    flags.AddLabelsFlag(parser)
    flags.AddParallelismFlag(parser)
    flags.AddCompletionsFlag(parser)
    flags.AddMaxAttemptsFlag(parser)
    flags.AddServiceAccountFlag(parser)
    flags.AddSetEnvVarsFlag(parser)
    flags.AddSetCloudSQLFlag(parser)
    flags.AddVpcConnectorArg(parser)
    flags.AddEgressSettingsFlag(parser)
    flags.AddMemoryFlag(parser)
    flags.AddCpuFlag(parser, managed_only=True)
    flags.AddCommandFlag(parser)
    flags.AddArgsFlag(parser)
    flags.AddClientNameAndVersionFlags(parser)
    flags.AddBinAuthzPolicyFlags(parser, with_clear=False)
    flags.AddBinAuthzBreakglassFlag(parser)

    polling_group = parser.add_mutually_exclusive_group()
    flags.AddAsyncFlag(polling_group)
    flags.AddWaitForCompletionFlag(polling_group)

    concept_parsers.ConceptParser([service_presentation]).AddToParser(parser)
    # No output by default, can be overridden by --format
    parser.display_info.AddFormat('none')
예제 #2
0
 def CommonArgs(parser):
   job_presentation = presentation_specs.ResourcePresentationSpec(
       'JOB',
       resource_args.GetJobResourceSpec(),
       'Job to delete.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser([job_presentation]).AddToParser(parser)
예제 #3
0
  def CommonArgs(parser):
    job_presentation = presentation_specs.ResourcePresentationSpec(
        'JOB',
        resource_args.GetJobResourceSpec(),
        'Job to describe.',
        required=True,
        prefixes=False)
    concept_parsers.ConceptParser([job_presentation]).AddToParser(parser)

    parser.display_info.AddFormat('yaml')
예제 #4
0
 def Args(parser):
     job_presentation = presentation_specs.ResourcePresentationSpec(
         'JOB',
         resource_args.GetJobResourceSpec(prompt=True),
         'Job to execute.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([job_presentation]).AddToParser(parser)
     polling_group = parser.add_mutually_exclusive_group()
     flags.AddAsyncFlag(polling_group)
     flags.AddWaitForCompletionFlag(polling_group)
     # No output by default, can be overridden by --format
     parser.display_info.AddFormat('none')
    def CommonArgs(parser):
        job_presentation = presentation_specs.ResourcePresentationSpec(
            'JOB',
            resource_args.GetJobResourceSpec(),
            'Job to describe.',
            required=True,
            prefixes=False)
        concept_parsers.ConceptParser([job_presentation]).AddToParser(parser)

        resource_printer.RegisterFormatter(job_printer.JOB_PRINTER_FORMAT,
                                           job_printer.JobPrinter,
                                           hidden=True)
        parser.display_info.AddFormat(job_printer.JOB_PRINTER_FORMAT)
        resource_printer.RegisterFormatter(
            export_printer.EXPORT_PRINTER_FORMAT,
            export_printer.ExportPrinter,
            hidden=True)