def Args(cls, parser): if cls.ReleaseTrack() == base.ReleaseTrack.ALPHA: cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) else: cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, operation_type='import') export_util.AddImportFlags(parser, cls.GetSchemaPath(for_help=True))
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) parser.add_argument( '--description', help='An optional, textual description for the host rule.') parser.add_argument('--hosts', type=arg_parsers.ArgList(min_length=1), metavar='HOST', required=True, help="""\ The set of hosts to match requests against. Each host must be a fully qualified domain name (FQDN) with the exception that the host can begin with a ``*'' or ``*-''. ``*'' acts as a glob and will match any string of atoms to the left where an atom is separated by dots (``.'') or dashes (``-''). """) parser.add_argument('--path-matcher-name', required=True, help="""\ The name of the patch matcher to use if a request matches this host rule. The patch matcher must already exist in the URL map (see `gcloud compute url-maps add-path-matcher`). """)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, cust_metavar='URLMAP') path = parser.add_argument( '--path', required=True, help=('Specifies the set of paths within the URL map to ' 'invalidate.')) host = parser.add_argument( '--host', required=False, default=None, help=('Specifies the host to restrict this invalidation to.')) host.detailed_help = """\ If set, this invalidation will apply only to requests to the specified host. """ parser.add_argument( '--async', action='store_true', help='Do not wait for the operation to complete.', ) path.detailed_help = """\
def Args(cls, parser): cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap()) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap()) cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) _Args(parser) group = parser.add_mutually_exclusive_group(required=True) group.add_argument( '--default-service', help=('A backend service that will be used for requests that the path ' 'matcher cannot match. Exactly one of --default-service or ' '--default-backend-bucket is required.')) group.add_argument( '--default-backend-bucket', help=('A backend bucket that will be used for requests that the path ' 'matcher cannot match. Exactly one of --default-service or ' '--default-backend-bucket is required.')) parser.add_argument('--backend-service-path-rules', type=arg_parsers.ArgDict(min_length=1), default={}, metavar='PATH=SERVICE', help='Rules for mapping request paths to services.') parser.add_argument( '--backend-bucket-path-rules', type=arg_parsers.ArgDict(min_length=1), default={}, metavar='PATH=BUCKET', help='Rules for mapping request paths to backend buckets.')
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser, operation_type='export') export_util.AddExportFlags( parser, _GetSchemaPath(cls.ReleaseTrack(), for_help=True))
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) parser.add_argument('--path-matcher-name', required=True, help='The name of the path matcher to remove.')
def Args(cls, parser): cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMapPathMatcher()) cls.BACKEND_SERVICE_ARG.AddArgument(parser) cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(cls, parser): cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap()) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap()) cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser) parser.add_argument('--path-matcher-name', required=True, help='The name of the path matcher to remove.')
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( plural=True, include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser, operation_type='delete') parser.display_info.AddCacheUpdater( flags.UrlMapsCompleterAlpha if cls. _include_l7_internal_load_balancing else flags.UrlMapsCompleter)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser, operation_type='describe') parser.display_info.AddFormat("""\ table( description, operation_http_status():label=HTTP_STATUS, status, insertTime:label=TIMESTAMP )""")
def Args(cls, parser): parser.display_info.AddFormat(flags.DEFAULT_LIST_FORMAT) cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap(required=False)) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap(required=False)) cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, operation_type='create') _Args(parser)
def Args(cls, parser): cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap( required=False)) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap( required=False, include_alpha=True)) cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(cls, parser): cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap()) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap( include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing)) cls.URL_MAP_ARG = flags.UrlMapArgument( include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) parser.add_argument( '--host', required=True, help='One of the hosts in the host rule to remove.') parser.add_argument( '--delete-orphaned-path-matcher', action='store_true', default=False, help=('If provided and a path matcher is orphaned as a result of this ' 'command, the command removes the orphaned path matcher instead ' 'of failing.'))
def Args(cls, parser): cls.BACKEND_BUCKET_ARG = ( backend_bucket_flags.BackendBucketArgumentForUrlMap(required=False)) cls.BACKEND_SERVICE_ARG = ( backend_service_flags.BackendServiceArgumentForUrlMap(required=False)) cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) group = parser.add_mutually_exclusive_group(required=True) group.add_argument( '--default-service', help=('A backend service that will be used for requests for which this ' 'URL map has no mappings.')) group.add_argument( '--default-backend-bucket', help=('A backend bucket that will be used for requests for which this ' 'URL map has no mappings.'))
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, cust_metavar='URLMAP') path = parser.add_argument( '--path', required=True, help=('Specifies the set of paths within the URL map to ' 'invalidate.')) parser.add_argument( '--async', action='store_true', help='Do not wait for the operation to complete.', ) path.detailed_help = """\
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, cust_metavar='URLMAP') parser.add_argument('--path', required=True, help="""\ A path specifying which objects to invalidate. PATH must start with ``/'' and the only place a ``*'' is allowed is at the end following a ``/''. It will be matched against URL paths, which do not include scheme, host, or any text after the first ``?'' or ``#'' (and those characters are not allowed here). For example, for the URL ``https://example.com/whatever/x.html?a=b'', the path is ``/whatever/x.html''. If PATH ends with ``*'', the preceding string is a prefix, and all URLs whose paths begin with it will be invalidated. If PATH doesn't end with ``*'', then only URLs with exactly that path will be invalidated. Examples: - ``'', ``*'', anything that doesn't start with ``/'': error - ``/'': just the root URL - ``/*'': everything - ``/x/y'': ``/x/y'' only (and not ``/x/y/'') - ``/x/y/'': ``/x/y/'' only (and not ``/x/y'') - ``/x/y/*'': ``/x/y/'' and everything under it """) parser.add_argument('--host', required=False, default=None, help="""\ If set, this invalidation will apply only to requests to the specified host. """) parser.add_argument( '--async', action='store_true', help='Do not wait for the operation to complete.', )
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( required=False, include_l7_internal_load_balancing=True) declarative_python_util.RegisterArgs(parser, cls.URL_MAP_ARG.AddArgument, operation_type='export')
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( include_l7_internal_load_balancing=cls ._include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser, operation_type='describe')
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser, cust_metavar='URLMAP') _Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser, cust_metavar='URLMAP') _Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) base_classes.BaseEdit.Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument() cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser) _Args(parser)
def Args(parser): Describe.URL_MAP_ARG = flags.UrlMapArgument() Describe.URL_MAP_ARG.AddArgument(parser, operation_type='describe')
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument( include_l7_internal_load_balancing=cls. _include_l7_internal_load_balancing) cls.URL_MAP_ARG.AddArgument(parser)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument(include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser, operation_type='describe')
def Args(parser): Delete.URL_MAP_ARG = flags.UrlMapArgument(plural=True) Delete.URL_MAP_ARG.AddArgument(parser, operation_type='delete') parser.display_info.AddCacheUpdater(flags.UrlMapsCompleter)
def Args(cls, parser): cls.URL_MAP_ARG = flags.UrlMapArgument(plural=True, include_alpha=True) cls.URL_MAP_ARG.AddArgument(parser, operation_type='delete') parser.display_info.AddCacheUpdater(flags.UrlMapsCompleterAlpha)