@@ -207,7 +207,7 @@ def project_name(self):
207
207
def _data_stub (self ):
208
208
"""Getter for the gRPC stub used for the Data API.
209
209
210
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
210
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
211
211
:returns: A gRPC stub object.
212
212
:raises: :class:`ValueError <exceptions.ValueError>` if the current
213
213
client has not been :meth:`start`-ed.
@@ -220,7 +220,7 @@ def _data_stub(self):
220
220
def _cluster_stub (self ):
221
221
"""Getter for the gRPC stub used for the Cluster Admin API.
222
222
223
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
223
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
224
224
:returns: A gRPC stub object.
225
225
:raises: :class:`ValueError <exceptions.ValueError>` if the current
226
226
client is not an admin client or if it has not been
@@ -236,7 +236,7 @@ def _cluster_stub(self):
236
236
def _operations_stub (self ):
237
237
"""Getter for the gRPC stub used for the Operations API.
238
238
239
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
239
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
240
240
:returns: A gRPC stub object.
241
241
:raises: :class:`ValueError <exceptions.ValueError>` if the current
242
242
client is not an admin client or if it has not been
@@ -252,7 +252,7 @@ def _operations_stub(self):
252
252
def _table_stub (self ):
253
253
"""Getter for the gRPC stub used for the Table Admin API.
254
254
255
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
255
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
256
256
:returns: A gRPC stub object.
257
257
:raises: :class:`ValueError <exceptions.ValueError>` if the current
258
258
client is not an admin client or if it has not been
@@ -267,7 +267,7 @@ def _table_stub(self):
267
267
def _make_data_stub (self ):
268
268
"""Creates gRPC stub to make requests to the Data API.
269
269
270
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
270
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
271
271
:returns: A gRPC stub object.
272
272
"""
273
273
return make_stub (self , DATA_STUB_FACTORY ,
@@ -276,7 +276,7 @@ def _make_data_stub(self):
276
276
def _make_cluster_stub (self ):
277
277
"""Creates gRPC stub to make requests to the Cluster Admin API.
278
278
279
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
279
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
280
280
:returns: A gRPC stub object.
281
281
"""
282
282
return make_stub (self , CLUSTER_STUB_FACTORY ,
@@ -288,7 +288,7 @@ def _make_operations_stub(self):
288
288
These are for long-running operations of the Cluster Admin API,
289
289
hence the host and port matching.
290
290
291
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
291
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
292
292
:returns: A gRPC stub object.
293
293
"""
294
294
return make_stub (self , OPERATIONS_STUB_FACTORY ,
@@ -297,7 +297,7 @@ def _make_operations_stub(self):
297
297
def _make_table_stub (self ):
298
298
"""Creates gRPC stub to make requests to the Table Admin API.
299
299
300
- :rtype: :class:`grpc.early_adopter.implementations._Stub `
300
+ :rtype: :class:`grpc.beta._stub._AutoIntermediary `
301
301
:returns: A gRPC stub object.
302
302
"""
303
303
return make_stub (self , TABLE_STUB_FACTORY ,
@@ -388,10 +388,9 @@ def list_zones(self):
388
388
zones is not in ``OK`` state.
389
389
"""
390
390
request_pb = messages_pb2 .ListZonesRequest (name = self .project_name )
391
- response = self ._cluster_stub .ListZones .async (request_pb ,
392
- self .timeout_seconds )
393
391
# We expect a `.messages_pb2.ListZonesResponse`
394
- list_zones_response = response .result ()
392
+ list_zones_response = self ._cluster_stub .ListZones (
393
+ request_pb , self .timeout_seconds )
395
394
396
395
result = []
397
396
for zone in list_zones_response .zones :
@@ -410,10 +409,9 @@ def list_clusters(self):
410
409
zones in the request).
411
410
"""
412
411
request_pb = messages_pb2 .ListClustersRequest (name = self .project_name )
413
- response = self ._cluster_stub .ListClusters .async (request_pb ,
414
- self .timeout_seconds )
415
412
# We expect a `.messages_pb2.ListClustersResponse`
416
- list_clusters_response = response .result ()
413
+ list_clusters_response = self ._cluster_stub .ListClusters (
414
+ request_pb , self .timeout_seconds )
417
415
418
416
failed_zones = [zone .display_name
419
417
for zone in list_clusters_response .failed_zones ]
0 commit comments