Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 541a9e3

Browse files
yoshi-automationtseaver
authored andcommitted
feat(container): add 'list_usable_subnetworks' method; apply proto annotations (via synth) (#9741)
1 parent 9a57445 commit 541a9e3

File tree

12 files changed

+5465
-1419
lines changed

12 files changed

+5465
-1419
lines changed

docs/_static/custom.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}

docs/_templates/layout.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
{% extends "!layout.html" %}
23
{%- block content %}
34
{%- if theme_fixed_sidebar|lower == 'true' %}

google/cloud/container_v1/gapic/cluster_manager_client.py

Lines changed: 297 additions & 178 deletions
Large diffs are not rendered by default.

google/cloud/container_v1/gapic/cluster_manager_client_config.py

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

google/cloud/container_v1/gapic/enums.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ class Status(enum.IntEnum):
4848
DEGRADED = 6
4949

5050

51+
class DatabaseEncryption(object):
52+
class State(enum.IntEnum):
53+
"""
54+
State of etcd encryption.
55+
56+
Attributes:
57+
UNKNOWN (int): Should never be set
58+
ENCRYPTED (int): Secrets in etcd are encrypted.
59+
DECRYPTED (int): Secrets in etcd are stored in plain text (at etcd level) - this is
60+
unrelated to GCE level full disk encryption.
61+
"""
62+
63+
UNKNOWN = 0
64+
ENCRYPTED = 1
65+
DECRYPTED = 2
66+
67+
5168
class NetworkPolicy(object):
5269
class Provider(enum.IntEnum):
5370
"""
@@ -93,6 +110,24 @@ class Status(enum.IntEnum):
93110
ERROR = 6
94111

95112

113+
class NodeTaint(object):
114+
class Effect(enum.IntEnum):
115+
"""
116+
Possible values for Effect in taint.
117+
118+
Attributes:
119+
EFFECT_UNSPECIFIED (int): Not set
120+
NO_SCHEDULE (int): NoSchedule
121+
PREFER_NO_SCHEDULE (int): PreferNoSchedule
122+
NO_EXECUTE (int): NoExecute
123+
"""
124+
125+
EFFECT_UNSPECIFIED = 0
126+
NO_SCHEDULE = 1
127+
PREFER_NO_SCHEDULE = 2
128+
NO_EXECUTE = 3
129+
130+
96131
class Operation(object):
97132
class Status(enum.IntEnum):
98133
"""
@@ -174,3 +209,52 @@ class Action(enum.IntEnum):
174209
SET_PASSWORD = 1
175210
GENERATE_PASSWORD = 2
176211
SET_USERNAME = 3
212+
213+
214+
class StatusCondition(object):
215+
class Code(enum.IntEnum):
216+
"""
217+
Code for each condition
218+
219+
Attributes:
220+
UNKNOWN (int): UNKNOWN indicates a generic condition.
221+
GCE_STOCKOUT (int): GCE\_STOCKOUT indicates a Google Compute Engine stockout.
222+
GKE_SERVICE_ACCOUNT_DELETED (int): GKE\_SERVICE\_ACCOUNT\_DELETED indicates that the user deleted their
223+
robot service account.
224+
GCE_QUOTA_EXCEEDED (int): Google Compute Engine quota was exceeded.
225+
SET_BY_OPERATOR (int): Cluster state was manually changed by an SRE due to a system logic error.
226+
CLOUD_KMS_KEY_ERROR (int): Unable to perform an encrypt operation against the CloudKMS key used for
227+
etcd level encryption.
228+
More codes TBA
229+
"""
230+
231+
UNKNOWN = 0
232+
GCE_STOCKOUT = 1
233+
GKE_SERVICE_ACCOUNT_DELETED = 2
234+
GCE_QUOTA_EXCEEDED = 3
235+
SET_BY_OPERATOR = 4
236+
CLOUD_KMS_KEY_ERROR = 7
237+
238+
239+
class UsableSubnetworkSecondaryRange(object):
240+
class Status(enum.IntEnum):
241+
"""
242+
Status shows the current usage of a secondary IP range.
243+
244+
Attributes:
245+
UNKNOWN (int): UNKNOWN is the zero value of the Status enum. It's not a valid status.
246+
UNUSED (int): UNUSED denotes that this range is unclaimed by any cluster.
247+
IN_USE_SERVICE (int): IN\_USE\_SERVICE denotes that this range is claimed by a cluster for
248+
services. It cannot be used for other clusters.
249+
IN_USE_SHAREABLE_POD (int): IN\_USE\_SHAREABLE\_POD denotes this range was created by the network
250+
admin and is currently claimed by a cluster for pods. It can only be
251+
used by other clusters as a pod range.
252+
IN_USE_MANAGED_POD (int): IN\_USE\_MANAGED\_POD denotes this range was created by GKE and is
253+
claimed for pods. It cannot be used for other clusters.
254+
"""
255+
256+
UNKNOWN = 0
257+
UNUSED = 1
258+
IN_USE_SERVICE = 2
259+
IN_USE_SHAREABLE_POD = 3
260+
IN_USE_MANAGED_POD = 4

0 commit comments

Comments
 (0)