Skip to content
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 @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.5.23" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.5.23" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class ServiceLbPolicy(proto.Message):
failover_config (google.cloud.network_services_v1.types.ServiceLbPolicy.FailoverConfig):
Optional. Configuration related to health
based failover.
isolation_config (google.cloud.network_services_v1.types.ServiceLbPolicy.IsolationConfig):
Optional. Configuration to provide isolation
support for the associated Backend Service.
"""

class LoadBalancingAlgorithm(proto.Enum):
Expand Down Expand Up @@ -101,6 +104,41 @@ class LoadBalancingAlgorithm(proto.Enum):
WATERFALL_BY_REGION = 5
WATERFALL_BY_ZONE = 6

class IsolationGranularity(proto.Enum):
r"""The granularity of this isolation restriction.

Values:
ISOLATION_GRANULARITY_UNSPECIFIED (0):
No isolation is configured for the backend
service. Traffic can overflow based on the load
balancing algorithm.
REGION (1):
Traffic for this service will be isolated at
the cloud region level.
"""
ISOLATION_GRANULARITY_UNSPECIFIED = 0
REGION = 1

class IsolationMode(proto.Enum):
r"""The mode of this isolation restriction, defining whether
clients in a given region are allowed to reach out to another
region.

Values:
ISOLATION_MODE_UNSPECIFIED (0):
No isolation mode is configured for the
backend service.
NEAREST (1):
Traffic will be sent to the nearest region.
STRICT (2):
Traffic will fail if no serving backends are
available in the same region as the load
balancer.
"""
ISOLATION_MODE_UNSPECIFIED = 0
NEAREST = 1
STRICT = 2

class AutoCapacityDrain(proto.Message):
r"""Option to specify if an unhealthy IG/NEG should be considered
for global load balancing and traffic routing.
Expand Down Expand Up @@ -146,6 +184,30 @@ class FailoverConfig(proto.Message):
number=1,
)

class IsolationConfig(proto.Message):
r"""Configuration to provide isolation support for the associated
Backend Service.

Attributes:
isolation_granularity (google.cloud.network_services_v1.types.ServiceLbPolicy.IsolationGranularity):
Optional. The isolation granularity of the
load balancer.
isolation_mode (google.cloud.network_services_v1.types.ServiceLbPolicy.IsolationMode):
Optional. The isolation mode of the load
balancer.
"""

isolation_granularity: "ServiceLbPolicy.IsolationGranularity" = proto.Field(
proto.ENUM,
number=1,
enum="ServiceLbPolicy.IsolationGranularity",
)
isolation_mode: "ServiceLbPolicy.IsolationMode" = proto.Field(
proto.ENUM,
number=2,
enum="ServiceLbPolicy.IsolationMode",
)

name: str = proto.Field(
proto.STRING,
number=1,
Expand Down Expand Up @@ -184,6 +246,11 @@ class FailoverConfig(proto.Message):
number=10,
message=FailoverConfig,
)
isolation_config: IsolationConfig = proto.Field(
proto.MESSAGE,
number=11,
message=IsolationConfig,
)


class ListServiceLbPoliciesRequest(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-network-services",
"version": "0.5.23"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47285,6 +47285,7 @@ def test_create_service_lb_policy_rest_call_success(request_type):
"load_balancing_algorithm": 3,
"auto_capacity_drain": {"enable": True},
"failover_config": {"failover_health_threshold": 2649},
"isolation_config": {"isolation_granularity": 1, "isolation_mode": 1},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -47496,6 +47497,7 @@ def test_update_service_lb_policy_rest_call_success(request_type):
"load_balancing_algorithm": 3,
"auto_capacity_drain": {"enable": True},
"failover_config": {"failover_health_threshold": 2649},
"isolation_config": {"isolation_granularity": 1, "isolation_mode": 1},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down
Loading