def Args(parser):
     """Set up arguments for this command."""
     AddSignedUrlKey.BACKEND_BUCKET_ARG = flags.BackendBucketArgument()
     AddSignedUrlKey.BACKEND_BUCKET_ARG.AddArgument(
         parser, operation_type='add CDN signed URL key to')
     signed_url_flags.AddCdnSignedUrlKeyName(parser, required=True)
     signed_url_flags.AddCdnSignedUrlKeyFile(parser, required=True)
def AddUpdatableArgs(cls, parser, operation_type):
    """Adds top-level backend bucket arguments that can be updated.

  Args:
    cls: type, Class to add backend bucket argument to.
    parser: The argparse parser.
    operation_type: str, operation_type forwarded to AddArgument(...)
  """
    cls.BACKEND_BUCKET_ARG = backend_buckets_flags.BackendBucketArgument()
    cls.BACKEND_BUCKET_ARG.AddArgument(parser, operation_type=operation_type)

    parser.add_argument(
        '--description',
        help='An optional, textual description for the backend bucket.')

    parser.add_argument('--enable-cdn',
                        action=arg_parsers.StoreTrueFalseAction,
                        help="""\
      Enable Cloud CDN for the backend bucket. Cloud CDN can cache HTTP
      responses from a backend bucket at the edge of the network, close to
      users.""")
def AddUpdatableArgs(cls, parser):
    """Adds top-level backend bucket arguments that can be updated.

  Args:
    cls: type, Class to add backend bucket argument to.
    parser: The argparse parser.
  """
    cls.BACKEND_BUCKET_ARG = backend_buckets_flags.BackendBucketArgument()
    cls.BACKEND_BUCKET_ARG.AddArgument(parser)

    parser.add_argument(
        '--description',
        help='An optional, textual description for the backend bucket.')

    parser.add_argument(
        '--enable-cdn',
        action='store_true',
        default=None,  # Tri-valued, None => don't change the setting.
        help="""\
      Enable Cloud CDN for the backend bucket. Cloud CDN can cache HTTP
      responses from a backend bucket at the edge of the network, close to
      users.""")
示例#4
0
 def Args(parser):
     Delete.BACKEND_BUCKET_ARG = flags.BackendBucketArgument(plural=True)
     Delete.BACKEND_BUCKET_ARG.AddArgument(parser, operation_type='delete')
     parser.display_info.AddCacheUpdater(flags.BackendBucketsCompleter)
示例#5
0
 def Args(parser):
     Describe.BACKEND_BUCKET_ARG = flags.BackendBucketArgument()
     Describe.BACKEND_BUCKET_ARG.AddArgument(parser,
                                             operation_type='describe')
 def Args(parser):
     """Set up arguments for this command."""
     DeleteSignedUrlKey.BACKEND_BUCKET_ARG = flags.BackendBucketArgument()
     DeleteSignedUrlKey.BACKEND_BUCKET_ARG.AddArgument(
         parser, operation_type='delete CDN signed URL key from')
     flags.AddCdnSignedUrlKeyName(parser)
示例#7
0
 def Args(parser):
     Delete.BACKEND_BUCKET_ARG = flags.BackendBucketArgument(plural=True)
     Delete.BACKEND_BUCKET_ARG.AddArgument(parser, operation_type='delete')