codecraftai-restclient-pychestrate 1.2.0__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.
- ccai/pychestrate/py.typed +0 -0
- ccai/pychestrate/rest/client/__init__.py +0 -0
- ccai/pychestrate/rest/client/generation/__init__.py +0 -0
- ccai/pychestrate/rest/client/generation/pychestraterestclientgenerator.py +98 -0
- ccai/pychestrate/rest/client/generation/specs/pychestrate.yaml +3757 -0
- ccai/pychestrate/rest/client/groups/__init__.py +0 -0
- ccai/pychestrate/rest/client/groups/agents.py +171 -0
- ccai/pychestrate/rest/client/groups/artifacts.py +103 -0
- ccai/pychestrate/rest/client/groups/audit.py +99 -0
- ccai/pychestrate/rest/client/groups/auth.py +55 -0
- ccai/pychestrate/rest/client/groups/clients.py +287 -0
- ccai/pychestrate/rest/client/groups/dispatch.py +118 -0
- ccai/pychestrate/rest/client/groups/enrollment.py +212 -0
- ccai/pychestrate/rest/client/groups/flags.py +332 -0
- ccai/pychestrate/rest/client/groups/me.py +55 -0
- ccai/pychestrate/rest/client/groups/notifications.py +128 -0
- ccai/pychestrate/rest/client/groups/pluginapi.py +128 -0
- ccai/pychestrate/rest/client/groups/pods.py +558 -0
- ccai/pychestrate/rest/client/groups/progress.py +64 -0
- ccai/pychestrate/rest/client/groups/projects.py +420 -0
- ccai/pychestrate/rest/client/groups/projecttemplates.py +91 -0
- ccai/pychestrate/rest/client/groups/rbac.py +243 -0
- ccai/pychestrate/rest/client/groups/results.py +193 -0
- ccai/pychestrate/rest/client/groups/retention.py +169 -0
- ccai/pychestrate/rest/client/groups/runs.py +152 -0
- ccai/pychestrate/rest/client/groups/secrets.py +91 -0
- ccai/pychestrate/rest/client/groups/tagging.py +216 -0
- ccai/pychestrate/rest/client/groups/testcatalog.py +152 -0
- ccai/pychestrate/rest/client/groups/testruns.py +58 -0
- ccai/pychestrate/rest/client/groups/users.py +91 -0
- ccai/pychestrate/rest/client/groups/variables.py +228 -0
- ccai/pychestrate/rest/client/models/__init__.py +0 -0
- ccai/pychestrate/rest/client/models/agents.py +34 -0
- ccai/pychestrate/rest/client/models/artifactlocaluploadresult.py +18 -0
- ccai/pychestrate/rest/client/models/artifacts.py +24 -0
- ccai/pychestrate/rest/client/models/artifactuploadtarget.py +20 -0
- ccai/pychestrate/rest/client/models/audit.py +18 -0
- ccai/pychestrate/rest/client/models/auth.py +15 -0
- ccai/pychestrate/rest/client/models/capabilityentry.py +15 -0
- ccai/pychestrate/rest/client/models/client.py +19 -0
- ccai/pychestrate/rest/client/models/clients.py +40 -0
- ccai/pychestrate/rest/client/models/dispatch.py +26 -0
- ccai/pychestrate/rest/client/models/enrollment.py +39 -0
- ccai/pychestrate/rest/client/models/flags.py +55 -0
- ccai/pychestrate/rest/client/models/jobdeadline.py +11 -0
- ccai/pychestrate/rest/client/models/jobenvelope.py +38 -0
- ccai/pychestrate/rest/client/models/jobforwardinginfo.py +12 -0
- ccai/pychestrate/rest/client/models/jobpipelineref.py +11 -0
- ccai/pychestrate/rest/client/models/jobrefs.py +14 -0
- ccai/pychestrate/rest/client/models/jobresultslocator.py +11 -0
- ccai/pychestrate/rest/client/models/me.py +14 -0
- ccai/pychestrate/rest/client/models/notifications.py +24 -0
- ccai/pychestrate/rest/client/models/pagemeta.py +18 -0
- ccai/pychestrate/rest/client/models/pluginapi.py +21 -0
- ccai/pychestrate/rest/client/models/podmember.py +14 -0
- ccai/pychestrate/rest/client/models/pods.py +75 -0
- ccai/pychestrate/rest/client/models/podtopologylink.py +15 -0
- ccai/pychestrate/rest/client/models/problem.py +19 -0
- ccai/pychestrate/rest/client/models/progress.py +18 -0
- ccai/pychestrate/rest/client/models/progressrecord.py +26 -0
- ccai/pychestrate/rest/client/models/progresssummary.py +29 -0
- ccai/pychestrate/rest/client/models/projects.py +49 -0
- ccai/pychestrate/rest/client/models/projecttemplates.py +14 -0
- ccai/pychestrate/rest/client/models/rbac.py +46 -0
- ccai/pychestrate/rest/client/models/results.py +56 -0
- ccai/pychestrate/rest/client/models/retention.py +26 -0
- ccai/pychestrate/rest/client/models/runevent.py +25 -0
- ccai/pychestrate/rest/client/models/runs.py +32 -0
- ccai/pychestrate/rest/client/models/scopedsecret.py +13 -0
- ccai/pychestrate/rest/client/models/secrets.py +16 -0
- ccai/pychestrate/rest/client/models/signingkey.py +19 -0
- ccai/pychestrate/rest/client/models/tagging.py +24 -0
- ccai/pychestrate/rest/client/models/testcatalog.py +50 -0
- ccai/pychestrate/rest/client/models/testcatalogimportsummary.py +16 -0
- ccai/pychestrate/rest/client/models/testruns.py +25 -0
- ccai/pychestrate/rest/client/models/users.py +23 -0
- ccai/pychestrate/rest/client/models/variableeffectiveentry.py +13 -0
- ccai/pychestrate/rest/client/models/variables.py +30 -0
- ccai/pychestrate/rest/client/pychestraterestclient.py +166 -0
- ccai/pychestrate/rest/client/pychestraterestclientbase.py +147 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/METADATA +96 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/RECORD +84 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_pychestrate-1.2.0.dist-info/licenses/LICENSE.md +204 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.pods import Poddefinition
|
|
6
|
+
from ccai.pychestrate.rest.client.models.pods import Poddefinitioncreaterequest
|
|
7
|
+
from ccai.pychestrate.rest.client.models.pods import Podregistration
|
|
8
|
+
from ccai.pychestrate.rest.client.models.pods import Podstate
|
|
9
|
+
from ccai.pychestrate.rest.client.models.pods import Podtemplate
|
|
10
|
+
from ccai.pychestrate.rest.client.models.pods import Podtemplatecreaterequest
|
|
11
|
+
from ccai.pychestrate.rest.client.models.pods import Podtemplatematerializerequest
|
|
12
|
+
from ccai.pychestrate.rest.client.models.pods import Podtopology
|
|
13
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
14
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class PodsApiGroup(RestApiGroup):
|
|
18
|
+
"""
|
|
19
|
+
Pod definitions, registrations, topology, and templates.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
def pods_create_definition(self, project_id: str, body: Poddefinitioncreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
23
|
+
"""
|
|
24
|
+
Create a pod definition.
|
|
25
|
+
"""
|
|
26
|
+
client = self.client
|
|
27
|
+
if aspects is None:
|
|
28
|
+
aspects = client.aspects
|
|
29
|
+
|
|
30
|
+
header_params = client.headers
|
|
31
|
+
if headers is not None:
|
|
32
|
+
header_params = headers
|
|
33
|
+
|
|
34
|
+
leaf_template = "/projects/{project_id}/pod-definitions"
|
|
35
|
+
path_params = {
|
|
36
|
+
'project_id': project_id,
|
|
37
|
+
}
|
|
38
|
+
call_leaf = leaf_template.format(**path_params)
|
|
39
|
+
|
|
40
|
+
query_params = None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if exp_status is None:
|
|
44
|
+
exp_status = [201]
|
|
45
|
+
|
|
46
|
+
resp = client.perform_call(
|
|
47
|
+
leaf=call_leaf,
|
|
48
|
+
method="POST",
|
|
49
|
+
params=query_params if query_params else None,
|
|
50
|
+
body=body,
|
|
51
|
+
exp_status=exp_status,
|
|
52
|
+
headers=header_params if header_params else None,
|
|
53
|
+
context_msg=None,
|
|
54
|
+
aspects=aspects,
|
|
55
|
+
)
|
|
56
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
57
|
+
rtnval = None
|
|
58
|
+
else:
|
|
59
|
+
rtnval = resp.json()
|
|
60
|
+
return rtnval
|
|
61
|
+
|
|
62
|
+
def pods_create_template(self, project_id: str, body: Podtemplatecreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
63
|
+
"""
|
|
64
|
+
Create a pod template.
|
|
65
|
+
"""
|
|
66
|
+
client = self.client
|
|
67
|
+
if aspects is None:
|
|
68
|
+
aspects = client.aspects
|
|
69
|
+
|
|
70
|
+
header_params = client.headers
|
|
71
|
+
if headers is not None:
|
|
72
|
+
header_params = headers
|
|
73
|
+
|
|
74
|
+
leaf_template = "/projects/{project_id}/pod-templates"
|
|
75
|
+
path_params = {
|
|
76
|
+
'project_id': project_id,
|
|
77
|
+
}
|
|
78
|
+
call_leaf = leaf_template.format(**path_params)
|
|
79
|
+
|
|
80
|
+
query_params = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if exp_status is None:
|
|
84
|
+
exp_status = [201]
|
|
85
|
+
|
|
86
|
+
resp = client.perform_call(
|
|
87
|
+
leaf=call_leaf,
|
|
88
|
+
method="POST",
|
|
89
|
+
params=query_params if query_params else None,
|
|
90
|
+
body=body,
|
|
91
|
+
exp_status=exp_status,
|
|
92
|
+
headers=header_params if header_params else None,
|
|
93
|
+
context_msg=None,
|
|
94
|
+
aspects=aspects,
|
|
95
|
+
)
|
|
96
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
97
|
+
rtnval = None
|
|
98
|
+
else:
|
|
99
|
+
rtnval = resp.json()
|
|
100
|
+
return rtnval
|
|
101
|
+
|
|
102
|
+
def pods_delete_template(self, project_id: str, template_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
103
|
+
"""
|
|
104
|
+
Delete a pod template.
|
|
105
|
+
"""
|
|
106
|
+
client = self.client
|
|
107
|
+
if aspects is None:
|
|
108
|
+
aspects = client.aspects
|
|
109
|
+
|
|
110
|
+
header_params = client.headers
|
|
111
|
+
if headers is not None:
|
|
112
|
+
header_params = headers
|
|
113
|
+
|
|
114
|
+
leaf_template = "/projects/{project_id}/pod-templates/{template_id}/parameters"
|
|
115
|
+
path_params = {
|
|
116
|
+
'project_id': project_id,
|
|
117
|
+
'template_id': template_id,
|
|
118
|
+
}
|
|
119
|
+
call_leaf = leaf_template.format(**path_params)
|
|
120
|
+
|
|
121
|
+
query_params = None
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if exp_status is None:
|
|
125
|
+
exp_status = [204]
|
|
126
|
+
|
|
127
|
+
resp = client.perform_call(
|
|
128
|
+
leaf=call_leaf,
|
|
129
|
+
method="DELETE",
|
|
130
|
+
params=query_params if query_params else None,
|
|
131
|
+
body=None,
|
|
132
|
+
exp_status=exp_status,
|
|
133
|
+
headers=header_params if header_params else None,
|
|
134
|
+
context_msg=None,
|
|
135
|
+
aspects=aspects,
|
|
136
|
+
)
|
|
137
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
138
|
+
rtnval = None
|
|
139
|
+
else:
|
|
140
|
+
rtnval = resp.json()
|
|
141
|
+
return rtnval
|
|
142
|
+
|
|
143
|
+
def pods_get_definition(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Poddefinition:
|
|
144
|
+
"""
|
|
145
|
+
Read a pod definition.
|
|
146
|
+
"""
|
|
147
|
+
client = self.client
|
|
148
|
+
if aspects is None:
|
|
149
|
+
aspects = client.aspects
|
|
150
|
+
|
|
151
|
+
header_params = client.headers
|
|
152
|
+
if headers is not None:
|
|
153
|
+
header_params = headers
|
|
154
|
+
|
|
155
|
+
leaf_template = "/projects/{project_id}/pod-definitions/{pod_id}"
|
|
156
|
+
path_params = {
|
|
157
|
+
'project_id': project_id,
|
|
158
|
+
'pod_id': pod_id,
|
|
159
|
+
}
|
|
160
|
+
call_leaf = leaf_template.format(**path_params)
|
|
161
|
+
|
|
162
|
+
query_params = None
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
if exp_status is None:
|
|
166
|
+
exp_status = [200]
|
|
167
|
+
|
|
168
|
+
resp = client.perform_call(
|
|
169
|
+
leaf=call_leaf,
|
|
170
|
+
method="GET",
|
|
171
|
+
params=query_params if query_params else None,
|
|
172
|
+
body=None,
|
|
173
|
+
exp_status=exp_status,
|
|
174
|
+
headers=header_params if header_params else None,
|
|
175
|
+
context_msg=None,
|
|
176
|
+
aspects=aspects,
|
|
177
|
+
)
|
|
178
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
179
|
+
rtnobj = None
|
|
180
|
+
else:
|
|
181
|
+
raw_data = resp.json()
|
|
182
|
+
rtnobj = Poddefinition.from_dict(raw_data)
|
|
183
|
+
return rtnobj
|
|
184
|
+
|
|
185
|
+
def pods_get_registration(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Podregistration:
|
|
186
|
+
"""
|
|
187
|
+
Read the latest pod registration.
|
|
188
|
+
"""
|
|
189
|
+
client = self.client
|
|
190
|
+
if aspects is None:
|
|
191
|
+
aspects = client.aspects
|
|
192
|
+
|
|
193
|
+
header_params = client.headers
|
|
194
|
+
if headers is not None:
|
|
195
|
+
header_params = headers
|
|
196
|
+
|
|
197
|
+
leaf_template = "/projects/{project_id}/pods/{pod_id}/registration"
|
|
198
|
+
path_params = {
|
|
199
|
+
'project_id': project_id,
|
|
200
|
+
'pod_id': pod_id,
|
|
201
|
+
}
|
|
202
|
+
call_leaf = leaf_template.format(**path_params)
|
|
203
|
+
|
|
204
|
+
query_params = None
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
if exp_status is None:
|
|
208
|
+
exp_status = [200]
|
|
209
|
+
|
|
210
|
+
resp = client.perform_call(
|
|
211
|
+
leaf=call_leaf,
|
|
212
|
+
method="GET",
|
|
213
|
+
params=query_params if query_params else None,
|
|
214
|
+
body=None,
|
|
215
|
+
exp_status=exp_status,
|
|
216
|
+
headers=header_params if header_params else None,
|
|
217
|
+
context_msg=None,
|
|
218
|
+
aspects=aspects,
|
|
219
|
+
)
|
|
220
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
221
|
+
rtnobj = None
|
|
222
|
+
else:
|
|
223
|
+
raw_data = resp.json()
|
|
224
|
+
rtnobj = Podregistration.from_dict(raw_data)
|
|
225
|
+
return rtnobj
|
|
226
|
+
|
|
227
|
+
def pods_get_state(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Podstate:
|
|
228
|
+
"""
|
|
229
|
+
Read a pod's current lifecycle state.
|
|
230
|
+
"""
|
|
231
|
+
client = self.client
|
|
232
|
+
if aspects is None:
|
|
233
|
+
aspects = client.aspects
|
|
234
|
+
|
|
235
|
+
header_params = client.headers
|
|
236
|
+
if headers is not None:
|
|
237
|
+
header_params = headers
|
|
238
|
+
|
|
239
|
+
leaf_template = "/projects/{project_id}/pods/{pod_id}/state"
|
|
240
|
+
path_params = {
|
|
241
|
+
'project_id': project_id,
|
|
242
|
+
'pod_id': pod_id,
|
|
243
|
+
}
|
|
244
|
+
call_leaf = leaf_template.format(**path_params)
|
|
245
|
+
|
|
246
|
+
query_params = None
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
if exp_status is None:
|
|
250
|
+
exp_status = [200]
|
|
251
|
+
|
|
252
|
+
resp = client.perform_call(
|
|
253
|
+
leaf=call_leaf,
|
|
254
|
+
method="GET",
|
|
255
|
+
params=query_params if query_params else None,
|
|
256
|
+
body=None,
|
|
257
|
+
exp_status=exp_status,
|
|
258
|
+
headers=header_params if header_params else None,
|
|
259
|
+
context_msg=None,
|
|
260
|
+
aspects=aspects,
|
|
261
|
+
)
|
|
262
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
263
|
+
rtnobj = None
|
|
264
|
+
else:
|
|
265
|
+
raw_data = resp.json()
|
|
266
|
+
rtnobj = Podstate.from_dict(raw_data)
|
|
267
|
+
return rtnobj
|
|
268
|
+
|
|
269
|
+
def pods_get_state_history(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
270
|
+
"""
|
|
271
|
+
Read a pod's lifecycle state history.
|
|
272
|
+
"""
|
|
273
|
+
client = self.client
|
|
274
|
+
if aspects is None:
|
|
275
|
+
aspects = client.aspects
|
|
276
|
+
|
|
277
|
+
header_params = client.headers
|
|
278
|
+
if headers is not None:
|
|
279
|
+
header_params = headers
|
|
280
|
+
|
|
281
|
+
leaf_template = "/projects/{project_id}/pods/{pod_id}/state/history"
|
|
282
|
+
path_params = {
|
|
283
|
+
'project_id': project_id,
|
|
284
|
+
'pod_id': pod_id,
|
|
285
|
+
}
|
|
286
|
+
call_leaf = leaf_template.format(**path_params)
|
|
287
|
+
|
|
288
|
+
query_params = None
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
if exp_status is None:
|
|
292
|
+
exp_status = [200]
|
|
293
|
+
|
|
294
|
+
resp = client.perform_call(
|
|
295
|
+
leaf=call_leaf,
|
|
296
|
+
method="GET",
|
|
297
|
+
params=query_params if query_params else None,
|
|
298
|
+
body=None,
|
|
299
|
+
exp_status=exp_status,
|
|
300
|
+
headers=header_params if header_params else None,
|
|
301
|
+
context_msg=None,
|
|
302
|
+
aspects=aspects,
|
|
303
|
+
)
|
|
304
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
305
|
+
rtnval = None
|
|
306
|
+
else:
|
|
307
|
+
raw_data = resp.json()
|
|
308
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
309
|
+
return rtnval
|
|
310
|
+
|
|
311
|
+
def pods_get_topology(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Podtopology:
|
|
312
|
+
"""
|
|
313
|
+
Read a pod's topology graph.
|
|
314
|
+
"""
|
|
315
|
+
client = self.client
|
|
316
|
+
if aspects is None:
|
|
317
|
+
aspects = client.aspects
|
|
318
|
+
|
|
319
|
+
header_params = client.headers
|
|
320
|
+
if headers is not None:
|
|
321
|
+
header_params = headers
|
|
322
|
+
|
|
323
|
+
leaf_template = "/projects/{project_id}/pods/{pod_id}/topology"
|
|
324
|
+
path_params = {
|
|
325
|
+
'project_id': project_id,
|
|
326
|
+
'pod_id': pod_id,
|
|
327
|
+
}
|
|
328
|
+
call_leaf = leaf_template.format(**path_params)
|
|
329
|
+
|
|
330
|
+
query_params = None
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
if exp_status is None:
|
|
334
|
+
exp_status = [200]
|
|
335
|
+
|
|
336
|
+
resp = client.perform_call(
|
|
337
|
+
leaf=call_leaf,
|
|
338
|
+
method="GET",
|
|
339
|
+
params=query_params if query_params else None,
|
|
340
|
+
body=None,
|
|
341
|
+
exp_status=exp_status,
|
|
342
|
+
headers=header_params if header_params else None,
|
|
343
|
+
context_msg=None,
|
|
344
|
+
aspects=aspects,
|
|
345
|
+
)
|
|
346
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
347
|
+
rtnobj = None
|
|
348
|
+
else:
|
|
349
|
+
raw_data = resp.json()
|
|
350
|
+
rtnobj = Podtopology.from_dict(raw_data)
|
|
351
|
+
return rtnobj
|
|
352
|
+
|
|
353
|
+
def pods_list_definitions(self, project_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
354
|
+
"""
|
|
355
|
+
List pod definitions for a project.
|
|
356
|
+
"""
|
|
357
|
+
client = self.client
|
|
358
|
+
if aspects is None:
|
|
359
|
+
aspects = client.aspects
|
|
360
|
+
|
|
361
|
+
header_params = client.headers
|
|
362
|
+
if headers is not None:
|
|
363
|
+
header_params = headers
|
|
364
|
+
|
|
365
|
+
leaf_template = "/projects/{project_id}/pod-definitions"
|
|
366
|
+
path_params = {
|
|
367
|
+
'project_id': project_id,
|
|
368
|
+
}
|
|
369
|
+
call_leaf = leaf_template.format(**path_params)
|
|
370
|
+
|
|
371
|
+
query_params = None
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
if exp_status is None:
|
|
375
|
+
exp_status = [200]
|
|
376
|
+
|
|
377
|
+
resp = client.perform_call(
|
|
378
|
+
leaf=call_leaf,
|
|
379
|
+
method="GET",
|
|
380
|
+
params=query_params if query_params else None,
|
|
381
|
+
body=None,
|
|
382
|
+
exp_status=exp_status,
|
|
383
|
+
headers=header_params if header_params else None,
|
|
384
|
+
context_msg=None,
|
|
385
|
+
aspects=aspects,
|
|
386
|
+
)
|
|
387
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
388
|
+
rtnval = None
|
|
389
|
+
else:
|
|
390
|
+
raw_data = resp.json()
|
|
391
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
392
|
+
return rtnval
|
|
393
|
+
|
|
394
|
+
def pods_list_registrations(self, project_id: str, pod_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
395
|
+
"""
|
|
396
|
+
List all historical pod registrations.
|
|
397
|
+
"""
|
|
398
|
+
client = self.client
|
|
399
|
+
if aspects is None:
|
|
400
|
+
aspects = client.aspects
|
|
401
|
+
|
|
402
|
+
header_params = client.headers
|
|
403
|
+
if headers is not None:
|
|
404
|
+
header_params = headers
|
|
405
|
+
|
|
406
|
+
leaf_template = "/projects/{project_id}/pods/{pod_id}/registrations"
|
|
407
|
+
path_params = {
|
|
408
|
+
'project_id': project_id,
|
|
409
|
+
'pod_id': pod_id,
|
|
410
|
+
}
|
|
411
|
+
call_leaf = leaf_template.format(**path_params)
|
|
412
|
+
|
|
413
|
+
query_params = None
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
if exp_status is None:
|
|
417
|
+
exp_status = [200]
|
|
418
|
+
|
|
419
|
+
resp = client.perform_call(
|
|
420
|
+
leaf=call_leaf,
|
|
421
|
+
method="GET",
|
|
422
|
+
params=query_params if query_params else None,
|
|
423
|
+
body=None,
|
|
424
|
+
exp_status=exp_status,
|
|
425
|
+
headers=header_params if header_params else None,
|
|
426
|
+
context_msg=None,
|
|
427
|
+
aspects=aspects,
|
|
428
|
+
)
|
|
429
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
430
|
+
rtnval = None
|
|
431
|
+
else:
|
|
432
|
+
raw_data = resp.json()
|
|
433
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
434
|
+
return rtnval
|
|
435
|
+
|
|
436
|
+
def pods_list_templates(self, project_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
437
|
+
"""
|
|
438
|
+
List pod templates.
|
|
439
|
+
"""
|
|
440
|
+
client = self.client
|
|
441
|
+
if aspects is None:
|
|
442
|
+
aspects = client.aspects
|
|
443
|
+
|
|
444
|
+
header_params = client.headers
|
|
445
|
+
if headers is not None:
|
|
446
|
+
header_params = headers
|
|
447
|
+
|
|
448
|
+
leaf_template = "/projects/{project_id}/pod-templates"
|
|
449
|
+
path_params = {
|
|
450
|
+
'project_id': project_id,
|
|
451
|
+
}
|
|
452
|
+
call_leaf = leaf_template.format(**path_params)
|
|
453
|
+
|
|
454
|
+
query_params = None
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
if exp_status is None:
|
|
458
|
+
exp_status = [200]
|
|
459
|
+
|
|
460
|
+
resp = client.perform_call(
|
|
461
|
+
leaf=call_leaf,
|
|
462
|
+
method="GET",
|
|
463
|
+
params=query_params if query_params else None,
|
|
464
|
+
body=None,
|
|
465
|
+
exp_status=exp_status,
|
|
466
|
+
headers=header_params if header_params else None,
|
|
467
|
+
context_msg=None,
|
|
468
|
+
aspects=aspects,
|
|
469
|
+
)
|
|
470
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
471
|
+
rtnval = None
|
|
472
|
+
else:
|
|
473
|
+
raw_data = resp.json()
|
|
474
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
475
|
+
return rtnval
|
|
476
|
+
|
|
477
|
+
def pods_materialize_template(self, project_id: str, template_id: str, body: Podtemplatematerializerequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
478
|
+
"""
|
|
479
|
+
Materialize a pod from a template.
|
|
480
|
+
"""
|
|
481
|
+
client = self.client
|
|
482
|
+
if aspects is None:
|
|
483
|
+
aspects = client.aspects
|
|
484
|
+
|
|
485
|
+
header_params = client.headers
|
|
486
|
+
if headers is not None:
|
|
487
|
+
header_params = headers
|
|
488
|
+
|
|
489
|
+
leaf_template = "/projects/{project_id}/pod-templates/{template_id}:materialize"
|
|
490
|
+
path_params = {
|
|
491
|
+
'project_id': project_id,
|
|
492
|
+
'template_id': template_id,
|
|
493
|
+
}
|
|
494
|
+
call_leaf = leaf_template.format(**path_params)
|
|
495
|
+
|
|
496
|
+
query_params = None
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
if exp_status is None:
|
|
500
|
+
exp_status = [202]
|
|
501
|
+
|
|
502
|
+
resp = client.perform_call(
|
|
503
|
+
leaf=call_leaf,
|
|
504
|
+
method="POST",
|
|
505
|
+
params=query_params if query_params else None,
|
|
506
|
+
body=body,
|
|
507
|
+
exp_status=exp_status,
|
|
508
|
+
headers=header_params if header_params else None,
|
|
509
|
+
context_msg=None,
|
|
510
|
+
aspects=aspects,
|
|
511
|
+
)
|
|
512
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
513
|
+
rtnval = None
|
|
514
|
+
else:
|
|
515
|
+
rtnval = resp.json()
|
|
516
|
+
return rtnval
|
|
517
|
+
|
|
518
|
+
def pods_update_template_parameters(self, project_id: str, template_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Podtemplate:
|
|
519
|
+
"""
|
|
520
|
+
Update template parameters.
|
|
521
|
+
"""
|
|
522
|
+
client = self.client
|
|
523
|
+
if aspects is None:
|
|
524
|
+
aspects = client.aspects
|
|
525
|
+
|
|
526
|
+
header_params = client.headers
|
|
527
|
+
if headers is not None:
|
|
528
|
+
header_params = headers
|
|
529
|
+
|
|
530
|
+
leaf_template = "/projects/{project_id}/pod-templates/{template_id}/parameters"
|
|
531
|
+
path_params = {
|
|
532
|
+
'project_id': project_id,
|
|
533
|
+
'template_id': template_id,
|
|
534
|
+
}
|
|
535
|
+
call_leaf = leaf_template.format(**path_params)
|
|
536
|
+
|
|
537
|
+
query_params = None
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
if exp_status is None:
|
|
541
|
+
exp_status = [200]
|
|
542
|
+
|
|
543
|
+
resp = client.perform_call(
|
|
544
|
+
leaf=call_leaf,
|
|
545
|
+
method="PUT",
|
|
546
|
+
params=query_params if query_params else None,
|
|
547
|
+
body=body,
|
|
548
|
+
exp_status=exp_status,
|
|
549
|
+
headers=header_params if header_params else None,
|
|
550
|
+
context_msg=None,
|
|
551
|
+
aspects=aspects,
|
|
552
|
+
)
|
|
553
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
554
|
+
rtnobj = None
|
|
555
|
+
else:
|
|
556
|
+
raw_data = resp.json()
|
|
557
|
+
rtnobj = Podtemplate.from_dict(raw_data)
|
|
558
|
+
return rtnobj
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.pychestrate.rest.client.models.progress import Progressframe
|
|
6
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
7
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProgressApiGroup(RestApiGroup):
|
|
11
|
+
"""
|
|
12
|
+
Pod-client → server live progress ingestion.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def progress_post_frame(self, run_id: str, body: Progressframe, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
16
|
+
"""
|
|
17
|
+
Ingest a live-progress frame for a run.
|
|
18
|
+
|
|
19
|
+
Posted by the pod client agent over mTLS at intervals during the
|
|
20
|
+
run. Payload shape matches the `codecraftai-testbase`
|
|
21
|
+
`ProgressConcentratorServer` / `ForwardingInfo` contract so an
|
|
22
|
+
unmodified testbase client can post directly without
|
|
23
|
+
translation.
|
|
24
|
+
|
|
25
|
+
Returns 202 on accept; the ingester is passive and never blocks
|
|
26
|
+
the caller. Errors in downstream parsing are surfaced via the
|
|
27
|
+
`RunEvent` SSE stream rather than the HTTP response.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
client = self.client
|
|
31
|
+
if aspects is None:
|
|
32
|
+
aspects = client.aspects
|
|
33
|
+
|
|
34
|
+
header_params = client.headers
|
|
35
|
+
if headers is not None:
|
|
36
|
+
header_params = headers
|
|
37
|
+
|
|
38
|
+
leaf_template = "/runs/{run_id}/progress"
|
|
39
|
+
path_params = {
|
|
40
|
+
'run_id': run_id,
|
|
41
|
+
}
|
|
42
|
+
call_leaf = leaf_template.format(**path_params)
|
|
43
|
+
|
|
44
|
+
query_params = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
if exp_status is None:
|
|
48
|
+
exp_status = [202]
|
|
49
|
+
|
|
50
|
+
resp = client.perform_call(
|
|
51
|
+
leaf=call_leaf,
|
|
52
|
+
method="POST",
|
|
53
|
+
params=query_params if query_params else None,
|
|
54
|
+
body=body,
|
|
55
|
+
exp_status=exp_status,
|
|
56
|
+
headers=header_params if header_params else None,
|
|
57
|
+
context_msg=None,
|
|
58
|
+
aspects=aspects,
|
|
59
|
+
)
|
|
60
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
61
|
+
rtnval = None
|
|
62
|
+
else:
|
|
63
|
+
rtnval = resp.json()
|
|
64
|
+
return rtnval
|