cribl-control-plane 0.0.17__py3-none-any.whl → 0.0.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/distributed.py +187 -0
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/groups_sdk.py +1291 -0
- cribl_control_plane/lake.py +479 -0
- cribl_control_plane/models/__init__.py +843 -3
- cribl_control_plane/models/appmode.py +13 -0
- cribl_control_plane/models/cacheconnection.py +44 -0
- cribl_control_plane/models/cacheconnectionbackfillstatus.py +12 -0
- cribl_control_plane/models/cloudprovider.py +9 -0
- cribl_control_plane/models/commit.py +30 -0
- cribl_control_plane/models/configgroup.py +116 -0
- cribl_control_plane/models/configgroupcloud.py +48 -0
- cribl_control_plane/models/configgrouplookups.py +34 -0
- cribl_control_plane/models/createcribllakedatasetbylakeidop.py +48 -0
- cribl_control_plane/models/createpacksop.py +24 -0
- cribl_control_plane/models/createproductsgroupsbyproductop.py +54 -0
- cribl_control_plane/models/createversioncommitop.py +24 -0
- cribl_control_plane/models/createversionpushop.py +23 -0
- cribl_control_plane/models/createversionrevertop.py +47 -0
- cribl_control_plane/models/createversionsyncop.py +23 -0
- cribl_control_plane/models/createversionundoop.py +37 -0
- cribl_control_plane/models/cribllakedataset.py +74 -0
- cribl_control_plane/models/datasetmetadata.py +39 -0
- cribl_control_plane/models/datasetmetadataruninfo.py +28 -0
- cribl_control_plane/models/deployrequest.py +18 -0
- cribl_control_plane/models/deployrequestlookups.py +28 -0
- cribl_control_plane/models/distributedsummary.py +63 -0
- cribl_control_plane/models/getcribllakedatasetbylakeidop.py +40 -0
- cribl_control_plane/models/getgroupsaclbyidop.py +63 -0
- cribl_control_plane/models/getgroupsbyidop.py +49 -0
- cribl_control_plane/models/getgroupsconfigversionbyidop.py +36 -0
- cribl_control_plane/models/getpacksop.py +40 -0
- cribl_control_plane/models/getproductsgroupsaclteamsbyproductandidop.py +78 -0
- cribl_control_plane/models/getproductsgroupsbyproductop.py +58 -0
- cribl_control_plane/models/getsummaryop.py +46 -0
- cribl_control_plane/models/getsummaryworkersop.py +39 -0
- cribl_control_plane/models/getversionbranchop.py +23 -0
- cribl_control_plane/models/getversioncountop.py +47 -0
- cribl_control_plane/models/getversioncurrentbranchop.py +23 -0
- cribl_control_plane/models/getversiondiffop.py +63 -0
- cribl_control_plane/models/getversionfilesop.py +48 -0
- cribl_control_plane/models/getversioninfoop.py +24 -0
- cribl_control_plane/models/getversionshowop.py +63 -0
- cribl_control_plane/models/getversionstatusop.py +38 -0
- cribl_control_plane/models/getworkersop.py +82 -0
- cribl_control_plane/models/gitcommitparams.py +23 -0
- cribl_control_plane/models/gitcommitsummary.py +68 -0
- cribl_control_plane/models/gitfile.py +20 -0
- cribl_control_plane/models/gitfilesresponse.py +22 -0
- cribl_control_plane/models/gitinfo.py +23 -0
- cribl_control_plane/models/gitrevertparams.py +20 -0
- cribl_control_plane/models/gitrevertresult.py +48 -0
- cribl_control_plane/models/gitstatusresult.py +73 -0
- cribl_control_plane/models/hbcriblinfo.py +80 -0
- cribl_control_plane/models/hbleaderinfo.py +23 -0
- cribl_control_plane/models/healthstatus.py +3 -3
- cribl_control_plane/models/heartbeatmetadata.py +122 -0
- cribl_control_plane/models/lakedatasetsearchconfig.py +18 -0
- cribl_control_plane/models/lakehouseconnectiontype.py +9 -0
- cribl_control_plane/models/lookupversions.py +13 -0
- cribl_control_plane/models/masterworkerentry.py +84 -0
- cribl_control_plane/models/nodeactiveupgradestatus.py +10 -0
- cribl_control_plane/models/nodefailedupgradestatus.py +9 -0
- cribl_control_plane/models/nodeprovidedinfo.py +184 -0
- cribl_control_plane/models/nodeskippedupgradestatus.py +11 -0
- cribl_control_plane/models/nodeupgradestate.py +11 -0
- cribl_control_plane/models/nodeupgradestatus.py +30 -0
- cribl_control_plane/models/packinfo.py +73 -0
- cribl_control_plane/models/packinstallinfo.py +76 -0
- cribl_control_plane/models/packrequestbody.py +75 -0
- cribl_control_plane/models/rbacresource.py +14 -0
- cribl_control_plane/models/resourcepolicy.py +24 -0
- cribl_control_plane/models/restartresponse.py +26 -0
- cribl_control_plane/models/teamaccesscontrollist.py +18 -0
- cribl_control_plane/models/updategroupsdeploybyidop.py +46 -0
- cribl_control_plane/models/updatepacksop.py +37 -0
- cribl_control_plane/models/updateworkersrestartop.py +24 -0
- cribl_control_plane/models/useraccesscontrollist.py +18 -0
- cribl_control_plane/packs.py +623 -0
- cribl_control_plane/sdk.py +28 -0
- cribl_control_plane/teams.py +203 -0
- cribl_control_plane/versioning.py +2309 -0
- cribl_control_plane/workers_sdk.py +555 -0
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/METADATA +58 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/RECORD +87 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from .basesdk import BaseSDK
|
|
4
|
+
from cribl_control_plane import errors, models, utils
|
|
5
|
+
from cribl_control_plane._hooks import HookContext
|
|
6
|
+
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
+
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
+
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
+
from typing import Any, Mapping, Optional
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WorkersSDK(BaseSDK):
|
|
13
|
+
r"""Actions related to Workers"""
|
|
14
|
+
|
|
15
|
+
def get_summary_workers(
|
|
16
|
+
self,
|
|
17
|
+
*,
|
|
18
|
+
filter_exp: Optional[str] = None,
|
|
19
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
20
|
+
server_url: Optional[str] = None,
|
|
21
|
+
timeout_ms: Optional[int] = None,
|
|
22
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
23
|
+
) -> models.GetSummaryWorkersResponse:
|
|
24
|
+
r"""get worker and edge nodes count
|
|
25
|
+
|
|
26
|
+
get worker and edge nodes count
|
|
27
|
+
|
|
28
|
+
:param filter_exp: Filter expression evaluated against nodes
|
|
29
|
+
:param retries: Override the default retry configuration for this method
|
|
30
|
+
:param server_url: Override the default server URL for this method
|
|
31
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
32
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
33
|
+
"""
|
|
34
|
+
base_url = None
|
|
35
|
+
url_variables = None
|
|
36
|
+
if timeout_ms is None:
|
|
37
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
38
|
+
|
|
39
|
+
if server_url is not None:
|
|
40
|
+
base_url = server_url
|
|
41
|
+
else:
|
|
42
|
+
base_url = self._get_url(base_url, url_variables)
|
|
43
|
+
|
|
44
|
+
request = models.GetSummaryWorkersRequest(
|
|
45
|
+
filter_exp=filter_exp,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
req = self._build_request(
|
|
49
|
+
method="GET",
|
|
50
|
+
path="/master/summary/workers",
|
|
51
|
+
base_url=base_url,
|
|
52
|
+
url_variables=url_variables,
|
|
53
|
+
request=request,
|
|
54
|
+
request_body_required=False,
|
|
55
|
+
request_has_path_params=False,
|
|
56
|
+
request_has_query_params=True,
|
|
57
|
+
user_agent_header="user-agent",
|
|
58
|
+
accept_header_value="application/json",
|
|
59
|
+
http_headers=http_headers,
|
|
60
|
+
security=self.sdk_configuration.security,
|
|
61
|
+
timeout_ms=timeout_ms,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
if retries == UNSET:
|
|
65
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
66
|
+
retries = self.sdk_configuration.retry_config
|
|
67
|
+
|
|
68
|
+
retry_config = None
|
|
69
|
+
if isinstance(retries, utils.RetryConfig):
|
|
70
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
71
|
+
|
|
72
|
+
http_res = self.do_request(
|
|
73
|
+
hook_ctx=HookContext(
|
|
74
|
+
config=self.sdk_configuration,
|
|
75
|
+
base_url=base_url or "",
|
|
76
|
+
operation_id="getSummaryWorkers",
|
|
77
|
+
oauth2_scopes=[],
|
|
78
|
+
security_source=get_security_from_env(
|
|
79
|
+
self.sdk_configuration.security, models.Security
|
|
80
|
+
),
|
|
81
|
+
),
|
|
82
|
+
request=req,
|
|
83
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
84
|
+
retry_config=retry_config,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
response_data: Any = None
|
|
88
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
89
|
+
return unmarshal_json_response(models.GetSummaryWorkersResponse, http_res)
|
|
90
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
91
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
92
|
+
raise errors.Error(response_data, http_res)
|
|
93
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
94
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
95
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
96
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
97
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
98
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
99
|
+
|
|
100
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
101
|
+
|
|
102
|
+
async def get_summary_workers_async(
|
|
103
|
+
self,
|
|
104
|
+
*,
|
|
105
|
+
filter_exp: Optional[str] = None,
|
|
106
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
107
|
+
server_url: Optional[str] = None,
|
|
108
|
+
timeout_ms: Optional[int] = None,
|
|
109
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
110
|
+
) -> models.GetSummaryWorkersResponse:
|
|
111
|
+
r"""get worker and edge nodes count
|
|
112
|
+
|
|
113
|
+
get worker and edge nodes count
|
|
114
|
+
|
|
115
|
+
:param filter_exp: Filter expression evaluated against nodes
|
|
116
|
+
:param retries: Override the default retry configuration for this method
|
|
117
|
+
:param server_url: Override the default server URL for this method
|
|
118
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
119
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
120
|
+
"""
|
|
121
|
+
base_url = None
|
|
122
|
+
url_variables = None
|
|
123
|
+
if timeout_ms is None:
|
|
124
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
125
|
+
|
|
126
|
+
if server_url is not None:
|
|
127
|
+
base_url = server_url
|
|
128
|
+
else:
|
|
129
|
+
base_url = self._get_url(base_url, url_variables)
|
|
130
|
+
|
|
131
|
+
request = models.GetSummaryWorkersRequest(
|
|
132
|
+
filter_exp=filter_exp,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
req = self._build_request_async(
|
|
136
|
+
method="GET",
|
|
137
|
+
path="/master/summary/workers",
|
|
138
|
+
base_url=base_url,
|
|
139
|
+
url_variables=url_variables,
|
|
140
|
+
request=request,
|
|
141
|
+
request_body_required=False,
|
|
142
|
+
request_has_path_params=False,
|
|
143
|
+
request_has_query_params=True,
|
|
144
|
+
user_agent_header="user-agent",
|
|
145
|
+
accept_header_value="application/json",
|
|
146
|
+
http_headers=http_headers,
|
|
147
|
+
security=self.sdk_configuration.security,
|
|
148
|
+
timeout_ms=timeout_ms,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
if retries == UNSET:
|
|
152
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
153
|
+
retries = self.sdk_configuration.retry_config
|
|
154
|
+
|
|
155
|
+
retry_config = None
|
|
156
|
+
if isinstance(retries, utils.RetryConfig):
|
|
157
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
158
|
+
|
|
159
|
+
http_res = await self.do_request_async(
|
|
160
|
+
hook_ctx=HookContext(
|
|
161
|
+
config=self.sdk_configuration,
|
|
162
|
+
base_url=base_url or "",
|
|
163
|
+
operation_id="getSummaryWorkers",
|
|
164
|
+
oauth2_scopes=[],
|
|
165
|
+
security_source=get_security_from_env(
|
|
166
|
+
self.sdk_configuration.security, models.Security
|
|
167
|
+
),
|
|
168
|
+
),
|
|
169
|
+
request=req,
|
|
170
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
171
|
+
retry_config=retry_config,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
response_data: Any = None
|
|
175
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
176
|
+
return unmarshal_json_response(models.GetSummaryWorkersResponse, http_res)
|
|
177
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
178
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
179
|
+
raise errors.Error(response_data, http_res)
|
|
180
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
181
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
182
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
183
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
184
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
185
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
186
|
+
|
|
187
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
188
|
+
|
|
189
|
+
def get_workers(
|
|
190
|
+
self,
|
|
191
|
+
*,
|
|
192
|
+
filter_exp: Optional[str] = None,
|
|
193
|
+
sort: Optional[str] = None,
|
|
194
|
+
sort_exp: Optional[str] = None,
|
|
195
|
+
limit: Optional[int] = None,
|
|
196
|
+
offset: Optional[int] = None,
|
|
197
|
+
filter_: Optional[str] = None,
|
|
198
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
199
|
+
server_url: Optional[str] = None,
|
|
200
|
+
timeout_ms: Optional[int] = None,
|
|
201
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
202
|
+
) -> models.GetWorkersResponse:
|
|
203
|
+
r"""get worker and edge nodes
|
|
204
|
+
|
|
205
|
+
get worker and edge nodes
|
|
206
|
+
|
|
207
|
+
:param filter_exp: Filter expression evaluated against nodes
|
|
208
|
+
:param sort: Sorting object (JSON stringified) expression evaluated against nodes
|
|
209
|
+
:param sort_exp: Sorting expression evaluated against nodes
|
|
210
|
+
:param limit: Maximum number of nodes to return
|
|
211
|
+
:param offset: Pagination offset
|
|
212
|
+
:param filter_: Filter object (JSON stringified) to select nodes
|
|
213
|
+
:param retries: Override the default retry configuration for this method
|
|
214
|
+
:param server_url: Override the default server URL for this method
|
|
215
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
216
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
217
|
+
"""
|
|
218
|
+
base_url = None
|
|
219
|
+
url_variables = None
|
|
220
|
+
if timeout_ms is None:
|
|
221
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
222
|
+
|
|
223
|
+
if server_url is not None:
|
|
224
|
+
base_url = server_url
|
|
225
|
+
else:
|
|
226
|
+
base_url = self._get_url(base_url, url_variables)
|
|
227
|
+
|
|
228
|
+
request = models.GetWorkersRequest(
|
|
229
|
+
filter_exp=filter_exp,
|
|
230
|
+
sort=sort,
|
|
231
|
+
sort_exp=sort_exp,
|
|
232
|
+
limit=limit,
|
|
233
|
+
offset=offset,
|
|
234
|
+
filter_=filter_,
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
req = self._build_request(
|
|
238
|
+
method="GET",
|
|
239
|
+
path="/master/workers",
|
|
240
|
+
base_url=base_url,
|
|
241
|
+
url_variables=url_variables,
|
|
242
|
+
request=request,
|
|
243
|
+
request_body_required=False,
|
|
244
|
+
request_has_path_params=False,
|
|
245
|
+
request_has_query_params=True,
|
|
246
|
+
user_agent_header="user-agent",
|
|
247
|
+
accept_header_value="application/json",
|
|
248
|
+
http_headers=http_headers,
|
|
249
|
+
security=self.sdk_configuration.security,
|
|
250
|
+
timeout_ms=timeout_ms,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
if retries == UNSET:
|
|
254
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
255
|
+
retries = self.sdk_configuration.retry_config
|
|
256
|
+
|
|
257
|
+
retry_config = None
|
|
258
|
+
if isinstance(retries, utils.RetryConfig):
|
|
259
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
260
|
+
|
|
261
|
+
http_res = self.do_request(
|
|
262
|
+
hook_ctx=HookContext(
|
|
263
|
+
config=self.sdk_configuration,
|
|
264
|
+
base_url=base_url or "",
|
|
265
|
+
operation_id="getWorkers",
|
|
266
|
+
oauth2_scopes=[],
|
|
267
|
+
security_source=get_security_from_env(
|
|
268
|
+
self.sdk_configuration.security, models.Security
|
|
269
|
+
),
|
|
270
|
+
),
|
|
271
|
+
request=req,
|
|
272
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
273
|
+
retry_config=retry_config,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
response_data: Any = None
|
|
277
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
278
|
+
return unmarshal_json_response(models.GetWorkersResponse, http_res)
|
|
279
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
280
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
281
|
+
raise errors.Error(response_data, http_res)
|
|
282
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
283
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
284
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
285
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
286
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
287
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
288
|
+
|
|
289
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
290
|
+
|
|
291
|
+
async def get_workers_async(
|
|
292
|
+
self,
|
|
293
|
+
*,
|
|
294
|
+
filter_exp: Optional[str] = None,
|
|
295
|
+
sort: Optional[str] = None,
|
|
296
|
+
sort_exp: Optional[str] = None,
|
|
297
|
+
limit: Optional[int] = None,
|
|
298
|
+
offset: Optional[int] = None,
|
|
299
|
+
filter_: Optional[str] = None,
|
|
300
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
301
|
+
server_url: Optional[str] = None,
|
|
302
|
+
timeout_ms: Optional[int] = None,
|
|
303
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
304
|
+
) -> models.GetWorkersResponse:
|
|
305
|
+
r"""get worker and edge nodes
|
|
306
|
+
|
|
307
|
+
get worker and edge nodes
|
|
308
|
+
|
|
309
|
+
:param filter_exp: Filter expression evaluated against nodes
|
|
310
|
+
:param sort: Sorting object (JSON stringified) expression evaluated against nodes
|
|
311
|
+
:param sort_exp: Sorting expression evaluated against nodes
|
|
312
|
+
:param limit: Maximum number of nodes to return
|
|
313
|
+
:param offset: Pagination offset
|
|
314
|
+
:param filter_: Filter object (JSON stringified) to select nodes
|
|
315
|
+
:param retries: Override the default retry configuration for this method
|
|
316
|
+
:param server_url: Override the default server URL for this method
|
|
317
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
318
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
319
|
+
"""
|
|
320
|
+
base_url = None
|
|
321
|
+
url_variables = None
|
|
322
|
+
if timeout_ms is None:
|
|
323
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
324
|
+
|
|
325
|
+
if server_url is not None:
|
|
326
|
+
base_url = server_url
|
|
327
|
+
else:
|
|
328
|
+
base_url = self._get_url(base_url, url_variables)
|
|
329
|
+
|
|
330
|
+
request = models.GetWorkersRequest(
|
|
331
|
+
filter_exp=filter_exp,
|
|
332
|
+
sort=sort,
|
|
333
|
+
sort_exp=sort_exp,
|
|
334
|
+
limit=limit,
|
|
335
|
+
offset=offset,
|
|
336
|
+
filter_=filter_,
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
req = self._build_request_async(
|
|
340
|
+
method="GET",
|
|
341
|
+
path="/master/workers",
|
|
342
|
+
base_url=base_url,
|
|
343
|
+
url_variables=url_variables,
|
|
344
|
+
request=request,
|
|
345
|
+
request_body_required=False,
|
|
346
|
+
request_has_path_params=False,
|
|
347
|
+
request_has_query_params=True,
|
|
348
|
+
user_agent_header="user-agent",
|
|
349
|
+
accept_header_value="application/json",
|
|
350
|
+
http_headers=http_headers,
|
|
351
|
+
security=self.sdk_configuration.security,
|
|
352
|
+
timeout_ms=timeout_ms,
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
if retries == UNSET:
|
|
356
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
357
|
+
retries = self.sdk_configuration.retry_config
|
|
358
|
+
|
|
359
|
+
retry_config = None
|
|
360
|
+
if isinstance(retries, utils.RetryConfig):
|
|
361
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
362
|
+
|
|
363
|
+
http_res = await self.do_request_async(
|
|
364
|
+
hook_ctx=HookContext(
|
|
365
|
+
config=self.sdk_configuration,
|
|
366
|
+
base_url=base_url or "",
|
|
367
|
+
operation_id="getWorkers",
|
|
368
|
+
oauth2_scopes=[],
|
|
369
|
+
security_source=get_security_from_env(
|
|
370
|
+
self.sdk_configuration.security, models.Security
|
|
371
|
+
),
|
|
372
|
+
),
|
|
373
|
+
request=req,
|
|
374
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
375
|
+
retry_config=retry_config,
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
response_data: Any = None
|
|
379
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
380
|
+
return unmarshal_json_response(models.GetWorkersResponse, http_res)
|
|
381
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
382
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
383
|
+
raise errors.Error(response_data, http_res)
|
|
384
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
385
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
386
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
387
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
388
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
389
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
390
|
+
|
|
391
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
392
|
+
|
|
393
|
+
def update_workers_restart(
|
|
394
|
+
self,
|
|
395
|
+
*,
|
|
396
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
397
|
+
server_url: Optional[str] = None,
|
|
398
|
+
timeout_ms: Optional[int] = None,
|
|
399
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
400
|
+
) -> models.UpdateWorkersRestartResponse:
|
|
401
|
+
r"""restarts worker nodes
|
|
402
|
+
|
|
403
|
+
restarts worker nodes
|
|
404
|
+
|
|
405
|
+
:param retries: Override the default retry configuration for this method
|
|
406
|
+
:param server_url: Override the default server URL for this method
|
|
407
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
408
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
409
|
+
"""
|
|
410
|
+
base_url = None
|
|
411
|
+
url_variables = None
|
|
412
|
+
if timeout_ms is None:
|
|
413
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
414
|
+
|
|
415
|
+
if server_url is not None:
|
|
416
|
+
base_url = server_url
|
|
417
|
+
else:
|
|
418
|
+
base_url = self._get_url(base_url, url_variables)
|
|
419
|
+
req = self._build_request(
|
|
420
|
+
method="PATCH",
|
|
421
|
+
path="/master/workers/restart",
|
|
422
|
+
base_url=base_url,
|
|
423
|
+
url_variables=url_variables,
|
|
424
|
+
request=None,
|
|
425
|
+
request_body_required=False,
|
|
426
|
+
request_has_path_params=False,
|
|
427
|
+
request_has_query_params=True,
|
|
428
|
+
user_agent_header="user-agent",
|
|
429
|
+
accept_header_value="application/json",
|
|
430
|
+
http_headers=http_headers,
|
|
431
|
+
security=self.sdk_configuration.security,
|
|
432
|
+
timeout_ms=timeout_ms,
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
if retries == UNSET:
|
|
436
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
437
|
+
retries = self.sdk_configuration.retry_config
|
|
438
|
+
|
|
439
|
+
retry_config = None
|
|
440
|
+
if isinstance(retries, utils.RetryConfig):
|
|
441
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
442
|
+
|
|
443
|
+
http_res = self.do_request(
|
|
444
|
+
hook_ctx=HookContext(
|
|
445
|
+
config=self.sdk_configuration,
|
|
446
|
+
base_url=base_url or "",
|
|
447
|
+
operation_id="updateWorkersRestart",
|
|
448
|
+
oauth2_scopes=[],
|
|
449
|
+
security_source=get_security_from_env(
|
|
450
|
+
self.sdk_configuration.security, models.Security
|
|
451
|
+
),
|
|
452
|
+
),
|
|
453
|
+
request=req,
|
|
454
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
455
|
+
retry_config=retry_config,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
response_data: Any = None
|
|
459
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
460
|
+
return unmarshal_json_response(
|
|
461
|
+
models.UpdateWorkersRestartResponse, http_res
|
|
462
|
+
)
|
|
463
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
464
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
465
|
+
raise errors.Error(response_data, http_res)
|
|
466
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
467
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
468
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
469
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
470
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
471
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
472
|
+
|
|
473
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
474
|
+
|
|
475
|
+
async def update_workers_restart_async(
|
|
476
|
+
self,
|
|
477
|
+
*,
|
|
478
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
479
|
+
server_url: Optional[str] = None,
|
|
480
|
+
timeout_ms: Optional[int] = None,
|
|
481
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
482
|
+
) -> models.UpdateWorkersRestartResponse:
|
|
483
|
+
r"""restarts worker nodes
|
|
484
|
+
|
|
485
|
+
restarts worker nodes
|
|
486
|
+
|
|
487
|
+
:param retries: Override the default retry configuration for this method
|
|
488
|
+
:param server_url: Override the default server URL for this method
|
|
489
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
490
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
491
|
+
"""
|
|
492
|
+
base_url = None
|
|
493
|
+
url_variables = None
|
|
494
|
+
if timeout_ms is None:
|
|
495
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
496
|
+
|
|
497
|
+
if server_url is not None:
|
|
498
|
+
base_url = server_url
|
|
499
|
+
else:
|
|
500
|
+
base_url = self._get_url(base_url, url_variables)
|
|
501
|
+
req = self._build_request_async(
|
|
502
|
+
method="PATCH",
|
|
503
|
+
path="/master/workers/restart",
|
|
504
|
+
base_url=base_url,
|
|
505
|
+
url_variables=url_variables,
|
|
506
|
+
request=None,
|
|
507
|
+
request_body_required=False,
|
|
508
|
+
request_has_path_params=False,
|
|
509
|
+
request_has_query_params=True,
|
|
510
|
+
user_agent_header="user-agent",
|
|
511
|
+
accept_header_value="application/json",
|
|
512
|
+
http_headers=http_headers,
|
|
513
|
+
security=self.sdk_configuration.security,
|
|
514
|
+
timeout_ms=timeout_ms,
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
if retries == UNSET:
|
|
518
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
519
|
+
retries = self.sdk_configuration.retry_config
|
|
520
|
+
|
|
521
|
+
retry_config = None
|
|
522
|
+
if isinstance(retries, utils.RetryConfig):
|
|
523
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
524
|
+
|
|
525
|
+
http_res = await self.do_request_async(
|
|
526
|
+
hook_ctx=HookContext(
|
|
527
|
+
config=self.sdk_configuration,
|
|
528
|
+
base_url=base_url or "",
|
|
529
|
+
operation_id="updateWorkersRestart",
|
|
530
|
+
oauth2_scopes=[],
|
|
531
|
+
security_source=get_security_from_env(
|
|
532
|
+
self.sdk_configuration.security, models.Security
|
|
533
|
+
),
|
|
534
|
+
),
|
|
535
|
+
request=req,
|
|
536
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
537
|
+
retry_config=retry_config,
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
response_data: Any = None
|
|
541
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
542
|
+
return unmarshal_json_response(
|
|
543
|
+
models.UpdateWorkersRestartResponse, http_res
|
|
544
|
+
)
|
|
545
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
546
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
547
|
+
raise errors.Error(response_data, http_res)
|
|
548
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
549
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
550
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
551
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
552
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
553
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
554
|
+
|
|
555
|
+
raise errors.APIError("Unexpected response received", http_res)
|