Skip to content

Commit e27989c

Browse files
feat: Publish new fields to support cluster group routing for Cloud Bigtable (#407)
* feat: Publish new fields to support cluster group routing for Cloud Bigtable Committer: @garye PiperOrigin-RevId: 391576441 Source-Link: googleapis/googleapis@5f76113 Source-Link: googleapis/googleapis-gen@e01b342 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7988405 commit e27989c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

packages/google-cloud-bigtable/google/cloud/bigtable_admin_v2/types/instance.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,16 @@ class MultiClusterRoutingUseAny(proto.Message):
181181
available in the event of transient errors or delays. Clusters
182182
in a region are considered equidistant. Choosing this option
183183
sacrifices read-your-writes consistency to improve availability.
184-
"""
184+
185+
Attributes:
186+
cluster_ids (Sequence[str]):
187+
The set of clusters to route to. The order is
188+
ignored; clusters will be tried in order of
189+
distance. If left empty, all clusters are
190+
eligible.
191+
"""
192+
193+
cluster_ids = proto.RepeatedField(proto.STRING, number=1,)
185194

186195
class SingleClusterRouting(proto.Message):
187196
r"""Unconditionally routes all read/write requests to a specific

packages/google-cloud-bigtable/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,9 @@ def test_create_app_profile(
28162816
name="name_value",
28172817
etag="etag_value",
28182818
description="description_value",
2819-
multi_cluster_routing_use_any=None,
2819+
multi_cluster_routing_use_any=instance.AppProfile.MultiClusterRoutingUseAny(
2820+
cluster_ids=["cluster_ids_value"]
2821+
),
28202822
)
28212823
response = client.create_app_profile(request)
28222824

@@ -3062,7 +3064,9 @@ def test_get_app_profile(
30623064
name="name_value",
30633065
etag="etag_value",
30643066
description="description_value",
3065-
multi_cluster_routing_use_any=None,
3067+
multi_cluster_routing_use_any=instance.AppProfile.MultiClusterRoutingUseAny(
3068+
cluster_ids=["cluster_ids_value"]
3069+
),
30663070
)
30673071
response = client.get_app_profile(request)
30683072

0 commit comments

Comments
 (0)