コード例 #1
0
ファイル: list.py プロジェクト: ldhpm2/mathpixlatexconverter
 def CommonArgs(cls, parser):
     # Flags specific to managed CR
     managed_group = flags.GetManagedArgGroup(parser)
     flags.AddRegionArgWithDefault(managed_group)
     # Flags specific to CRoGKE
     gke_group = flags.GetGkeArgGroup(parser)
     namespace_presentation = presentation_specs.ResourcePresentationSpec(
         '--namespace',
         resource_args.GetNamespaceResourceSpec(),
         'Namespace to list services in.',
         required=True,
         prefixes=False)
     concept_parsers.ConceptParser(
         [resource_args.CLUSTER_PRESENTATION,
          namespace_presentation]).AddToParser(gke_group)
     # Flags not specific to any platform
     flags.AddServiceFlag(parser)
     parser.display_info.AddFormat(
         'table('
         '{ready_column},'
         'name:label=REVISION,'
         'active.yesno(yes="yes", no=""),'
         'service_name:label=SERVICE,'
         'creation_timestamp.date("%Y-%m-%d %H:%M:%S %Z"):label=DEPLOYED,'
         'author:label="DEPLOYED BY")'.format(
             ready_column=pretty_print.READY_COLUMN))
     parser.display_info.AddUriFunc(cls._GetResourceUri)
コード例 #2
0
  def CommonArgs(cls, parser):
    # Flags specific to connecting to a cluster
    cluster_group = flags.GetClusterArgGroup(parser)
    namespace_presentation = presentation_specs.ResourcePresentationSpec(
        '--namespace',
        resource_args.GetNamespaceResourceSpec(),
        'Namespace to list revisions in.',
        required=True,
        prefixes=False)
    concept_parsers.ConceptParser(
        [namespace_presentation]).AddToParser(cluster_group)

    # Flags not specific to any platform
    flags.AddServiceFlag(parser)

    parser.display_info.AddFormat(
        'table('
        '{ready_column},'
        'name:label=REVISION,'
        'active.yesno(yes="yes", no=""),'
        'service_name:label=SERVICE:sort=1,'
        'creation_timestamp.date("%Y-%m-%d %H:%M:%S %Z"):'
        'label=DEPLOYED:sort=2:reverse,'
        'author:label="DEPLOYED BY")'.format(
            ready_column=pretty_print.READY_COLUMN))
    parser.display_info.AddUriFunc(cls._GetResourceUri)
コード例 #3
0
ファイル: list.py プロジェクト: oarcia/cherrybit.io
 def Args(parser):
   flags.AddServiceFlag(parser)
   namespace_presentation = presentation_specs.ResourcePresentationSpec(
       '--namespace',
       resource_args.GetNamespaceResourceSpec(),
       'Namespace to list services in.',
       required=True,
       prefixes=False)
   flags.AddRegionArgWithDefault(parser)
   concept_parsers.ConceptParser([
       resource_args.CLUSTER_PRESENTATION,
       namespace_presentation]).AddToParser(parser)
   parser.display_info.AddFormat(
       'table('
       '{ready_column},'
       'name:label=REVISION,service_name:label=SERVICE,author,'
       'creation_timestamp.date("%Y-%m-%d %H:%M:%S %Z"):label=CREATED)'.format(
           ready_column=pretty_print.READY_COLUMN))