Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Publish new fields to support cluster group routing for Cloud Bigtable #407

Merged
merged 2 commits into from Aug 18, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion google/cloud/bigtable_admin_v2/types/instance.py
Expand Up @@ -181,7 +181,16 @@ class MultiClusterRoutingUseAny(proto.Message):
available in the event of transient errors or delays. Clusters
in a region are considered equidistant. Choosing this option
sacrifices read-your-writes consistency to improve availability.
"""

Attributes:
cluster_ids (Sequence[str]):
The set of clusters to route to. The order is
ignored; clusters will be tried in order of
distance. If left empty, all clusters are
eligible.
"""

cluster_ids = proto.RepeatedField(proto.STRING, number=1,)

class SingleClusterRouting(proto.Message):
r"""Unconditionally routes all read/write requests to a specific
Expand Down
Expand Up @@ -2816,7 +2816,9 @@ def test_create_app_profile(
name="name_value",
etag="etag_value",
description="description_value",
multi_cluster_routing_use_any=None,
multi_cluster_routing_use_any=instance.AppProfile.MultiClusterRoutingUseAny(
cluster_ids=["cluster_ids_value"]
),
)
response = client.create_app_profile(request)

Expand Down Expand Up @@ -3062,7 +3064,9 @@ def test_get_app_profile(
name="name_value",
etag="etag_value",
description="description_value",
multi_cluster_routing_use_any=None,
multi_cluster_routing_use_any=instance.AppProfile.MultiClusterRoutingUseAny(
cluster_ids=["cluster_ids_value"]
),
)
response = client.get_app_profile(request)

Expand Down