Пример #1
0
    def CommonArgs(parser, track):
        """Register flags for this command."""
        parser.add_argument(
            '--regions',
            metavar='REGION',
            help=(
                'Regions containing functions to list. By default, functions '
                'from the region configured in [functions/region] property are '
                'listed.'),
            type=arg_parsers.ArgList(min_length=1),
            default=['-'])

        parser.display_info.AddFormat("""
        table(
          name.basename():sort=1,
          state():label=STATE,
          trigger():label=TRIGGER,
          name.scope("locations").segment(0):label=REGION,
          generation():label=ENVIRONMENT
        )
    """)

        base.URI_FLAG.RemoveFromParser(parser)

        # Add additional flags for GCFv2
        flags.AddGen2Flag(parser, track)
    def Args(parser, track=base.ReleaseTrack.BETA):
        """Registers flags for this command."""
        flags.AddFunctionResourceArg(parser, 'to get IAM policy for')
        flags.AddIAMPolicyFileArg(parser)

        # Add additional flags for GCFv2
        flags.AddGen2Flag(parser, track)
Пример #3
0
    def Args(parser, track=base.ReleaseTrack.BETA):
        """Registers flags for this command."""
        flags.AddFunctionResourceArg(parser, 'to execute')
        flags.AddGen2Flag(parser, track)

        # Add additional flags for GCFv2
        data_flag_group = parser.add_mutually_exclusive_group()
        flags.AddDataFlag(data_flag_group)
        flags.AddCloudEventsFlag(data_flag_group, track)
Пример #4
0
    def Args(parser, track=base.ReleaseTrack.BETA):
        """Registers flags for this command.

    Args:
      parser: The argparse parser.
      track: base.ReleaseTrack, calliope release track.
    """
        AddIamPolicyBinding.Args(parser, track)

        # Add additional flags for GCFv2.
        flags.AddGen2Flag(parser, track)
Пример #5
0
    def Args(parser, track=base.ReleaseTrack.BETA):
        """Registers flags for this command."""
        parser.display_info.AddFormat("""
      table(
        name,
        stage,
        environments()
      )
    """)
        parser.display_info.AddUriFunc(flags.GetLocationsUri)

        flags.AddRegionFlag(parser,
                            help_text='Only show runtimes within the region.')

        flags.AddGen2Flag(parser, track)
 def Args(parser, track=base.ReleaseTrack.BETA):
     """Registers flags for this command."""
     List.Args(parser)
     flags.AddGen2Flag(parser, track)
Пример #7
0
    def CommonArgs(parser, track):
        """Register flags for this command."""
        Describe.Args(parser)

        # Add additional flags for GCFv2
        flags.AddGen2Flag(parser, track)
 def Args(parser, track=base.ReleaseTrack.BETA):
     flags.AddGen2Flag(parser, track)
    def Args(parser, track=base.ReleaseTrack.BETA):
        """Register flags for this command."""
        GetLogs.Args(parser)

        # Add additional flags for GCFv2
        flags.AddGen2Flag(parser, track)
  def Args(parser, track=base.ReleaseTrack.BETA):
    """Registers flags for this command."""
    RemoveIamPolicyBinding.Args(parser, track)

    # Add additional flags for GCFv2.
    flags.AddGen2Flag(parser, track)