Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3085,8 +3085,7 @@ async def sample_create_tcp_route():
should not be set.
tcp_route_id (:class:`str`):
Required. Short name of the TcpRoute
resource to be created. E.g. TODO(Add an
example).
resource to be created.

This corresponds to the ``tcp_route_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -3704,8 +3703,7 @@ async def sample_create_tls_route():
should not be set.
tls_route_id (:class:`str`):
Required. Short name of the TlsRoute
resource to be created. E.g. TODO(Add an
example).
resource to be created.

This corresponds to the ``tls_route_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3520,8 +3520,7 @@ def sample_create_tcp_route():
should not be set.
tcp_route_id (str):
Required. Short name of the TcpRoute
resource to be created. E.g. TODO(Add an
example).
resource to be created.

This corresponds to the ``tcp_route_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -4139,8 +4138,7 @@ def sample_create_tls_route():
should not be set.
tls_route_id (str):
Required. Short name of the TlsRoute
resource to be created. E.g. TODO(Add an
example).
resource to be created.

This corresponds to the ``tls_route_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
28 changes: 16 additions & 12 deletions google/cloud/network_services_v1/types/grpc_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ class GrpcRoute(proto.Message):
with 2 notable exceptions:

- IPs are not allowed.
- A hostname may be prefixed with a wildcard label (\*.).
The wildcard label must appear by itself as the first
label.
- A hostname may be prefixed with a wildcard label
(``*.``). The wildcard label must appear by itself as the
first label.

Hostname can be "precise" which is a domain name without the
terminating dot of a network host (e.g. "foo.example.com")
terminating dot of a network host (e.g. ``foo.example.com``)
or "wildcard", which is a domain name prefixed with a single
wildcard label (e.g. \*.example.com).
wildcard label (e.g. ``*.example.com``).

Note that as per RFC1035 and RFC1123, a label must consist
of lower case alphanumeric characters or '-', and must start
Expand All @@ -90,9 +90,10 @@ class GrpcRoute(proto.Message):
rejected.

For example, while it is acceptable for routes for the
hostnames "\*.foo.bar.com" and "\*.bar.com" to be associated
with the same route, it is not possible to associate two
routes both with "\*.bar.com" or both with "bar.com".
hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be
associated with the same route, it is not possible to
associate two routes both with ``*.bar.com`` or both with
``bar.com``.

