예제 #1
0
 def Args(parser):
   flags.AddBrokerArg(parser)
   namespace_presentation = presentation_specs.ResourcePresentationSpec(
       '--namespace',
       resource_args.GetCoreNamespaceResourceSpec(),
       'Namespace to create the Broker in.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser([namespace_presentation]).AddToParser(parser)
예제 #2
0
 def Args(parser):
     flags.AddCopyDefaultSecret(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         'namespace',
         resource_args.GetCoreNamespaceResourceSpec(),
         'Namespace to copy secret to.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([namespace_presentation
                                    ]).AddToParser(parser)
예제 #3
0
 def CommonArgs(parser):
     """Defines arguments common to all release tracks."""
     flags.AddServiceAccountFlag(parser)
     flags.AddBrokerArg(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetCoreNamespaceResourceSpec(),
         'Namespace to create the Broker in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser([namespace_presentation
                                    ]).AddToParser(parser)
예제 #4
0
 def Args(cls, parser):
   namespace_presentation = presentation_specs.ResourcePresentationSpec(
       '--namespace',
       resource_args.GetCoreNamespaceResourceSpec(),
       'Namespace to create the Broker in.',
       required=True,
       prefixes=False)
   concept_parsers.ConceptParser([namespace_presentation]).AddToParser(parser)
   parser.display_info.AddFormat("""table(
       {ready_column},
       firstof(id,metadata.name):label=BROKER,
       status.address.url:label=URL)
       """.format(ready_column=pretty_print.READY_COLUMN))
   parser.display_info.AddUriFunc(cls._GetResourceUri)
  def CommonArgs(cls, parser):
    # Flags specific to connecting to a cluster
    cluster_group = serverless_flags.GetClusterArgGroup(parser)
    namespace_presentation = presentation_specs.ResourcePresentationSpec(
        '--namespace',
        resource_args.GetCoreNamespaceResourceSpec(),
        'Namespace to list triggers in.',
        required=True,
        prefixes=False)
    concept_parsers.ConceptParser(
        [namespace_presentation]).AddToParser(cluster_group)

    # Flags not specific to any platform
    flags.AddTargetServiceFlag(parser)
    parser.display_info.AddFormat("""table(
        {ready_column},
        firstof(id,metadata.name):label=TRIGGER,
        filter_attributes.extract({type_field}).join():label="EVENT TYPE",
        subscriber:label=TARGET)""".format(
            ready_column=pretty_print.READY_COLUMN,
            type_field=trigger.EVENT_TYPE_FIELD))
    parser.display_info.AddUriFunc(cls._GetResourceUri)