Ejemplo n.º 1
0
 def Args(parser):
     base.ASYNC_FLAG.AddToParser(parser)
     common_flags.AddDisplayNameArg(parser)
     labels_util.AddUpdateLabelsFlags(parser)
     resource_args.AddApiConfigResourceArg(parser,
                                           'updated',
                                           positional=True)
Ejemplo n.º 2
0
    def Args(parser):
        base.ASYNC_FLAG.AddToParser(parser)
        common_flags.AddDisplayNameArg(parser)
        labels_util.AddCreateLabelsFlags(parser)
        resource_args.AddApiConfigResourceArg(parser,
                                              'created',
                                              positional=True)
        common_flags.AddBackendAuthServiceAccountFlag(parser)

        group = parser.add_group(mutex=True,
                                 required=True,
                                 help='Configuration files for the API.')
        group.add_argument(
            '--openapi-spec',
            help=
            ('The OpenAPI v2 specification containing service '
             'configuration information, and API specification for the gateway'
             '.'))
        group.add_argument(
            '--grpc-files',
            type=arg_parsers.ArgList(),
            metavar='FILE',
            help=
            ('Files describing the GRPC service. Google Service Configuration '
             'files in JSON or YAML formats as well as Proto '
             'descriptors should be listed.'))
Ejemplo n.º 3
0
def _RegisterParserArgs(parser, track):
    """Register parser args common to all tracks.

  Args:
    parser: The parser being configured
    track: The command track
  """
    base.ASYNC_FLAG.AddToParser(parser)
    common_flags.AddDisplayNameArg(parser)
    labels_util.AddCreateLabelsFlags(parser)
    resource_args.AddApiConfigResourceArg(parser, 'created', positional=True)
    common_flags.AddBackendAuthServiceAccountFlag(parser)

    group = parser.add_group(mutex=True,
                             required=True,
                             help='Configuration files for the API.')
    group.add_argument(
        '--openapi-spec',
        type=arg_parsers.ArgList(),
        metavar='FILE',
        help=(
            'The OpenAPI v2 specifications containing service '
            'configuration information, and API specification for the gateway'
            '.'))

    # When we add gRPC support back to beta, we can remove this and combine the
    # track-specific commands.
    if track == 'alpha':
        group.add_argument(
            '--grpc-files',
            type=arg_parsers.ArgList(),
            metavar='FILE',
            help=
            ('Files describing the GRPC service. Google Service Configuration '
             'files in JSON or YAML formats as well as Proto '
             'descriptors should be listed.'))
Ejemplo n.º 4
0
 def Args(parser):
     base.ASYNC_FLAG.AddToParser(parser)
     common_flags.AddDisplayNameArg(parser)
     labels_util.AddCreateLabelsFlags(parser)
     resource_args.AddGatewayApiConfigResourceArgs(parser, 'created')
Ejemplo n.º 5
0
 def Args(parser):
     base.ASYNC_FLAG.AddToParser(parser)
     common_flags.AddDisplayNameArg(parser)
     labels_util.AddUpdateLabelsFlags(parser)
     resource_args.AddGatewayApiConfigResourceArgs(
         parser, 'updated', api_config_required=False)
Ejemplo n.º 6
0
 def Args(parser):
     base.ASYNC_FLAG.AddToParser(parser)
     common_flags.AddDisplayNameArg(parser)
     common_flags.AddManagedServiceFlag(parser)
     labels_util.AddCreateLabelsFlags(parser)
     resource_args.AddApiResourceArg(parser, 'created', positional=True)