If a port is specified, then gRPC clients must use the
channel URI with the port to match this rule (i.e.
Expand Down Expand Up @@ -272,10 +273,13 @@ class Destination(proto.Message):
Optional. Specifies the proportion of
requests forwarded to the backend referenced by
the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here depending
on the precision an implementation supports.

- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here
depending on the precision an implementation
supports.

If only one serviceName is specified and it has
a weight greater than 0, 100% of the traffic is
forwarded to that backend.
Expand Down
40 changes: 25 additions & 15 deletions google/cloud/network_services_v1/types/http_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ class HttpRoute(proto.Message):
exception that:

- IPs are not allowed.
- A hostname may be prefixed with a wildcard label (\*.).
The wildcard label must appear by itself as the first
label.
- A hostname may be prefixed with a wildcard label
(``*.``). The wildcard label must appear by itself as the
first label.

Hostname can be "precise" which is a domain name without the
terminating dot of a network host (e.g. "foo.example.com")
terminating dot of a network host (e.g. ``foo.example.com``)
or "wildcard", which is a domain name prefixed with a single
wildcard label (e.g. \*.example.com).
wildcard label (e.g. ``*.example.com``).

Note that as per RFC1035 and RFC1123, a label must consist
of lower case alphanumeric characters or '-', and must start
Expand All @@ -84,10 +84,10 @@ class HttpRoute(proto.Message):
rejected.

For example, while it is acceptable for routes for the
hostnames "\*.foo.bar.com" and "\*.bar.com" to be associated
with the same Mesh (or Gateways under the same scope), it is
not possible to associate two routes both with "\*.bar.com"
or both with "bar.com".
hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be
associated with the same Mesh (or Gateways under the same
scope), it is not possible to associate two routes both with
``*.bar.com`` or both with ``bar.com``.
meshes (MutableSequence[str]):
Optional. Meshes defines a list of meshes this HttpRoute is
attached to, as one of the routing rules to route the
Expand Down Expand Up @@ -382,10 +382,13 @@ class Destination(proto.Message):
Specifies the proportion of requests
forwarded to the backend referenced by the
serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here depending
on the precision an implementation supports.

- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here
depending on the precision an implementation
supports.

If only one serviceName is specified and it has
a weight greater than 0, 100% of the traffic is
forwarded to that backend.
Expand Down Expand Up @@ -805,11 +808,18 @@ class RouteAction(proto.Message):
request_header_modifier (google.cloud.network_services_v1.types.HttpRoute.HeaderModifier):
The specification for modifying the headers
of a matching request prior to delivery of the
request to the destination.
request to the destination. If HeaderModifiers
are set on both the Destination and the
RouteAction, they will be merged. Conflicts
between the two will not be resolved on the
configuration.
response_header_modifier (google.cloud.network_services_v1.types.HttpRoute.HeaderModifier):
The specification for modifying the headers
of a response prior to sending the response back
to the client.
to the client. If HeaderModifiers are set on
both the Destination and the RouteAction, they
will be merged. Conflicts between the two will
not be resolved on the configuration.
url_rewrite (google.cloud.network_services_v1.types.HttpRoute.URLRewrite):
The specification for rewrite URL before
forwarding requests to the destination.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/network_services_v1/types/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Mesh(proto.Message):
traffic to be redirected to this port regardless
of its actual ip:port destination. If unset, a
port '15001' is used as the interception port.
This will is applicable only for sidecar proxy
This is applicable only for sidecar proxy
deployments.
"""

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/network_services_v1/types/service_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ServiceBinding(proto.Message):
name (str):
Required. Name of the ServiceBinding resource. It matches
pattern
``projects/*/locations/global/serviceBindings/service_binding_name>``.
``projects/*/locations/global/serviceBindings/service_binding_name``.
description (str):
Optional. A free-text description of the
resource. Max length 1024 characters.
Expand Down
21 changes: 14 additions & 7 deletions google/cloud/network_services_v1/types/tcp_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class RouteMatch(proto.Message):
matches a single IP address). Only IPV4
addresses are supported.
Examples:

"10.0.0.1" - matches against this exact IP
address. "10.0.0.0/8" - matches against any IP
address within the 10.0.0.0 subnet and
Expand Down Expand Up @@ -151,12 +152,15 @@ class RouteAction(proto.Message):
destinations (MutableSequence[google.cloud.network_services_v1.types.TcpRoute.RouteDestination]):
Optional. The destination services to which
traffic should be forwarded. At least one
destination service is required.
destination service is required. Only one of
route destination or original destination can be
set.
original_destination (bool):
Optional. If true, Router will use the
destination IP and port of the original
connection as the destination of the request.
Default is false.
Default is false. Only one of route destinations
or original destination can be set.
"""

destinations: MutableSequence[
Expand All @@ -182,10 +186,13 @@ class RouteDestination(proto.Message):
Optional. Specifies the proportion of
requests forwarded to the backend referenced by
the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here depending
on the precision an implementation supports.

- weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon
from the exact proportion defined here
depending on the precision an implementation
supports.

If only one serviceName is specified and it has
a weight greater than 0, 100% of the traffic is
forwarded to that backend.
Expand Down Expand Up @@ -332,7 +339,7 @@ class CreateTcpRouteRequest(proto.Message):
the format ``projects/*/locations/global``.
tcp_route_id (str):
Required. Short name of the TcpRoute resource
to be created. E.g. TODO(Add an example).
to be created.
tcp_route (google.cloud.network_services_v1.types.TcpRoute):
Required. TcpRoute resource to be created.
"""
Expand Down
19 changes: 11 additions & 8 deletions google/cloud/network_services_v1/types/tls_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ class RouteMatch(proto.Message):
sni_host (MutableSequence[str]):
Optional. SNI (server name indicator) to match against. SNI
will be matched against all wildcard domains, i.e.
www.example.com will be first matched against
www.example.com, then \*.example.com, then \*.com. Partial
wildcards are not supported, and values like \*w.example.com
are invalid. At least one of sni_host and alpn is required.
Up to 5 sni hosts across all matches can be set.
``www.example.com`` will be first matched against
``www.example.com``, then ``*.example.com``, then ``*.com.``
Partial wildcards are not supported, and values like
\*w.example.com are invalid. At least one of sni_host and
alpn is required. Up to 5 sni hosts across all matches can
be set.
alpn (MutableSequence[str]):
Optional. ALPN (Application-Layer Protocol Negotiation) to
match against. Examples: "http/1.1", "h2". At least one of
Expand Down Expand Up @@ -164,8 +165,10 @@ class RouteDestination(proto.Message):
weight (int):
Optional. Specifies the proportion of requests forwareded to
the backend referenced by the service_name field. This is
computed as: weight/Sum(weights in destinations) Weights in
all destinations does not need to sum up to 100.
computed as:

- weight/Sum(weights in destinations) Weights in all
destinations does not need to sum up to 100.
"""

service_name: str = proto.Field(
Expand Down Expand Up @@ -298,7 +301,7 @@ class CreateTlsRouteRequest(proto.Message):
the format ``projects/*/locations/global``.
tls_route_id (str):
Required. Short name of the TlsRoute resource
to be created. E.g. TODO(Add an example).
to be created.
tls_route (google.cloud.network_services_v1.types.TlsRoute):
Required. TlsRoute resource to be created.
"""
Expand Down