malevich-coretools 0.3.61__py3-none-any.whl → 0.3.63__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 malevich-coretools might be problematic. Click here for more details.
- malevich_coretools/abstract/abstract.py +20 -5
- malevich_coretools/admin/utils.py +277 -2
- malevich_coretools/funcs/funcs.py +18 -2
- malevich_coretools/funcs/helpers.py +2 -10
- malevich_coretools/secondary/const.py +1 -0
- malevich_coretools/secondary/helpers.py +1 -1
- malevich_coretools/utils.py +14 -5
- {malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/METADATA +1 -1
- {malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/RECORD +12 -12
- {malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/WHEEL +0 -0
- {malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/licenses/LICENSE +0 -0
- {malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/top_level.txt +0 -0
|
@@ -101,6 +101,7 @@ class JsonImage(BaseModel):
|
|
|
101
101
|
tag: str = ""
|
|
102
102
|
user: Optional[str] = None
|
|
103
103
|
token: Optional[str] = None
|
|
104
|
+
syncRef: bool = True
|
|
104
105
|
|
|
105
106
|
|
|
106
107
|
class UserApp(BaseModel):
|
|
@@ -139,12 +140,8 @@ class ScaleInfo(BaseModel):
|
|
|
139
140
|
|
|
140
141
|
|
|
141
142
|
class TaskComponent(BaseModel):
|
|
142
|
-
|
|
143
|
-
control: Optional[str] = None
|
|
144
|
-
extra: Optional[str] = None
|
|
145
|
-
internal: Optional[str] = None
|
|
143
|
+
main: Optional[str] = None
|
|
146
144
|
keyValue: Optional[str] = None
|
|
147
|
-
minimal: Optional[str] = None
|
|
148
145
|
objectStorage: Optional[str] = None
|
|
149
146
|
|
|
150
147
|
|
|
@@ -504,6 +501,24 @@ class OperationOrNone(BaseModel):
|
|
|
504
501
|
operationId: Optional[Alias.Id] = None
|
|
505
502
|
|
|
506
503
|
|
|
504
|
+
class AdminRunInfoReq(OperationOrNone):
|
|
505
|
+
dmId: Optional[str] = None
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
class AdminDMRegister(BaseModel):
|
|
509
|
+
id: int
|
|
510
|
+
url: Optional[str]
|
|
511
|
+
secret: Optional[str]
|
|
512
|
+
appSecret: Optional[str]
|
|
513
|
+
login: Optional[str]
|
|
514
|
+
actuaryDMId: Optional[int]
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class AdminDMUnregister(BaseModel):
|
|
518
|
+
id: str
|
|
519
|
+
actuaryDMId: Optional[int]
|
|
520
|
+
|
|
521
|
+
|
|
507
522
|
class AdminStopOperation(BaseModel):
|
|
508
523
|
operationId: Optional[Alias.Id] = None
|
|
509
524
|
withLogs: bool
|
|
@@ -1,54 +1,245 @@
|
|
|
1
|
+
from typing import Coroutine, Literal, Union, overload
|
|
2
|
+
|
|
1
3
|
import malevich_coretools.funcs.funcs as f
|
|
2
4
|
from malevich_coretools.abstract import * # noqa: F403
|
|
3
5
|
from malevich_coretools.batch import Batcher
|
|
4
6
|
from malevich_coretools.secondary import Config
|
|
5
7
|
|
|
6
8
|
|
|
9
|
+
@overload
|
|
7
10
|
def admin_get_runs(
|
|
8
11
|
*,
|
|
9
12
|
auth: Optional[AUTH] = None,
|
|
10
13
|
conn_url: Optional[str] = None,
|
|
11
14
|
batcher: Optional[Batcher] = None,
|
|
15
|
+
is_async: Literal[False] = False,
|
|
12
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]]:
|
|
13
38
|
"""return info about all runs"""
|
|
14
39
|
if batcher is None:
|
|
15
40
|
batcher = Config.BATCHER
|
|
16
41
|
if batcher is not None:
|
|
17
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)
|
|
18
45
|
return f.get_admin_runs(auth=auth, conn_url=conn_url)
|
|
19
46
|
|
|
20
47
|
|
|
48
|
+
@overload
|
|
21
49
|
def admin_get_run_info(
|
|
22
50
|
id: Alias.Id,
|
|
23
51
|
*,
|
|
52
|
+
dm_id: Optional[str] = None,
|
|
24
53
|
auth: Optional[AUTH] = None,
|
|
25
54
|
conn_url: Optional[str] = None,
|
|
26
55
|
batcher: Optional[Batcher] = None,
|
|
56
|
+
is_async: Literal[False] = False,
|
|
27
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]]:
|
|
28
83
|
"""return run info by operation `id`"""
|
|
29
84
|
if batcher is None:
|
|
30
85
|
batcher = Config.BATCHER
|
|
31
|
-
data =
|
|
86
|
+
data = AdminRunInfoReq(operationId=id, dmId=dm_id)
|
|
32
87
|
if batcher is not None:
|
|
33
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)
|
|
34
91
|
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
35
92
|
|
|
36
93
|
|
|
94
|
+
@overload
|
|
37
95
|
def admin_get_runs_info(
|
|
38
96
|
*,
|
|
97
|
+
dm_id: Optional[str] = None,
|
|
39
98
|
auth: Optional[AUTH] = None,
|
|
40
99
|
conn_url: Optional[str] = None,
|
|
41
100
|
batcher: Optional[Batcher] = None,
|
|
101
|
+
is_async: Literal[False] = False,
|
|
42
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]]:
|
|
43
126
|
"""return json: dm id -> info about its runs"""
|
|
44
127
|
if batcher is None:
|
|
45
128
|
batcher = Config.BATCHER
|
|
46
|
-
data =
|
|
129
|
+
data = AdminRunInfoReq(dmId=dm_id)
|
|
47
130
|
if batcher is not None:
|
|
48
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)
|
|
49
134
|
return f.get_admin_runs_info(data, auth=auth, conn_url=conn_url)
|
|
50
135
|
|
|
51
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
|
|
52
243
|
def admin_update_superuser(
|
|
53
244
|
login: str,
|
|
54
245
|
is_superuser: bool = True,
|
|
@@ -56,16 +247,45 @@ def admin_update_superuser(
|
|
|
56
247
|
auth: Optional[AUTH] = None,
|
|
57
248
|
conn_url: Optional[str] = None,
|
|
58
249
|
batcher: Optional[Batcher] = None,
|
|
250
|
+
is_async: Literal[False] = False,
|
|
59
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]]:
|
|
60
277
|
"""update user role by login"""
|
|
61
278
|
if batcher is None:
|
|
62
279
|
batcher = Config.BATCHER
|
|
63
280
|
data = Superuser(login=login, isSuperuser=is_superuser)
|
|
64
281
|
if batcher is not None:
|
|
65
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)
|
|
66
285
|
return f.post_admin_update_superuser(data, auth=auth, conn_url=conn_url)
|
|
67
286
|
|
|
68
287
|
|
|
288
|
+
@overload
|
|
69
289
|
def admin_delete_run(
|
|
70
290
|
id: Alias.Id,
|
|
71
291
|
withLogs: bool = False,
|
|
@@ -73,27 +293,82 @@ def admin_delete_run(
|
|
|
73
293
|
auth: Optional[AUTH] = None,
|
|
74
294
|
conn_url: Optional[str] = None,
|
|
75
295
|
batcher: Optional[Batcher] = None,
|
|
296
|
+
is_async: Literal[False] = False,
|
|
76
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]]:
|
|
77
323
|
"""delete run by operation `id`"""
|
|
78
324
|
if batcher is None:
|
|
79
325
|
batcher = Config.BATCHER
|
|
80
326
|
data = AdminStopOperation(operationId=id, withLogs=withLogs)
|
|
81
327
|
if batcher is not None:
|
|
82
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)
|
|
83
331
|
return f.delete_admin_runs(data, auth=auth, conn_url=conn_url)
|
|
84
332
|
|
|
85
333
|
|
|
334
|
+
@overload
|
|
86
335
|
def admin_delete_runs(
|
|
87
336
|
withLogs: bool = False,
|
|
88
337
|
*,
|
|
89
338
|
auth: Optional[AUTH] = None,
|
|
90
339
|
conn_url: Optional[str] = None,
|
|
91
340
|
batcher: Optional[Batcher] = None,
|
|
341
|
+
is_async: Literal[False] = False,
|
|
92
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]]:
|
|
93
366
|
"""delete all runs"""
|
|
94
367
|
if batcher is None:
|
|
95
368
|
batcher = Config.BATCHER
|
|
96
369
|
data = AdminStopOperation(withLogs=withLogs)
|
|
97
370
|
if batcher is not None:
|
|
98
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)
|
|
99
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
|
|
|
@@ -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
|
|
@@ -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)
|
malevich_coretools/utils.py
CHANGED
|
@@ -4104,6 +4104,7 @@ def create_app(
|
|
|
4104
4104
|
image_ref: Optional[str] = None,
|
|
4105
4105
|
image_auth: Optional[AUTH] = None,
|
|
4106
4106
|
image_tag: Optional[str] = None,
|
|
4107
|
+
image_sync: bool = True,
|
|
4107
4108
|
platform: str = "base",
|
|
4108
4109
|
platform_settings: Optional[str] = None,
|
|
4109
4110
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4128,6 +4129,7 @@ def create_app(
|
|
|
4128
4129
|
image_ref: Optional[str] = None,
|
|
4129
4130
|
image_auth: Optional[AUTH] = None,
|
|
4130
4131
|
image_tag: Optional[str] = None,
|
|
4132
|
+
image_sync: bool = True,
|
|
4131
4133
|
platform: str = "base",
|
|
4132
4134
|
platform_settings: Optional[str] = None,
|
|
4133
4135
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4151,6 +4153,7 @@ def create_app(
|
|
|
4151
4153
|
image_ref: Optional[str] = None,
|
|
4152
4154
|
image_auth: Optional[AUTH] = None,
|
|
4153
4155
|
image_tag: Optional[str] = None,
|
|
4156
|
+
image_sync: bool = True,
|
|
4154
4157
|
platform: str = "base",
|
|
4155
4158
|
platform_settings: Optional[str] = None,
|
|
4156
4159
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4176,7 +4179,7 @@ def create_app(
|
|
|
4176
4179
|
image_token = image_auth[1] if image_auth is not None else Config.TOKEN if use_system_auth else None
|
|
4177
4180
|
if Config.WITH_WARNINGS and (image_user is None or image_token is None):
|
|
4178
4181
|
Config.logger.warning("image_auth not set")
|
|
4179
|
-
json_image = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token)
|
|
4182
|
+
json_image = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token, syncRef=image_sync)
|
|
4180
4183
|
if extra_collections_from is not None:
|
|
4181
4184
|
for k, v in extra_collections_from.items():
|
|
4182
4185
|
if isinstance(v, str):
|
|
@@ -4210,6 +4213,7 @@ def update_app(
|
|
|
4210
4213
|
image_ref: Optional[str] = None,
|
|
4211
4214
|
image_auth: Optional[AUTH] = None,
|
|
4212
4215
|
image_tag: Optional[str] = None,
|
|
4216
|
+
image_sync: bool = True,
|
|
4213
4217
|
platform: str = "base",
|
|
4214
4218
|
platform_settings: Optional[str] = None,
|
|
4215
4219
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4235,6 +4239,7 @@ def update_app(
|
|
|
4235
4239
|
image_ref: Optional[str] = None,
|
|
4236
4240
|
image_auth: Optional[AUTH] = None,
|
|
4237
4241
|
image_tag: Optional[str] = None,
|
|
4242
|
+
image_sync: bool = True,
|
|
4238
4243
|
platform: str = "base",
|
|
4239
4244
|
platform_settings: Optional[str] = None,
|
|
4240
4245
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4259,6 +4264,7 @@ def update_app(
|
|
|
4259
4264
|
image_ref: Optional[str] = None,
|
|
4260
4265
|
image_auth: Optional[AUTH] = None,
|
|
4261
4266
|
image_tag: Optional[str] = None,
|
|
4267
|
+
image_sync: bool = True,
|
|
4262
4268
|
platform: str = "base",
|
|
4263
4269
|
platform_settings: Optional[str] = None,
|
|
4264
4270
|
extra_collections_from: Optional[Dict[str, Union[List[str], str]]] = None,
|
|
@@ -4283,7 +4289,7 @@ def update_app(
|
|
|
4283
4289
|
image_token = image_auth[1] if image_auth is not None else Config.TOKEN if use_system_auth else None
|
|
4284
4290
|
if Config.WITH_WARNINGS and (image_user is None or image_token is None):
|
|
4285
4291
|
Config.logger.warning("image_auth not set")
|
|
4286
|
-
json_image = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token)
|
|
4292
|
+
json_image = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token, syncRef=image_sync)
|
|
4287
4293
|
if extra_collections_from is not None:
|
|
4288
4294
|
for k, v in extra_collections_from.items():
|
|
4289
4295
|
if isinstance(v, str):
|
|
@@ -6672,6 +6678,7 @@ def get_image_info(
|
|
|
6672
6678
|
image_ref: str,
|
|
6673
6679
|
image_auth: Optional[AUTH] = None,
|
|
6674
6680
|
image_tag: Optional[str] = None,
|
|
6681
|
+
image_sync: bool = True,
|
|
6675
6682
|
parse: bool = False,
|
|
6676
6683
|
*,
|
|
6677
6684
|
use_system_auth: bool = False,
|
|
@@ -6688,6 +6695,7 @@ def get_image_info(
|
|
|
6688
6695
|
image_ref: str,
|
|
6689
6696
|
image_auth: Optional[AUTH] = None,
|
|
6690
6697
|
image_tag: Optional[str] = None,
|
|
6698
|
+
image_sync: bool = True,
|
|
6691
6699
|
parse: bool = False,
|
|
6692
6700
|
*,
|
|
6693
6701
|
use_system_auth: bool = False,
|
|
@@ -6703,6 +6711,7 @@ def get_image_info(
|
|
|
6703
6711
|
image_ref: str,
|
|
6704
6712
|
image_auth: Optional[AUTH] = None,
|
|
6705
6713
|
image_tag: Optional[str] = None,
|
|
6714
|
+
image_sync: bool = True,
|
|
6706
6715
|
parse: bool = False,
|
|
6707
6716
|
*,
|
|
6708
6717
|
use_system_auth: bool = False,
|
|
@@ -6718,7 +6727,7 @@ def get_image_info(
|
|
|
6718
6727
|
image_token = image_auth[1] if image_auth is not None else Config.TOKEN if use_system_auth else None
|
|
6719
6728
|
if Config.WITH_WARNINGS and (image_user is None or image_token is None):
|
|
6720
6729
|
Config.logger.warning("image_auth not set")
|
|
6721
|
-
data = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token)
|
|
6730
|
+
data = JsonImage(ref=image_ref, tag=image_tag or "", user=image_user, token=image_token, syncRef=image_sync)
|
|
6722
6731
|
if batcher is not None:
|
|
6723
6732
|
return batcher.add("imageInfo", data=data, result_model=AppFunctionsInfo if parse else None)
|
|
6724
6733
|
if is_async:
|
|
@@ -6728,7 +6737,7 @@ def get_image_info(
|
|
|
6728
6737
|
|
|
6729
6738
|
@overload
|
|
6730
6739
|
def get_task_schedules(
|
|
6731
|
-
operation_id: str,
|
|
6740
|
+
operation_id: Optional[str] = None,
|
|
6732
6741
|
with_show: bool = True,
|
|
6733
6742
|
*,
|
|
6734
6743
|
auth: Optional[AUTH] = None,
|
|
@@ -6741,7 +6750,7 @@ def get_task_schedules(
|
|
|
6741
6750
|
|
|
6742
6751
|
@overload
|
|
6743
6752
|
def get_task_schedules(
|
|
6744
|
-
operation_id: str,
|
|
6753
|
+
operation_id: Optional[str] = None,
|
|
6745
6754
|
with_show: bool = True,
|
|
6746
6755
|
*,
|
|
6747
6756
|
auth: Optional[AUTH] = None,
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
malevich_coretools/__init__.py,sha256=DJtPESxkCZD2SbTZTrR_x0TKDQ4MJpmBqGw5YpKYidM,134
|
|
2
|
-
malevich_coretools/utils.py,sha256=
|
|
2
|
+
malevich_coretools/utils.py,sha256=nc88BxU6gbq5ANiYt3XgRp6YzMFJpFrOWnCtdWnYUBY,276102
|
|
3
3
|
malevich_coretools/abstract/__init__.py,sha256=6vQ08c8HPYyT_pPkKlc-EwQKE8xG3HTEo2p_GiI5rik,142
|
|
4
|
-
malevich_coretools/abstract/abstract.py,sha256=
|
|
4
|
+
malevich_coretools/abstract/abstract.py,sha256=QJMMzW98agH8pYWNjLPvshXC5jK3zAEyqJ0oK4ZfZ34,17695
|
|
5
5
|
malevich_coretools/abstract/operations.py,sha256=cWlo2xzW-rzkTInzpDjBYeL68KfLYqSpZJRzCQ4OzjA,3070
|
|
6
6
|
malevich_coretools/abstract/pipeline.py,sha256=HwhYp5G9yaZYaeDypChfpNd2W-kmJQfM9I54uek0B9k,7914
|
|
7
7
|
malevich_coretools/abstract/statuses.py,sha256=9ISSw_evsylBshLXoU44TCoFOrZm4bXIxyAFFDqdUWc,333
|
|
8
8
|
malevich_coretools/admin/__init__.py,sha256=zdIcHs3T_NZ8HYWts-O7OpBEWHIu779QDZMGF5HRCLg,35
|
|
9
|
-
malevich_coretools/admin/utils.py,sha256=
|
|
9
|
+
malevich_coretools/admin/utils.py,sha256=mGu-zge5FHW2Z2TDhE3YOhOlw2x8NA2CV_XKsY-g4nE,10378
|
|
10
10
|
malevich_coretools/batch/__init__.py,sha256=taxyZl8YOZd2EBd3leN6slzMkejUtjQ64Na31TcT3-I,165
|
|
11
11
|
malevich_coretools/batch/utils.py,sha256=FRmCYU-zr-RjgT1Mo3CUNcB2mW1t_gKCJazcMx6aIW4,7719
|
|
12
12
|
malevich_coretools/funcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
malevich_coretools/funcs/checks.py,sha256=Q5pRtRevQrGv_-SMbn2GgYnulhclDLBXdRtbw2QOYKU,223
|
|
14
|
-
malevich_coretools/funcs/funcs.py,sha256=
|
|
15
|
-
malevich_coretools/funcs/helpers.py,sha256=
|
|
14
|
+
malevich_coretools/funcs/funcs.py,sha256=gG-vAXigztV15451X9Glx4XIn2wo19JHBWllkKyocVk,85942
|
|
15
|
+
malevich_coretools/funcs/helpers.py,sha256=nYbUdtAuSSa9VMr7Oy2y0yvEMLv9EI1jzGq6eynuNLU,13573
|
|
16
16
|
malevich_coretools/secondary/__init__.py,sha256=048HqvG36_1WdDVZK_RuECmaf14Iq2fviUysG1inlaE,78
|
|
17
17
|
malevich_coretools/secondary/config.py,sha256=hRlSJuPQnhKyt1wmOAJX_XmcliaO0fPGbW94AE_Mazs,463
|
|
18
|
-
malevich_coretools/secondary/const.py,sha256=
|
|
19
|
-
malevich_coretools/secondary/helpers.py,sha256=
|
|
18
|
+
malevich_coretools/secondary/const.py,sha256=1x-49VxzVdtk064xn92gQnqlEfMuYAvWcz-vp3D6fO4,15369
|
|
19
|
+
malevich_coretools/secondary/helpers.py,sha256=V5xNv-Rt4SNkthTcNnMtYPjiYfoHmwUR8ApU8qFmzT0,7986
|
|
20
20
|
malevich_coretools/secondary/kafka_utils.py,sha256=SIUnBFyfwsquN6MAUrEkKCw-1l7979Znl7OTQSX2UKo,989
|
|
21
21
|
malevich_coretools/tools/__init__.py,sha256=jDxlCa5Dr6Y43qlI7JwsRAlBkKmFeTHTEnjNUvu-0iw,46
|
|
22
22
|
malevich_coretools/tools/abstract.py,sha256=B1RW1FeNHrQ6r1k-cQZ4k4noCRXkIGt-JUwVoXEDkAg,4466
|
|
23
23
|
malevich_coretools/tools/vast.py,sha256=63tvy70qQV9vnK0eWytlgjBGSnfA7l3kSIDgACBbMMs,12893
|
|
24
|
-
malevich_coretools-0.3.
|
|
25
|
-
malevich_coretools-0.3.
|
|
26
|
-
malevich_coretools-0.3.
|
|
27
|
-
malevich_coretools-0.3.
|
|
28
|
-
malevich_coretools-0.3.
|
|
24
|
+
malevich_coretools-0.3.63.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
25
|
+
malevich_coretools-0.3.63.dist-info/METADATA,sha256=Rt7pUx-lQIsB7zjU8FuDZQcW6shGqijbdtaWPWIo-Co,347
|
|
26
|
+
malevich_coretools-0.3.63.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
malevich_coretools-0.3.63.dist-info/top_level.txt,sha256=wDX3s1Tso0otBPNrFRfXqyNpm48W4Bp5v6JfbITO2Z8,19
|
|
28
|
+
malevich_coretools-0.3.63.dist-info/RECORD,,
|
|
File without changes
|
{malevich_coretools-0.3.61.dist-info → malevich_coretools-0.3.63.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|