2929
3030from pkg_resources import get_distribution
3131
32- from google .cloud ._helpers import make_stub
32+ from google .cloud ._helpers import make_secure_stub
3333from google .cloud .bigtable ._generated import bigtable_instance_admin_pb2
3434from google .cloud .bigtable ._generated import bigtable_pb2
3535from google .cloud .bigtable ._generated import bigtable_table_admin_pb2
4444
4545TABLE_ADMIN_HOST = 'bigtableadmin.googleapis.com'
4646"""Table Admin API request host."""
47- TABLE_ADMIN_PORT = 443
48- """Table Admin API request port."""
4947
5048INSTANCE_ADMIN_HOST = 'bigtableadmin.googleapis.com'
5149"""Cluster Admin API request host."""
52- INSTANCE_ADMIN_PORT = 443
53- """Cluster Admin API request port."""
5450
5551DATA_API_HOST = 'bigtable.googleapis.com'
5652"""Data API request host."""
57- DATA_API_PORT = 443
58- """Data API request port."""
5953
6054OPERATIONS_API_HOST = INSTANCE_ADMIN_HOST
61- OPERATIONS_API_PORT = INSTANCE_ADMIN_PORT
6255
6356ADMIN_SCOPE = 'https://www.googleapis.com/auth/bigtable.admin'
6457"""Scope for interacting with the Cluster Admin and Table Admin APIs."""
@@ -81,9 +74,8 @@ def _make_data_stub(client):
8174 :rtype: :class:`._generated.bigtable_pb2.BigtableStub`
8275 :returns: A gRPC stub object.
8376 """
84- return make_stub (client .credentials , client .user_agent ,
85- bigtable_pb2 .BigtableStub ,
86- DATA_API_HOST , DATA_API_PORT )
77+ return make_secure_stub (client .credentials , client .user_agent ,
78+ bigtable_pb2 .BigtableStub , DATA_API_HOST )
8779
8880
8981def _make_instance_stub (client ):
@@ -95,9 +87,10 @@ def _make_instance_stub(client):
9587 :rtype: :class:`.bigtable_instance_admin_pb2.BigtableInstanceAdminStub`
9688 :returns: A gRPC stub object.
9789 """
98- return make_stub (client .credentials , client .user_agent ,
99- bigtable_instance_admin_pb2 .BigtableInstanceAdminStub ,
100- INSTANCE_ADMIN_HOST , INSTANCE_ADMIN_PORT )
90+ return make_secure_stub (
91+ client .credentials , client .user_agent ,
92+ bigtable_instance_admin_pb2 .BigtableInstanceAdminStub ,
93+ INSTANCE_ADMIN_HOST )
10194
10295
10396def _make_operations_stub (client ):
@@ -112,9 +105,9 @@ def _make_operations_stub(client):
112105 :rtype: :class:`._generated.operations_grpc_pb2.OperationsStub`
113106 :returns: A gRPC stub object.
114107 """
115- return make_stub (client .credentials , client .user_agent ,
116- operations_grpc_pb2 .OperationsStub ,
117- OPERATIONS_API_HOST , OPERATIONS_API_PORT )
108+ return make_secure_stub (client .credentials , client .user_agent ,
109+ operations_grpc_pb2 .OperationsStub ,
110+ OPERATIONS_API_HOST )
118111
119112
120113def _make_table_stub (client ):
@@ -126,9 +119,9 @@ def _make_table_stub(client):
126119 :rtype: :class:`.bigtable_instance_admin_pb2.BigtableTableAdminStub`
127120 :returns: A gRPC stub object.
128121 """
129- return make_stub (client .credentials , client .user_agent ,
130- bigtable_table_admin_pb2 .BigtableTableAdminStub ,
131- TABLE_ADMIN_HOST , TABLE_ADMIN_PORT )
122+ return make_secure_stub (client .credentials , client .user_agent ,
123+ bigtable_table_admin_pb2 .BigtableTableAdminStub ,
124+ TABLE_ADMIN_HOST )
132125
133126
134127class Client (_ClientFactoryMixin , _ClientProjectMixin ):
0 commit comments