Skip to content

Commit 57dafcb

Browse files
authored
Container: pick up fixes to GAPIC generator. (#6634)
Includes fixes from these PRs: - googleapis/gapic-generator#2407 - googleapis/gapic-generator#2396 Includes changes to generated tests. Includes synth replacements to work around generated docstring issue: - googleapis/gapic-generator/issues/2449 Closes #6483.
1 parent 1e79622 commit 57dafcb

File tree

8 files changed

+2124
-732
lines changed

8 files changed

+2124
-732
lines changed

container/google/cloud/container_v1/gapic/cluster_manager_client.py

Lines changed: 409 additions & 162 deletions
Large diffs are not rendered by default.

container/google/cloud/container_v1/gapic/cluster_manager_client_config.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,152 +18,152 @@
1818
},
1919
"methods": {
2020
"ListClusters": {
21-
"timeout_millis": 10000,
21+
"timeout_millis": 20000,
2222
"retry_codes_name": "idempotent",
2323
"retry_params_name": "default"
2424
},
2525
"GetCluster": {
26-
"timeout_millis": 10000,
26+
"timeout_millis": 20000,
2727
"retry_codes_name": "idempotent",
2828
"retry_params_name": "default"
2929
},
3030
"CreateCluster": {
31-
"timeout_millis": 60000,
31+
"timeout_millis": 45000,
3232
"retry_codes_name": "non_idempotent",
3333
"retry_params_name": "default"
3434
},
3535
"UpdateCluster": {
36-
"timeout_millis": 60000,
36+
"timeout_millis": 20000,
3737
"retry_codes_name": "non_idempotent",
3838
"retry_params_name": "default"
3939
},
4040
"UpdateNodePool": {
41-
"timeout_millis": 60000,
41+
"timeout_millis": 20000,
4242
"retry_codes_name": "non_idempotent",
4343
"retry_params_name": "default"
4444
},
4545
"SetNodePoolAutoscaling": {
46-
"timeout_millis": 60000,
46+
"timeout_millis": 20000,
4747
"retry_codes_name": "non_idempotent",
4848
"retry_params_name": "default"
4949
},
5050
"SetLoggingService": {
51-
"timeout_millis": 60000,
51+
"timeout_millis": 20000,
5252
"retry_codes_name": "non_idempotent",
5353
"retry_params_name": "default"
5454
},
5555
"SetMonitoringService": {
56-
"timeout_millis": 60000,
56+
"timeout_millis": 20000,
5757
"retry_codes_name": "non_idempotent",
5858
"retry_params_name": "default"
5959
},
6060
"SetAddonsConfig": {
61-
"timeout_millis": 60000,
61+
"timeout_millis": 20000,
6262
"retry_codes_name": "non_idempotent",
6363
"retry_params_name": "default"
6464
},
6565
"SetLocations": {
66-
"timeout_millis": 60000,
66+
"timeout_millis": 20000,
6767
"retry_codes_name": "non_idempotent",
6868
"retry_params_name": "default"
6969
},
7070
"UpdateMaster": {
71-
"timeout_millis": 60000,
71+
"timeout_millis": 20000,
7272
"retry_codes_name": "non_idempotent",
7373
"retry_params_name": "default"
7474
},
7575
"SetMasterAuth": {
76-
"timeout_millis": 60000,
76+
"timeout_millis": 20000,
7777
"retry_codes_name": "non_idempotent",
7878
"retry_params_name": "default"
7979
},
8080
"DeleteCluster": {
81-
"timeout_millis": 30000,
81+
"timeout_millis": 20000,
8282
"retry_codes_name": "idempotent",
8383
"retry_params_name": "default"
8484
},
8585
"ListOperations": {
86-
"timeout_millis": 10000,
86+
"timeout_millis": 20000,
8787
"retry_codes_name": "idempotent",
8888
"retry_params_name": "default"
8989
},
9090
"GetOperation": {
91-
"timeout_millis": 10000,
91+
"timeout_millis": 20000,
9292
"retry_codes_name": "idempotent",
9393
"retry_params_name": "default"
9494
},
9595
"CancelOperation": {
96-
"timeout_millis": 30000,
96+
"timeout_millis": 20000,
9797
"retry_codes_name": "non_idempotent",
9898
"retry_params_name": "default"
9999
},
100100
"GetServerConfig": {
101-
"timeout_millis": 10000,
101+
"timeout_millis": 20000,
102102
"retry_codes_name": "idempotent",
103103
"retry_params_name": "default"
104104
},
105105
"ListNodePools": {
106-
"timeout_millis": 10000,
106+
"timeout_millis": 20000,
107107
"retry_codes_name": "idempotent",
108108
"retry_params_name": "default"
109109
},
110110
"GetNodePool": {
111-
"timeout_millis": 10000,
111+
"timeout_millis": 20000,
112112
"retry_codes_name": "idempotent",
113113
"retry_params_name": "default"
114114
},
115115
"CreateNodePool": {
116-
"timeout_millis": 60000,
116+
"timeout_millis": 20000,
117117
"retry_codes_name": "non_idempotent",
118118
"retry_params_name": "default"
119119
},
120120
"DeleteNodePool": {
121-
"timeout_millis": 30000,
121+
"timeout_millis": 20000,
122122
"retry_codes_name": "idempotent",
123123
"retry_params_name": "default"
124124
},
125125
"RollbackNodePoolUpgrade": {
126-
"timeout_millis": 60000,
126+
"timeout_millis": 20000,
127127
"retry_codes_name": "non_idempotent",
128128
"retry_params_name": "default"
129129
},
130130
"SetNodePoolManagement": {
131-
"timeout_millis": 60000,
131+
"timeout_millis": 20000,
132132
"retry_codes_name": "non_idempotent",
133133
"retry_params_name": "default"
134134
},
135135
"SetLabels": {
136-
"timeout_millis": 60000,
136+
"timeout_millis": 20000,
137137
"retry_codes_name": "non_idempotent",
138138
"retry_params_name": "default"
139139
},
140140
"SetLegacyAbac": {
141-
"timeout_millis": 60000,
141+
"timeout_millis": 20000,
142142
"retry_codes_name": "non_idempotent",
143143
"retry_params_name": "default"
144144
},
145145
"StartIPRotation": {
146-
"timeout_millis": 60000,
146+
"timeout_millis": 20000,
147147
"retry_codes_name": "non_idempotent",
148148
"retry_params_name": "default"
149149
},
150150
"CompleteIPRotation": {
151-
"timeout_millis": 60000,
151+
"timeout_millis": 20000,
152152
"retry_codes_name": "non_idempotent",
153153
"retry_params_name": "default"
154154
},
155155
"SetNodePoolSize": {
156-
"timeout_millis": 60000,
156+
"timeout_millis": 20000,
157157
"retry_codes_name": "non_idempotent",
158158
"retry_params_name": "default"
159159
},
160160
"SetNetworkPolicy": {
161-
"timeout_millis": 60000,
161+
"timeout_millis": 20000,
162162
"retry_codes_name": "non_idempotent",
163163
"retry_params_name": "default"
164164
},
165165
"SetMaintenancePolicy": {
166-
"timeout_millis": 60000,
166+
"timeout_millis": 20000,
167167
"retry_codes_name": "non_idempotent",
168168
"retry_params_name": "default"
169169
}

container/google/cloud/container_v1/gapic/enums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ class Status(enum.IntEnum):
4747
STOPPING (int): The STOPPING state indicates the cluster is being deleted.
4848
ERROR (int): The ERROR state indicates the cluster may be unusable. Details can be
4949
found in the ``statusMessage`` field.
50+
DEGRADED (int): The DEGRADED state indicates the cluster requires user action to restore
51+
full functionality. Details can be found in the ``statusMessage`` field.
5052
"""
5153
STATUS_UNSPECIFIED = 0
5254
PROVISIONING = 1
5355
RUNNING = 2
5456
RECONCILING = 3
5557
STOPPING = 4
5658
ERROR = 5
59+
DEGRADED = 6
5760

5861

5962
class Operation(object):

container/google/cloud/container_v1/gapic/transports/cluster_manager_grpc_transport.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def __init__(self,
6262
credentials=credentials,
6363
)
6464

65+
self._channel = channel
66+
6567
# gRPC uses objects called "stubs" that are bound to the
6668
# channel and provide a basic method for each RPC.
6769
self._stubs = {
@@ -92,6 +94,15 @@ def create_channel(cls,
9294
scopes=cls._OAUTH_SCOPES,
9395
)
9496

97+
@property
98+
def channel(self):
99+
"""The gRPC channel used by the transport.
100+
101+
Returns:
102+
grpc.Channel: A gRPC channel object.
103+
"""
104+
return self._channel
105+
95106
@property
96107
def list_clusters(self):
97108
"""Return the gRPC stub for {$apiMethod.name}.
@@ -160,7 +171,7 @@ def update_cluster(self):
160171
def update_node_pool(self):
161172
"""Return the gRPC stub for {$apiMethod.name}.
162173
163-
Updates the version and/or image type of a specific node pool.
174+
Updates the version and/or image type for a specific node pool.
164175
165176
Returns:
166177
Callable: A callable which accepts the appropriate
@@ -173,7 +184,7 @@ def update_node_pool(self):
173184
def set_node_pool_autoscaling(self):
174185
"""Return the gRPC stub for {$apiMethod.name}.
175186
176-
Sets the autoscaling settings of a specific node pool.
187+
Sets the autoscaling settings for a specific node pool.
177188
178189
Returns:
179190
Callable: A callable which accepts the appropriate
@@ -186,7 +197,7 @@ def set_node_pool_autoscaling(self):
186197
def set_logging_service(self):
187198
"""Return the gRPC stub for {$apiMethod.name}.
188199
189-
Sets the logging service of a specific cluster.
200+
Sets the logging service for a specific cluster.
190201
191202
Returns:
192203
Callable: A callable which accepts the appropriate
@@ -199,7 +210,7 @@ def set_logging_service(self):
199210
def set_monitoring_service(self):
200211
"""Return the gRPC stub for {$apiMethod.name}.
201212
202-
Sets the monitoring service of a specific cluster.
213+
Sets the monitoring service for a specific cluster.
203214
204215
Returns:
205216
Callable: A callable which accepts the appropriate
@@ -212,7 +223,7 @@ def set_monitoring_service(self):
212223
def set_addons_config(self):
213224
"""Return the gRPC stub for {$apiMethod.name}.
214225
215-
Sets the addons of a specific cluster.
226+
Sets the addons for a specific cluster.
216227
217228
Returns:
218229
Callable: A callable which accepts the appropriate
@@ -225,7 +236,7 @@ def set_addons_config(self):
225236
def set_locations(self):
226237
"""Return the gRPC stub for {$apiMethod.name}.
227238
228-
Sets the locations of a specific cluster.
239+
Sets the locations for a specific cluster.
229240
230241
Returns:
231242
Callable: A callable which accepts the appropriate
@@ -238,7 +249,7 @@ def set_locations(self):
238249
def update_master(self):
239250
"""Return the gRPC stub for {$apiMethod.name}.
240251
241-
Updates the master of a specific cluster.
252+
Updates the master for a specific cluster.
242253
243254
Returns:
244255
Callable: A callable which accepts the appropriate
@@ -252,7 +263,7 @@ def set_master_auth(self):
252263
"""Return the gRPC stub for {$apiMethod.name}.
253264
254265
Used to set master auth materials. Currently supports :-
255-
Changing the admin password of a specific cluster.
266+
Changing the admin password for a specific cluster.
256267
This can be either via password generation or explicitly set the password.
257268
258269
Returns:
@@ -326,7 +337,7 @@ def cancel_operation(self):
326337
def get_server_config(self):
327338
"""Return the gRPC stub for {$apiMethod.name}.
328339
329-
Returns configuration info about the Container Engine service.
340+
Returns configuration info about the Kubernetes Engine service.
330341
331342
Returns:
332343
Callable: A callable which accepts the appropriate
@@ -470,7 +481,7 @@ def complete_i_p_rotation(self):
470481
def set_node_pool_size(self):
471482
"""Return the gRPC stub for {$apiMethod.name}.
472483
473-
Sets the size of a specific node pool.
484+
Sets the size for a specific node pool.
474485
475486
Returns:
476487
Callable: A callable which accepts the appropriate

container/google/cloud/container_v1/proto/cluster_service_pb2.py

Lines changed: 1341 additions & 455 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)