malevich-coretools 0.3.61__tar.gz → 0.3.62__tar.gz
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 malevich-coretools might be problematic. Click here for more details.
- {malevich_coretools-0.3.61/malevich_coretools.egg-info → malevich_coretools-0.3.62}/PKG-INFO +1 -1
- malevich_coretools-0.3.62/VERSION +1 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/abstract.py +19 -5
- malevich_coretools-0.3.62/malevich_coretools/admin/utils.py +374 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/funcs/funcs.py +18 -2
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/funcs/helpers.py +2 -10
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/const.py +1 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/helpers.py +1 -1
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62/malevich_coretools.egg-info}/PKG-INFO +1 -1
- malevich_coretools-0.3.61/VERSION +0 -1
- malevich_coretools-0.3.61/malevich_coretools/admin/utils.py +0 -99
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/LICENSE +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/MANIFEST.in +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/README.md +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/operations.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/pipeline.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/statuses.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/admin/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/batch/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/batch/utils.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/funcs/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/funcs/checks.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/config.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/kafka_utils.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/tools/__init__.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/tools/abstract.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/tools/vast.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/utils.py +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/SOURCES.txt +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/dependency_links.txt +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/requires.txt +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/top_level.txt +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/pyproject.toml +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/requirements.txt +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/setup.cfg +0 -0
- {malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.62
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/abstract.py
RENAMED
|
@@ -139,12 +139,8 @@ class ScaleInfo(BaseModel):
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
class TaskComponent(BaseModel):
|
|
142
|
-
|
|
143
|
-
control: Optional[str] = None
|
|
144
|
-
extra: Optional[str] = None
|
|
145
|
-
internal: Optional[str] = None
|
|
142
|
+
main: Optional[str] = None
|
|
146
143
|
keyValue: Optional[str] = None
|
|
147
|
-
minimal: Optional[str] = None
|
|
148
144
|
objectStorage: Optional[str] = None
|
|
149
145
|
|
|
150
146
|
|
|
@@ -504,6 +500,24 @@ class OperationOrNone(BaseModel):
|
|
|
504
500
|
operationId: Optional[Alias.Id] = None
|
|
505
501
|
|
|
506
502
|
|
|
503
|
+
class AdminRunInfoReq(OperationOrNone):
|
|
504
|
+
dmId: Optional[str] = None
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
class AdminDMRegister(BaseModel):
|
|
508
|
+
id: int
|
|
509
|
+
url: Optional[str]
|
|
510
|
+
secret: Optional[str]
|
|
511
|
+
appSecret: Optional[str]
|
|
512
|
+
login: Optional[str]
|
|
513
|
+
actuaryDMId: Optional[int]
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
class AdminDMUnregister(BaseModel):
|
|
517
|
+
id: str
|
|
518
|
+
actuaryDMId: Optional[int]
|
|
519
|
+
|
|
520
|
+
|
|
507
521
|
class AdminStopOperation(BaseModel):
|
|
508
522
|
operationId: Optional[Alias.Id] = None
|
|
509
523
|
withLogs: bool
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
from typing import Coroutine, Literal, Union, overload
|
|
2
|
+
|
|
3
|
+
import malevich_coretools.funcs.funcs as f
|
|
4
|
+
from malevich_coretools.abstract import * # noqa: F403
|
|
5
|
+
from malevich_coretools.batch import Batcher
|
|
6
|
+
from malevich_coretools.secondary import Config
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@overload
|
|
10
|
+
def admin_get_runs(
|
|
11
|
+
*,
|
|
12
|
+
auth: Optional[AUTH] = None,
|
|
13
|
+
conn_url: Optional[str] = None,
|
|
14
|
+
batcher: Optional[Batcher] = None,
|
|
15
|
+
is_async: Literal[False] = False,
|
|
16
|
+
) -> AdminRunsInfo:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@overload
|
|
21
|
+
def admin_get_runs(
|
|
22
|
+
*,
|
|
23
|
+
auth: Optional[AUTH] = None,
|
|
24
|
+
conn_url: Optional[str] = None,
|
|
25
|
+
batcher: Optional[Batcher] = None,
|
|
26
|
+
is_async: Literal[True],
|
|
27
|
+
) -> Coroutine[Any, Any, AdminRunsInfo]:
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def admin_get_runs(
|
|
32
|
+
*,
|
|
33
|
+
auth: Optional[AUTH] = None,
|
|
34
|
+
conn_url: Optional[str] = None,
|
|
35
|
+
batcher: Optional[Batcher] = None,
|
|
36
|
+
is_async: bool = False,
|
|
37
|
+
) -> Union[AdminRunsInfo, Coroutine[Any, Any, AdminRunsInfo]]:
|
|
38
|
+
"""return info about all runs"""
|
|
39
|
+
if batcher is None:
|
|
40
|
+
batcher = Config.BATCHER
|
|
41
|
+
if batcher is not None:
|
|
42
|
+
return batcher.add("getAllRuns", result_model=AdminRunsInfo)
|
|
43
|
+
if is_async:
|
|
44
|
+
return f.get_admin_runs_async(auth=auth, conn_url=conn_url)
|
|
45
|
+
return f.get_admin_runs(auth=auth, conn_url=conn_url)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@overload
|
|
49
|
+
def admin_get_run_info(
|
|
50
|
+
id: Alias.Id,
|
|
51
|
+
*,
|
|
52
|
+
dm_id: Optional[str] = None,
|
|
53
|
+
auth: Optional[AUTH] = None,
|
|
54
|
+
conn_url: Optional[str] = None,
|
|
55
|
+
batcher: Optional[Batcher] = None,
|
|
56
|
+
is_async: Literal[False] = False,
|
|
57
|
+
) -> Alias.Json:
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@overload
|
|
62
|
+
def admin_get_run_info(
|
|
63
|
+
id: Alias.Id,
|
|
64
|
+
*,
|
|
65
|
+
dm_id: Optional[str] = None,
|
|
66
|
+
auth: Optional[AUTH] = None,
|
|
67
|
+
conn_url: Optional[str] = None,
|
|
68
|
+
batcher: Optional[Batcher] = None,
|
|
69
|
+
is_async: Literal[True],
|
|
70
|
+
) -> Coroutine[Any, Any, Alias.Json]:
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def admin_get_run_info(
|
|
75
|
+
id: Alias.Id,
|
|
76
|
+
*,
|
|
77
|
+
dm_id: Optional[str] = None,
|
|
78
|
+
auth: Optional[AUTH] = None,
|
|
79
|
+
conn_url: Optional[str] = None,
|
|
80
|
+
batcher: Optional[Batcher] = None,
|
|
81
|
+
is_async: bool = False,
|
|
82
|
+
) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
|
|
83
|
+
"""return run info by operation `id`"""
|
|
84
|
+
if batcher is None:
|
|
85
|
+
batcher = Config.BATCHER
|
|
86
|
+
data = AdminRunInfoReq(operationId=id, dmId=dm_id)
|
|
87
|
+
if batcher is not None:
|
|
88
|
+
return batcher.add("getRunInfo", data=data)
|
|
89
|
+
if is_async:
|
|
90
|
+
return f.get_admin_runs_info_async(data, auth=auth, conn_url=conn_url)
|
|
91
|
+
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@overload
|
|
95
|
+
def admin_get_runs_info(
|
|
96
|
+
*,
|
|
97
|
+
dm_id: Optional[str] = None,
|
|
98
|
+
auth: Optional[AUTH] = None,
|
|
99
|
+
conn_url: Optional[str] = None,
|
|
100
|
+
batcher: Optional[Batcher] = None,
|
|
101
|
+
is_async: Literal[False] = False,
|
|
102
|
+
) -> Alias.Json:
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@overload
|
|
107
|
+
def admin_get_runs_info(
|
|
108
|
+
*,
|
|
109
|
+
dm_id: Optional[str] = None,
|
|
110
|
+
auth: Optional[AUTH] = None,
|
|
111
|
+
conn_url: Optional[str] = None,
|
|
112
|
+
batcher: Optional[Batcher] = None,
|
|
113
|
+
is_async: Literal[True],
|
|
114
|
+
) -> Coroutine[Any, Any, Alias.Json]:
|
|
115
|
+
pass
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def admin_get_runs_info(
|
|
119
|
+
*,
|
|
120
|
+
dm_id: Optional[str] = None,
|
|
121
|
+
auth: Optional[AUTH] = None,
|
|
122
|
+
conn_url: Optional[str] = None,
|
|
123
|
+
batcher: Optional[Batcher] = None,
|
|
124
|
+
is_async: bool = False,
|
|
125
|
+
) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
|
|
126
|
+
"""return json: dm id -> info about its runs"""
|
|
127
|
+
if batcher is None:
|
|
128
|
+
batcher = Config.BATCHER
|
|
129
|
+
data = AdminRunInfoReq(dmId=dm_id)
|
|
130
|
+
if batcher is not None:
|
|
131
|
+
return batcher.add("getRunInfo", data=data)
|
|
132
|
+
if is_async:
|
|
133
|
+
return f.get_admin_runs_info_async(data, auth=auth, conn_url=conn_url)
|
|
134
|
+
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@overload
|
|
138
|
+
def admin_dm_register(
|
|
139
|
+
id: Optional[int] = None,
|
|
140
|
+
url: Optional[str] = None,
|
|
141
|
+
secret: Optional[str] = None,
|
|
142
|
+
app_secret: Optional[str] = None,
|
|
143
|
+
login: Optional[str] = None,
|
|
144
|
+
actuary_dm_id: Optional[int] = None,
|
|
145
|
+
*,
|
|
146
|
+
auth: Optional[AUTH] = None,
|
|
147
|
+
conn_url: Optional[str] = None,
|
|
148
|
+
batcher: Optional[Batcher] = None,
|
|
149
|
+
is_async: Literal[False] = False,
|
|
150
|
+
) -> None:
|
|
151
|
+
pass
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@overload
|
|
155
|
+
def admin_dm_register(
|
|
156
|
+
id: Optional[int] = None,
|
|
157
|
+
url: Optional[str] = None,
|
|
158
|
+
secret: Optional[str] = None,
|
|
159
|
+
app_secret: Optional[str] = None,
|
|
160
|
+
login: Optional[str] = None,
|
|
161
|
+
actuary_dm_id: Optional[int] = None,
|
|
162
|
+
*,
|
|
163
|
+
auth: Optional[AUTH] = None,
|
|
164
|
+
conn_url: Optional[str] = None,
|
|
165
|
+
batcher: Optional[Batcher] = None,
|
|
166
|
+
is_async: Literal[True],
|
|
167
|
+
) -> Coroutine[Any, Any, None]:
|
|
168
|
+
pass
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def admin_dm_register(
|
|
172
|
+
id: Optional[int] = None,
|
|
173
|
+
url: Optional[str] = None,
|
|
174
|
+
secret: Optional[str] = None,
|
|
175
|
+
app_secret: Optional[str] = None,
|
|
176
|
+
login: Optional[str] = None,
|
|
177
|
+
actuary_dm_id: Optional[int] = None,
|
|
178
|
+
*,
|
|
179
|
+
auth: Optional[AUTH] = None,
|
|
180
|
+
conn_url: Optional[str] = None,
|
|
181
|
+
batcher: Optional[Batcher] = None,
|
|
182
|
+
is_async: bool = False,
|
|
183
|
+
) -> Union[None, Coroutine[Any, Any, None]]:
|
|
184
|
+
assert id is not None or (url is not None and secret is not None and app_secret is not None and login is not None), "id or url & secret & app_secret & login should set"
|
|
185
|
+
if batcher is None:
|
|
186
|
+
batcher = Config.BATCHER
|
|
187
|
+
data = AdminDMRegister(id=id, url=url, secret=secret, appSecret=app_secret, login=login, actuaryDMId=actuary_dm_id)
|
|
188
|
+
if batcher is not None:
|
|
189
|
+
return batcher.add("postDMRegister", data=data)
|
|
190
|
+
if is_async:
|
|
191
|
+
return f.post_admin_dm_register_async(data, auth=auth, conn_url=conn_url)
|
|
192
|
+
return f.post_admin_dm_register(data, auth=auth, conn_url=conn_url)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@overload
|
|
196
|
+
def admin_dm_unregister(
|
|
197
|
+
id: Union[str, int] = 0,
|
|
198
|
+
actuary_dm_id: Optional[int] = None,
|
|
199
|
+
*,
|
|
200
|
+
auth: Optional[AUTH] = None,
|
|
201
|
+
conn_url: Optional[str] = None,
|
|
202
|
+
batcher: Optional[Batcher] = None,
|
|
203
|
+
is_async: Literal[False] = False,
|
|
204
|
+
) -> None:
|
|
205
|
+
pass
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
@overload
|
|
209
|
+
def admin_dm_unregister(
|
|
210
|
+
id: Union[str, int] = 0,
|
|
211
|
+
actuary_dm_id: Optional[int] = None,
|
|
212
|
+
*,
|
|
213
|
+
auth: Optional[AUTH] = None,
|
|
214
|
+
conn_url: Optional[str] = None,
|
|
215
|
+
batcher: Optional[Batcher] = None,
|
|
216
|
+
is_async: Literal[True],
|
|
217
|
+
) -> Coroutine[Any, Any, None]:
|
|
218
|
+
pass
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def admin_dm_unregister(
|
|
222
|
+
id: Union[str, int] = 0, # id or login
|
|
223
|
+
actuary_dm_id: Optional[int] = None,
|
|
224
|
+
*,
|
|
225
|
+
auth: Optional[AUTH] = None,
|
|
226
|
+
conn_url: Optional[str] = None,
|
|
227
|
+
batcher: Optional[Batcher] = None,
|
|
228
|
+
is_async: bool = False,
|
|
229
|
+
) -> Union[None, Coroutine[Any, Any, None]]:
|
|
230
|
+
if isinstance(id, int):
|
|
231
|
+
id = f'{id:05d}'
|
|
232
|
+
if batcher is None:
|
|
233
|
+
batcher = Config.BATCHER
|
|
234
|
+
data = AdminDMUnregister(id=id, actuaryDMId=actuary_dm_id)
|
|
235
|
+
if batcher is not None:
|
|
236
|
+
return batcher.add("deleteDMRegister", data=data)
|
|
237
|
+
if is_async:
|
|
238
|
+
return f.delete_admin_dm_register_async(data, auth=auth, conn_url=conn_url)
|
|
239
|
+
return f.delete_admin_dm_register(data, auth=auth, conn_url=conn_url)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
@overload
|
|
243
|
+
def admin_update_superuser(
|
|
244
|
+
login: str,
|
|
245
|
+
is_superuser: bool = True,
|
|
246
|
+
*,
|
|
247
|
+
auth: Optional[AUTH] = None,
|
|
248
|
+
conn_url: Optional[str] = None,
|
|
249
|
+
batcher: Optional[Batcher] = None,
|
|
250
|
+
is_async: Literal[False] = False,
|
|
251
|
+
) -> Alias.Info:
|
|
252
|
+
pass
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
@overload
|
|
256
|
+
def admin_update_superuser(
|
|
257
|
+
login: str,
|
|
258
|
+
is_superuser: bool = True,
|
|
259
|
+
*,
|
|
260
|
+
auth: Optional[AUTH] = None,
|
|
261
|
+
conn_url: Optional[str] = None,
|
|
262
|
+
batcher: Optional[Batcher] = None,
|
|
263
|
+
is_async: Literal[True],
|
|
264
|
+
) -> Coroutine[Any, Any, Alias.Info]:
|
|
265
|
+
pass
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def admin_update_superuser(
|
|
269
|
+
login: str,
|
|
270
|
+
is_superuser: bool = True,
|
|
271
|
+
*,
|
|
272
|
+
auth: Optional[AUTH] = None,
|
|
273
|
+
conn_url: Optional[str] = None,
|
|
274
|
+
batcher: Optional[Batcher] = None,
|
|
275
|
+
is_async: bool = False,
|
|
276
|
+
) -> Union[Alias.Info, Coroutine[Any, Any, Alias.Info]]:
|
|
277
|
+
"""update user role by login"""
|
|
278
|
+
if batcher is None:
|
|
279
|
+
batcher = Config.BATCHER
|
|
280
|
+
data = Superuser(login=login, isSuperuser=is_superuser)
|
|
281
|
+
if batcher is not None:
|
|
282
|
+
return batcher.add("postUpdateSuperuser", data=data)
|
|
283
|
+
if is_async:
|
|
284
|
+
return f.post_admin_update_superuser_async(data, auth=auth, conn_url=conn_url)
|
|
285
|
+
return f.post_admin_update_superuser(data, auth=auth, conn_url=conn_url)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
@overload
|
|
289
|
+
def admin_delete_run(
|
|
290
|
+
id: Alias.Id,
|
|
291
|
+
withLogs: bool = False,
|
|
292
|
+
*,
|
|
293
|
+
auth: Optional[AUTH] = None,
|
|
294
|
+
conn_url: Optional[str] = None,
|
|
295
|
+
batcher: Optional[Batcher] = None,
|
|
296
|
+
is_async: Literal[False] = False,
|
|
297
|
+
) -> Alias.Json:
|
|
298
|
+
pass
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
@overload
|
|
302
|
+
def admin_delete_run(
|
|
303
|
+
id: Alias.Id,
|
|
304
|
+
withLogs: bool = False,
|
|
305
|
+
*,
|
|
306
|
+
auth: Optional[AUTH] = None,
|
|
307
|
+
conn_url: Optional[str] = None,
|
|
308
|
+
batcher: Optional[Batcher] = None,
|
|
309
|
+
is_async: Literal[True],
|
|
310
|
+
) -> Coroutine[Any, Any, Alias.Json]:
|
|
311
|
+
pass
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def admin_delete_run(
|
|
315
|
+
id: Alias.Id,
|
|
316
|
+
withLogs: bool = False,
|
|
317
|
+
*,
|
|
318
|
+
auth: Optional[AUTH] = None,
|
|
319
|
+
conn_url: Optional[str] = None,
|
|
320
|
+
batcher: Optional[Batcher] = None,
|
|
321
|
+
is_async: bool = False,
|
|
322
|
+
) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
|
|
323
|
+
"""delete run by operation `id`"""
|
|
324
|
+
if batcher is None:
|
|
325
|
+
batcher = Config.BATCHER
|
|
326
|
+
data = AdminStopOperation(operationId=id, withLogs=withLogs)
|
|
327
|
+
if batcher is not None:
|
|
328
|
+
return batcher.add("deleteRuns", data=data)
|
|
329
|
+
if is_async:
|
|
330
|
+
return f.delete_admin_runs_async(data, auth=auth, conn_url=conn_url)
|
|
331
|
+
return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
@overload
|
|
335
|
+
def admin_delete_runs(
|
|
336
|
+
withLogs: bool = False,
|
|
337
|
+
*,
|
|
338
|
+
auth: Optional[AUTH] = None,
|
|
339
|
+
conn_url: Optional[str] = None,
|
|
340
|
+
batcher: Optional[Batcher] = None,
|
|
341
|
+
is_async: Literal[False] = False,
|
|
342
|
+
) -> Alias.Json:
|
|
343
|
+
pass
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
@overload
|
|
347
|
+
def admin_delete_runs(
|
|
348
|
+
withLogs: bool = False,
|
|
349
|
+
*,
|
|
350
|
+
auth: Optional[AUTH] = None,
|
|
351
|
+
conn_url: Optional[str] = None,
|
|
352
|
+
batcher: Optional[Batcher] = None,
|
|
353
|
+
is_async: Literal[True],
|
|
354
|
+
) -> Coroutine[Any, Any, Alias.Json]:
|
|
355
|
+
pass
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
def admin_delete_runs(
|
|
359
|
+
withLogs: bool = False,
|
|
360
|
+
*,
|
|
361
|
+
auth: Optional[AUTH] = None,
|
|
362
|
+
conn_url: Optional[str] = None,
|
|
363
|
+
batcher: Optional[Batcher] = None,
|
|
364
|
+
is_async: bool = False,
|
|
365
|
+
) -> Union[Alias.Json, Coroutine[Any, Any, Alias.Json]]:
|
|
366
|
+
"""delete all runs"""
|
|
367
|
+
if batcher is None:
|
|
368
|
+
batcher = Config.BATCHER
|
|
369
|
+
data = AdminStopOperation(withLogs=withLogs)
|
|
370
|
+
if batcher is not None:
|
|
371
|
+
return batcher.add("deleteRuns", data=data)
|
|
372
|
+
if is_async:
|
|
373
|
+
return f.delete_admin_runs_async(data, auth=auth, conn_url=conn_url)
|
|
374
|
+
return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
|
|
@@ -1114,14 +1114,30 @@ async def get_admin_runs_async(*args, **kwargs) -> AdminRunsInfo:
|
|
|
1114
1114
|
return model_from_json(await send_to_core_get_async(ADMIN_RUNS, *args, **kwargs), AdminRunsInfo)
|
|
1115
1115
|
|
|
1116
1116
|
|
|
1117
|
-
def get_admin_runs_info(data:
|
|
1117
|
+
def get_admin_runs_info(data: AdminRunInfoReq, *args, **kwargs) -> Alias.Json:
|
|
1118
1118
|
return send_to_core_modify(ADMIN_RUNS_INFO, data, *args, **kwargs)
|
|
1119
1119
|
|
|
1120
1120
|
|
|
1121
|
-
async def get_admin_runs_info_async(data:
|
|
1121
|
+
async def get_admin_runs_info_async(data: AdminRunInfoReq, *args, **kwargs) -> Alias.Json:
|
|
1122
1122
|
return await send_to_core_modify_async(ADMIN_RUNS_INFO, data, *args, **kwargs)
|
|
1123
1123
|
|
|
1124
1124
|
|
|
1125
|
+
def post_admin_dm_register(data: AdminDMRegister, *args, **kwargs) -> None:
|
|
1126
|
+
return send_to_core_modify(ADMIN_DM_REGISTER, data, *args, **kwargs)
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
async def post_admin_dm_register_async(data: AdminDMRegister, *args, **kwargs) -> None:
|
|
1130
|
+
return await send_to_core_modify_async(ADMIN_DM_REGISTER, data, *args, **kwargs)
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
def delete_admin_dm_register(data: AdminDMUnregister, *args, **kwargs) -> None:
|
|
1134
|
+
return send_to_core_modify(ADMIN_DM_REGISTER, data, *args, **kwargs, is_post=False)
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
async def delete_admin_dm_register_async(data: AdminDMUnregister, *args, **kwargs) -> None:
|
|
1138
|
+
return await send_to_core_modify_async(ADMIN_DM_REGISTER, data, *args, **kwargs, is_post=False)
|
|
1139
|
+
|
|
1140
|
+
|
|
1125
1141
|
def post_admin_update_superuser(data: Superuser, *args, **kwargs) -> Alias.Info:
|
|
1126
1142
|
return send_to_core_modify(ADMIN_SUPERUSER, data, *args, **kwargs)
|
|
1127
1143
|
|
|
@@ -287,21 +287,13 @@ def create_user_config(
|
|
|
287
287
|
|
|
288
288
|
|
|
289
289
|
def create_task_component(
|
|
290
|
-
|
|
291
|
-
control: Optional[str] = None,
|
|
292
|
-
extra: Optional[str] = None,
|
|
293
|
-
internal: Optional[str] = None,
|
|
290
|
+
main: Optional[str] = None,
|
|
294
291
|
key_value: Optional[str] = None,
|
|
295
|
-
minimal: Optional[str] = None,
|
|
296
292
|
object_storage: Optional[str] = None,
|
|
297
293
|
) -> TaskComponent:
|
|
298
294
|
return TaskComponent(
|
|
299
|
-
|
|
300
|
-
control=control,
|
|
301
|
-
extra=extra,
|
|
302
|
-
internal=internal,
|
|
295
|
+
main=main,
|
|
303
296
|
keyValue=key_value,
|
|
304
|
-
minimal=minimal,
|
|
305
297
|
objectStorage=object_storage
|
|
306
298
|
)
|
|
307
299
|
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/const.py
RENAMED
|
@@ -168,6 +168,7 @@ TEMP_RUN_OPERATIONS_IDS = lambda taskId, cfgId: f"{TEMP_RUN_MAIN}/operationsIds/
|
|
|
168
168
|
ADMIN_MAIN = f"{API_VERSION}/admin"
|
|
169
169
|
ADMIN_RUNS = f"{ADMIN_MAIN}/runs"
|
|
170
170
|
ADMIN_RUNS_INFO = f"{ADMIN_MAIN}/runs/info"
|
|
171
|
+
ADMIN_DM_REGISTER = f"{ADMIN_MAIN}/dm/register"
|
|
171
172
|
ADMIN_SUPERUSER = f"{ADMIN_MAIN}/superuser"
|
|
172
173
|
|
|
173
174
|
## ManagerController
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/helpers.py
RENAMED
|
@@ -57,7 +57,7 @@ def bool_to_str(b: bool) -> str:
|
|
|
57
57
|
return "true" if b else "false"
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
def __show_logs_result(res: LogsResult, i: Optional[int]): # noqa: ANN202
|
|
60
|
+
def __show_logs_result(res: LogsResult, i: Optional[int] = None): # noqa: ANN202
|
|
61
61
|
if len(res.data) > 0:
|
|
62
62
|
print(f"------- main ({i}):" if i is not None else "------- main:")
|
|
63
63
|
print(res.data)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.61
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import malevich_coretools.funcs.funcs as f
|
|
2
|
-
from malevich_coretools.abstract import * # noqa: F403
|
|
3
|
-
from malevich_coretools.batch import Batcher
|
|
4
|
-
from malevich_coretools.secondary import Config
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def admin_get_runs(
|
|
8
|
-
*,
|
|
9
|
-
auth: Optional[AUTH] = None,
|
|
10
|
-
conn_url: Optional[str] = None,
|
|
11
|
-
batcher: Optional[Batcher] = None,
|
|
12
|
-
) -> AdminRunsInfo:
|
|
13
|
-
"""return info about all runs"""
|
|
14
|
-
if batcher is None:
|
|
15
|
-
batcher = Config.BATCHER
|
|
16
|
-
if batcher is not None:
|
|
17
|
-
return batcher.add("getAllRuns", result_model=AdminRunsInfo)
|
|
18
|
-
return f.get_admin_runs(auth=auth, conn_url=conn_url)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def admin_get_run_info(
|
|
22
|
-
id: Alias.Id,
|
|
23
|
-
*,
|
|
24
|
-
auth: Optional[AUTH] = None,
|
|
25
|
-
conn_url: Optional[str] = None,
|
|
26
|
-
batcher: Optional[Batcher] = None,
|
|
27
|
-
) -> Alias.Json:
|
|
28
|
-
"""return run info by operation `id`"""
|
|
29
|
-
if batcher is None:
|
|
30
|
-
batcher = Config.BATCHER
|
|
31
|
-
data = OperationOrNone(operationId=id)
|
|
32
|
-
if batcher is not None:
|
|
33
|
-
return batcher.add("getRunInfo", data=data)
|
|
34
|
-
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def admin_get_runs_info(
|
|
38
|
-
*,
|
|
39
|
-
auth: Optional[AUTH] = None,
|
|
40
|
-
conn_url: Optional[str] = None,
|
|
41
|
-
batcher: Optional[Batcher] = None,
|
|
42
|
-
) -> Alias.Json:
|
|
43
|
-
"""return json: dm id -> info about its runs"""
|
|
44
|
-
if batcher is None:
|
|
45
|
-
batcher = Config.BATCHER
|
|
46
|
-
data = OperationOrNone()
|
|
47
|
-
if batcher is not None:
|
|
48
|
-
return batcher.add("getRunInfo", data=data)
|
|
49
|
-
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def admin_update_superuser(
|
|
53
|
-
login: str,
|
|
54
|
-
is_superuser: bool = True,
|
|
55
|
-
*,
|
|
56
|
-
auth: Optional[AUTH] = None,
|
|
57
|
-
conn_url: Optional[str] = None,
|
|
58
|
-
batcher: Optional[Batcher] = None,
|
|
59
|
-
) -> Alias.Info:
|
|
60
|
-
"""update user role by login"""
|
|
61
|
-
if batcher is None:
|
|
62
|
-
batcher = Config.BATCHER
|
|
63
|
-
data = Superuser(login=login, isSuperuser=is_superuser)
|
|
64
|
-
if batcher is not None:
|
|
65
|
-
return batcher.add("postUpdateSuperuser", data=data)
|
|
66
|
-
return f.post_admin_update_superuser(data, auth=auth, conn_url=conn_url)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def admin_delete_run(
|
|
70
|
-
id: Alias.Id,
|
|
71
|
-
withLogs: bool = False,
|
|
72
|
-
*,
|
|
73
|
-
auth: Optional[AUTH] = None,
|
|
74
|
-
conn_url: Optional[str] = None,
|
|
75
|
-
batcher: Optional[Batcher] = None,
|
|
76
|
-
) -> Alias.Json:
|
|
77
|
-
"""delete run by operation `id`"""
|
|
78
|
-
if batcher is None:
|
|
79
|
-
batcher = Config.BATCHER
|
|
80
|
-
data = AdminStopOperation(operationId=id, withLogs=withLogs)
|
|
81
|
-
if batcher is not None:
|
|
82
|
-
return batcher.add("deleteRuns", data=data)
|
|
83
|
-
return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def admin_delete_runs(
|
|
87
|
-
withLogs: bool = False,
|
|
88
|
-
*,
|
|
89
|
-
auth: Optional[AUTH] = None,
|
|
90
|
-
conn_url: Optional[str] = None,
|
|
91
|
-
batcher: Optional[Batcher] = None,
|
|
92
|
-
) -> Alias.Json:
|
|
93
|
-
"""delete all runs"""
|
|
94
|
-
if batcher is None:
|
|
95
|
-
batcher = Config.BATCHER
|
|
96
|
-
data = AdminStopOperation(withLogs=withLogs)
|
|
97
|
-
if batcher is not None:
|
|
98
|
-
return batcher.add("deleteRuns", data=data)
|
|
99
|
-
return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/__init__.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/operations.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/pipeline.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/abstract/statuses.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/admin/__init__.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/batch/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/funcs/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/__init__.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/config.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/secondary/kafka_utils.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/tools/__init__.py
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools/tools/abstract.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/requires.txt
RENAMED
|
File without changes
|
{malevich_coretools-0.3.61 → malevich_coretools-0.3.62}/malevich_coretools.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|