diracx-client 0.0.1a19__py3-none-any.whl → 0.0.1a21__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.
- diracx/client/generated/__init__.py +11 -5
- diracx/client/generated/_client.py +1 -1
- diracx/client/generated/_configuration.py +1 -1
- diracx/client/generated/_serialization.py +13 -14
- diracx/client/generated/_vendor.py +1 -1
- diracx/client/generated/aio/__init__.py +11 -5
- diracx/client/generated/aio/_client.py +1 -1
- diracx/client/generated/aio/_configuration.py +1 -1
- diracx/client/generated/aio/_vendor.py +1 -1
- diracx/client/generated/aio/operations/__init__.py +13 -7
- diracx/client/generated/aio/operations/_operations.py +502 -1385
- diracx/client/generated/models/__init__.py +51 -52
- diracx/client/generated/models/_enums.py +1 -33
- diracx/client/generated/models/_models.py +42 -122
- diracx/client/generated/operations/__init__.py +13 -7
- diracx/client/generated/operations/_operations.py +576 -1739
- diracx/client/patches/aio/utils.py +34 -34
- diracx/client/patches/utils.py +156 -75
- {diracx_client-0.0.1a19.dist-info → diracx_client-0.0.1a21.dist-info}/METADATA +1 -2
- diracx_client-0.0.1a21.dist-info/RECORD +36 -0
- {diracx_client-0.0.1a19.dist-info → diracx_client-0.0.1a21.dist-info}/WHEEL +1 -1
- diracx_client-0.0.1a19.dist-info/RECORD +0 -36
- {diracx_client-0.0.1a19.dist-info → diracx_client-0.0.1a21.dist-info}/entry_points.txt +0 -0
- {diracx_client-0.0.1a19.dist-info → diracx_client-0.0.1a21.dist-info}/top_level.txt +0 -0
@@ -1,23 +1,12 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
4
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
from io import IOBase
|
8
8
|
import sys
|
9
|
-
from typing import
|
10
|
-
Any,
|
11
|
-
Callable,
|
12
|
-
Dict,
|
13
|
-
IO,
|
14
|
-
List,
|
15
|
-
Optional,
|
16
|
-
Type,
|
17
|
-
TypeVar,
|
18
|
-
Union,
|
19
|
-
overload,
|
20
|
-
)
|
9
|
+
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload
|
21
10
|
|
22
11
|
from azure.core import MatchConditions
|
23
12
|
from azure.core.exceptions import (
|
@@ -47,28 +36,15 @@ from ...operations._operations import (
|
|
47
36
|
build_auth_userinfo_request,
|
48
37
|
build_config_serve_config_request,
|
49
38
|
build_jobs_assign_sandbox_to_job_request,
|
50
|
-
build_jobs_delete_bulk_jobs_request,
|
51
|
-
build_jobs_delete_single_job_request,
|
52
39
|
build_jobs_get_job_sandbox_request,
|
53
40
|
build_jobs_get_job_sandboxes_request,
|
54
|
-
build_jobs_get_job_status_bulk_request,
|
55
|
-
build_jobs_get_job_status_history_bulk_request,
|
56
41
|
build_jobs_get_sandbox_file_request,
|
57
|
-
build_jobs_get_single_job_request,
|
58
|
-
build_jobs_get_single_job_status_history_request,
|
59
|
-
build_jobs_get_single_job_status_request,
|
60
42
|
build_jobs_initiate_sandbox_upload_request,
|
61
|
-
build_jobs_kill_bulk_jobs_request,
|
62
|
-
build_jobs_kill_single_job_request,
|
63
43
|
build_jobs_remove_bulk_jobs_request,
|
64
|
-
build_jobs_remove_single_job_request,
|
65
44
|
build_jobs_reschedule_bulk_jobs_request,
|
66
|
-
build_jobs_reschedule_single_job_request,
|
67
45
|
build_jobs_search_request,
|
68
|
-
|
69
|
-
|
70
|
-
build_jobs_set_single_job_status_request,
|
71
|
-
build_jobs_submit_bulk_jobs_request,
|
46
|
+
build_jobs_set_job_statuses_request,
|
47
|
+
build_jobs_submit_bulk_jdl_jobs_request,
|
72
48
|
build_jobs_summary_request,
|
73
49
|
build_jobs_unassign_bulk_jobs_sandboxes_request,
|
74
50
|
build_jobs_unassign_job_sandboxes_request,
|
@@ -80,7 +56,7 @@ from .._vendor import raise_if_not_implemented
|
|
80
56
|
if sys.version_info >= (3, 9):
|
81
57
|
from collections.abc import MutableMapping
|
82
58
|
else:
|
83
|
-
from typing import MutableMapping # type: ignore
|
59
|
+
from typing import MutableMapping # type: ignore
|
84
60
|
T = TypeVar("T")
|
85
61
|
ClsType = Optional[
|
86
62
|
Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]
|
@@ -119,14 +95,12 @@ class WellKnownOperations:
|
|
119
95
|
:rtype: any
|
120
96
|
:raises ~azure.core.exceptions.HttpResponseError:
|
121
97
|
"""
|
122
|
-
error_map: MutableMapping
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
}
|
129
|
-
)
|
98
|
+
error_map: MutableMapping = {
|
99
|
+
401: ClientAuthenticationError,
|
100
|
+
404: ResourceNotFoundError,
|
101
|
+
409: ResourceExistsError,
|
102
|
+
304: ResourceNotModifiedError,
|
103
|
+
}
|
130
104
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
131
105
|
|
132
106
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -172,14 +146,12 @@ class WellKnownOperations:
|
|
172
146
|
:rtype: ~generated.models.Metadata
|
173
147
|
:raises ~azure.core.exceptions.HttpResponseError:
|
174
148
|
"""
|
175
|
-
error_map: MutableMapping
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
}
|
182
|
-
)
|
149
|
+
error_map: MutableMapping = {
|
150
|
+
401: ClientAuthenticationError,
|
151
|
+
404: ResourceNotFoundError,
|
152
|
+
409: ResourceExistsError,
|
153
|
+
304: ResourceNotModifiedError,
|
154
|
+
}
|
183
155
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
184
156
|
|
185
157
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -251,9 +223,25 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
251
223
|
"""Initiate Device Flow.
|
252
224
|
|
253
225
|
Initiate the device flow against DIRAC authorization Server.
|
254
|
-
|
255
|
-
|
256
|
-
|
226
|
+
|
227
|
+
Scope details:
|
228
|
+
|
229
|
+
|
230
|
+
*
|
231
|
+
If only VO is provided: Uses the default group and its properties for the VO.
|
232
|
+
|
233
|
+
*
|
234
|
+
If VO and group are provided: Uses the specified group and its properties for the VO.
|
235
|
+
|
236
|
+
*
|
237
|
+
If VO and properties are provided: Uses the default group and combines its properties with
|
238
|
+
the
|
239
|
+
provided properties.
|
240
|
+
|
241
|
+
*
|
242
|
+
If VO, group, and properties are provided: Uses the specified group and combines its
|
243
|
+
properties with the
|
244
|
+
provided properties.
|
257
245
|
|
258
246
|
Offers the user to go with the browser to
|
259
247
|
``auth/<vo>/device?user_code=XYZ``.
|
@@ -266,14 +254,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
266
254
|
:rtype: ~generated.models.InitiateDeviceFlowResponse
|
267
255
|
:raises ~azure.core.exceptions.HttpResponseError:
|
268
256
|
"""
|
269
|
-
error_map: MutableMapping
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
}
|
276
|
-
)
|
257
|
+
error_map: MutableMapping = {
|
258
|
+
401: ClientAuthenticationError,
|
259
|
+
404: ResourceNotFoundError,
|
260
|
+
409: ResourceExistsError,
|
261
|
+
304: ResourceNotModifiedError,
|
262
|
+
}
|
277
263
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
278
264
|
|
279
265
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -332,14 +318,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
332
318
|
:rtype: any
|
333
319
|
:raises ~azure.core.exceptions.HttpResponseError:
|
334
320
|
"""
|
335
|
-
error_map: MutableMapping
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
}
|
342
|
-
)
|
321
|
+
error_map: MutableMapping = {
|
322
|
+
401: ClientAuthenticationError,
|
323
|
+
404: ResourceNotFoundError,
|
324
|
+
409: ResourceExistsError,
|
325
|
+
304: ResourceNotModifiedError,
|
326
|
+
}
|
343
327
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
344
328
|
|
345
329
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -394,14 +378,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
394
378
|
:rtype: any
|
395
379
|
:raises ~azure.core.exceptions.HttpResponseError:
|
396
380
|
"""
|
397
|
-
error_map: MutableMapping
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
}
|
404
|
-
)
|
381
|
+
error_map: MutableMapping = {
|
382
|
+
401: ClientAuthenticationError,
|
383
|
+
404: ResourceNotFoundError,
|
384
|
+
409: ResourceExistsError,
|
385
|
+
304: ResourceNotModifiedError,
|
386
|
+
}
|
405
387
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
406
388
|
|
407
389
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -449,14 +431,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
449
431
|
:rtype: any
|
450
432
|
:raises ~azure.core.exceptions.HttpResponseError:
|
451
433
|
"""
|
452
|
-
error_map: MutableMapping
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
}
|
459
|
-
)
|
434
|
+
error_map: MutableMapping = {
|
435
|
+
401: ClientAuthenticationError,
|
436
|
+
404: ResourceNotFoundError,
|
437
|
+
409: ResourceExistsError,
|
438
|
+
304: ResourceNotModifiedError,
|
439
|
+
}
|
460
440
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
461
441
|
|
462
442
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -503,14 +483,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
503
483
|
:rtype: list[any]
|
504
484
|
:raises ~azure.core.exceptions.HttpResponseError:
|
505
485
|
"""
|
506
|
-
error_map: MutableMapping
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
}
|
513
|
-
)
|
486
|
+
error_map: MutableMapping = {
|
487
|
+
401: ClientAuthenticationError,
|
488
|
+
404: ResourceNotFoundError,
|
489
|
+
409: ResourceExistsError,
|
490
|
+
304: ResourceNotModifiedError,
|
491
|
+
}
|
514
492
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
515
493
|
|
516
494
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -559,14 +537,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
559
537
|
:rtype: str
|
560
538
|
:raises ~azure.core.exceptions.HttpResponseError:
|
561
539
|
"""
|
562
|
-
error_map: MutableMapping
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
}
|
569
|
-
)
|
540
|
+
error_map: MutableMapping = {
|
541
|
+
401: ClientAuthenticationError,
|
542
|
+
404: ResourceNotFoundError,
|
543
|
+
409: ResourceExistsError,
|
544
|
+
304: ResourceNotModifiedError,
|
545
|
+
}
|
570
546
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
571
547
|
|
572
548
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -613,14 +589,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
613
589
|
:rtype: ~generated.models.UserInfoResponse
|
614
590
|
:raises ~azure.core.exceptions.HttpResponseError:
|
615
591
|
"""
|
616
|
-
error_map: MutableMapping
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
}
|
623
|
-
)
|
592
|
+
error_map: MutableMapping = {
|
593
|
+
401: ClientAuthenticationError,
|
594
|
+
404: ResourceNotFoundError,
|
595
|
+
409: ResourceExistsError,
|
596
|
+
304: ResourceNotModifiedError,
|
597
|
+
}
|
624
598
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
625
599
|
|
626
600
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -662,9 +636,9 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
662
636
|
async def authorization_flow(
|
663
637
|
self,
|
664
638
|
*,
|
665
|
-
response_type:
|
639
|
+
response_type: str,
|
666
640
|
code_challenge: str,
|
667
|
-
code_challenge_method:
|
641
|
+
code_challenge_method: str,
|
668
642
|
client_id: str,
|
669
643
|
redirect_uri: str,
|
670
644
|
scope: str,
|
@@ -677,16 +651,35 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
677
651
|
It will redirect to the actual OpenID server (IAM, CheckIn) to
|
678
652
|
perform a authorization code flow.
|
679
653
|
|
654
|
+
Scope details:
|
655
|
+
|
656
|
+
|
657
|
+
*
|
658
|
+
If only VO is provided: Uses the default group and its properties for the VO.
|
659
|
+
|
660
|
+
*
|
661
|
+
If VO and group are provided: Uses the specified group and its properties for the VO.
|
662
|
+
|
663
|
+
*
|
664
|
+
If VO and properties are provided: Uses the default group and combines its properties with
|
665
|
+
the
|
666
|
+
provided properties.
|
667
|
+
|
668
|
+
*
|
669
|
+
If VO, group, and properties are provided: Uses the specified group and combines its
|
670
|
+
properties with the
|
671
|
+
provided properties.
|
672
|
+
|
680
673
|
We set the user details obtained from the user authorize flow in a cookie
|
681
674
|
to be able to map the authorization flow with the corresponding
|
682
675
|
user authorize flow.
|
683
676
|
|
684
|
-
:keyword response_type:
|
685
|
-
:paramtype response_type: str
|
677
|
+
:keyword response_type: Required.
|
678
|
+
:paramtype response_type: str
|
686
679
|
:keyword code_challenge: Required.
|
687
680
|
:paramtype code_challenge: str
|
688
|
-
:keyword code_challenge_method:
|
689
|
-
:paramtype code_challenge_method: str
|
681
|
+
:keyword code_challenge_method: Required.
|
682
|
+
:paramtype code_challenge_method: str
|
690
683
|
:keyword client_id: Required.
|
691
684
|
:paramtype client_id: str
|
692
685
|
:keyword redirect_uri: Required.
|
@@ -699,14 +692,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
699
692
|
:rtype: any
|
700
693
|
:raises ~azure.core.exceptions.HttpResponseError:
|
701
694
|
"""
|
702
|
-
error_map: MutableMapping
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
}
|
709
|
-
)
|
695
|
+
error_map: MutableMapping = {
|
696
|
+
401: ClientAuthenticationError,
|
697
|
+
404: ResourceNotFoundError,
|
698
|
+
409: ResourceExistsError,
|
699
|
+
304: ResourceNotModifiedError,
|
700
|
+
}
|
710
701
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
711
702
|
|
712
703
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -771,14 +762,12 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
771
762
|
:rtype: any
|
772
763
|
:raises ~azure.core.exceptions.HttpResponseError:
|
773
764
|
"""
|
774
|
-
error_map: MutableMapping
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
}
|
781
|
-
)
|
765
|
+
error_map: MutableMapping = {
|
766
|
+
401: ClientAuthenticationError,
|
767
|
+
404: ResourceNotFoundError,
|
768
|
+
409: ResourceExistsError,
|
769
|
+
304: ResourceNotModifiedError,
|
770
|
+
}
|
782
771
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
783
772
|
|
784
773
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -867,14 +856,12 @@ class ConfigOperations:
|
|
867
856
|
:rtype: any
|
868
857
|
:raises ~azure.core.exceptions.HttpResponseError:
|
869
858
|
"""
|
870
|
-
error_map: MutableMapping
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
}
|
877
|
-
)
|
859
|
+
error_map: MutableMapping = {
|
860
|
+
401: ClientAuthenticationError,
|
861
|
+
404: ResourceNotFoundError,
|
862
|
+
409: ResourceExistsError,
|
863
|
+
304: ResourceNotModifiedError,
|
864
|
+
}
|
878
865
|
if match_condition == MatchConditions.IfNotModified:
|
879
866
|
error_map[412] = ResourceModifiedError
|
880
867
|
elif match_condition == MatchConditions.IfPresent:
|
@@ -920,7 +907,7 @@ class ConfigOperations:
|
|
920
907
|
return deserialized # type: ignore
|
921
908
|
|
922
909
|
|
923
|
-
class JobsOperations:
|
910
|
+
class JobsOperations:
|
924
911
|
"""
|
925
912
|
.. warning::
|
926
913
|
**DO NOT** instantiate this class directly.
|
@@ -1013,14 +1000,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1013
1000
|
:rtype: ~generated.models.SandboxUploadResponse
|
1014
1001
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1015
1002
|
"""
|
1016
|
-
error_map: MutableMapping
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
}
|
1023
|
-
)
|
1003
|
+
error_map: MutableMapping = {
|
1004
|
+
401: ClientAuthenticationError,
|
1005
|
+
404: ResourceNotFoundError,
|
1006
|
+
409: ResourceExistsError,
|
1007
|
+
304: ResourceNotModifiedError,
|
1008
|
+
}
|
1024
1009
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1025
1010
|
|
1026
1011
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -1092,14 +1077,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1092
1077
|
:rtype: ~generated.models.SandboxDownloadResponse
|
1093
1078
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1094
1079
|
"""
|
1095
|
-
error_map: MutableMapping
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
}
|
1102
|
-
)
|
1080
|
+
error_map: MutableMapping = {
|
1081
|
+
401: ClientAuthenticationError,
|
1082
|
+
404: ResourceNotFoundError,
|
1083
|
+
409: ResourceExistsError,
|
1084
|
+
304: ResourceNotModifiedError,
|
1085
|
+
}
|
1103
1086
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1104
1087
|
|
1105
1088
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1152,14 +1135,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1152
1135
|
:rtype: any
|
1153
1136
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1154
1137
|
"""
|
1155
|
-
error_map: MutableMapping
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
}
|
1162
|
-
)
|
1138
|
+
error_map: MutableMapping = {
|
1139
|
+
401: ClientAuthenticationError,
|
1140
|
+
404: ResourceNotFoundError,
|
1141
|
+
409: ResourceExistsError,
|
1142
|
+
304: ResourceNotModifiedError,
|
1143
|
+
}
|
1163
1144
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1164
1145
|
|
1165
1146
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1210,14 +1191,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1210
1191
|
:rtype: dict[str, list[any]]
|
1211
1192
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1212
1193
|
"""
|
1213
|
-
error_map: MutableMapping
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
}
|
1220
|
-
)
|
1194
|
+
error_map: MutableMapping = {
|
1195
|
+
401: ClientAuthenticationError,
|
1196
|
+
404: ResourceNotFoundError,
|
1197
|
+
409: ResourceExistsError,
|
1198
|
+
304: ResourceNotModifiedError,
|
1199
|
+
}
|
1221
1200
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1222
1201
|
|
1223
1202
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1266,14 +1245,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1266
1245
|
:rtype: any
|
1267
1246
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1268
1247
|
"""
|
1269
|
-
error_map: MutableMapping
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
}
|
1276
|
-
)
|
1248
|
+
error_map: MutableMapping = {
|
1249
|
+
401: ClientAuthenticationError,
|
1250
|
+
404: ResourceNotFoundError,
|
1251
|
+
409: ResourceExistsError,
|
1252
|
+
304: ResourceNotModifiedError,
|
1253
|
+
}
|
1277
1254
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1278
1255
|
|
1279
1256
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1326,14 +1303,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1326
1303
|
:rtype: list[any]
|
1327
1304
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1328
1305
|
"""
|
1329
|
-
error_map: MutableMapping
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
}
|
1336
|
-
)
|
1306
|
+
error_map: MutableMapping = {
|
1307
|
+
401: ClientAuthenticationError,
|
1308
|
+
404: ResourceNotFoundError,
|
1309
|
+
409: ResourceExistsError,
|
1310
|
+
304: ResourceNotModifiedError,
|
1311
|
+
}
|
1337
1312
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1338
1313
|
|
1339
1314
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1385,14 +1360,12 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1385
1360
|
:rtype: any
|
1386
1361
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1387
1362
|
"""
|
1388
|
-
error_map: MutableMapping
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
}
|
1395
|
-
)
|
1363
|
+
error_map: MutableMapping = {
|
1364
|
+
401: ClientAuthenticationError,
|
1365
|
+
404: ResourceNotFoundError,
|
1366
|
+
409: ResourceExistsError,
|
1367
|
+
304: ResourceNotModifiedError,
|
1368
|
+
}
|
1396
1369
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1397
1370
|
|
1398
1371
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -1436,64 +1409,141 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1436
1409
|
|
1437
1410
|
return deserialized # type: ignore
|
1438
1411
|
|
1412
|
+
@distributed_trace_async
|
1413
|
+
async def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
1414
|
+
"""Remove Bulk Jobs.
|
1415
|
+
|
1416
|
+
Fully remove a list of jobs from the WMS databases.
|
1417
|
+
|
1418
|
+
WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
|
1419
|
+
and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
|
1420
|
+
be removed, and a status change to Deleted (PATCH /jobs/status) should be used instead for any
|
1421
|
+
other purpose.
|
1422
|
+
|
1423
|
+
:keyword job_ids: Required.
|
1424
|
+
:paramtype job_ids: list[int]
|
1425
|
+
:return: any
|
1426
|
+
:rtype: any
|
1427
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1428
|
+
"""
|
1429
|
+
error_map: MutableMapping = {
|
1430
|
+
401: ClientAuthenticationError,
|
1431
|
+
404: ResourceNotFoundError,
|
1432
|
+
409: ResourceExistsError,
|
1433
|
+
304: ResourceNotModifiedError,
|
1434
|
+
}
|
1435
|
+
error_map.update(kwargs.pop("error_map", {}) or {})
|
1436
|
+
|
1437
|
+
_headers = kwargs.pop("headers", {}) or {}
|
1438
|
+
_params = kwargs.pop("params", {}) or {}
|
1439
|
+
|
1440
|
+
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1441
|
+
|
1442
|
+
_request = build_jobs_remove_bulk_jobs_request(
|
1443
|
+
job_ids=job_ids,
|
1444
|
+
headers=_headers,
|
1445
|
+
params=_params,
|
1446
|
+
)
|
1447
|
+
_request.url = self._client.format_url(_request.url)
|
1448
|
+
|
1449
|
+
_stream = False
|
1450
|
+
pipeline_response: PipelineResponse = (
|
1451
|
+
await self._client._pipeline.run( # pylint: disable=protected-access
|
1452
|
+
_request, stream=_stream, **kwargs
|
1453
|
+
)
|
1454
|
+
)
|
1455
|
+
|
1456
|
+
response = pipeline_response.http_response
|
1457
|
+
|
1458
|
+
if response.status_code not in [200]:
|
1459
|
+
map_error(
|
1460
|
+
status_code=response.status_code, response=response, error_map=error_map
|
1461
|
+
)
|
1462
|
+
raise HttpResponseError(response=response)
|
1463
|
+
|
1464
|
+
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1465
|
+
|
1466
|
+
if cls:
|
1467
|
+
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1468
|
+
|
1469
|
+
return deserialized # type: ignore
|
1470
|
+
|
1439
1471
|
@overload
|
1440
|
-
async def
|
1441
|
-
self,
|
1442
|
-
|
1443
|
-
|
1472
|
+
async def set_job_statuses(
|
1473
|
+
self,
|
1474
|
+
body: Dict[str, Dict[str, _models.JobStatusUpdate]],
|
1475
|
+
*,
|
1476
|
+
force: bool = False,
|
1477
|
+
content_type: str = "application/json",
|
1478
|
+
**kwargs: Any,
|
1479
|
+
) -> _models.SetJobStatusReturn:
|
1480
|
+
"""Set Job Statuses.
|
1444
1481
|
|
1445
|
-
|
1482
|
+
Set Job Statuses.
|
1446
1483
|
|
1447
1484
|
:param body: Required.
|
1448
|
-
:type body:
|
1485
|
+
:type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
|
1486
|
+
:keyword force: Default value is False.
|
1487
|
+
:paramtype force: bool
|
1449
1488
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1450
1489
|
Default value is "application/json".
|
1451
1490
|
:paramtype content_type: str
|
1452
|
-
:return:
|
1453
|
-
:rtype:
|
1491
|
+
:return: SetJobStatusReturn
|
1492
|
+
:rtype: ~generated.models.SetJobStatusReturn
|
1454
1493
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1455
1494
|
"""
|
1456
1495
|
|
1457
1496
|
@overload
|
1458
|
-
async def
|
1459
|
-
self,
|
1460
|
-
|
1461
|
-
|
1497
|
+
async def set_job_statuses(
|
1498
|
+
self,
|
1499
|
+
body: IO[bytes],
|
1500
|
+
*,
|
1501
|
+
force: bool = False,
|
1502
|
+
content_type: str = "application/json",
|
1503
|
+
**kwargs: Any,
|
1504
|
+
) -> _models.SetJobStatusReturn:
|
1505
|
+
"""Set Job Statuses.
|
1462
1506
|
|
1463
|
-
|
1507
|
+
Set Job Statuses.
|
1464
1508
|
|
1465
1509
|
:param body: Required.
|
1466
1510
|
:type body: IO[bytes]
|
1511
|
+
:keyword force: Default value is False.
|
1512
|
+
:paramtype force: bool
|
1467
1513
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1468
1514
|
Default value is "application/json".
|
1469
1515
|
:paramtype content_type: str
|
1470
|
-
:return:
|
1471
|
-
:rtype:
|
1516
|
+
:return: SetJobStatusReturn
|
1517
|
+
:rtype: ~generated.models.SetJobStatusReturn
|
1472
1518
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1473
1519
|
"""
|
1474
1520
|
|
1475
1521
|
@distributed_trace_async
|
1476
|
-
async def
|
1477
|
-
self,
|
1478
|
-
|
1479
|
-
|
1522
|
+
async def set_job_statuses(
|
1523
|
+
self,
|
1524
|
+
body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
|
1525
|
+
*,
|
1526
|
+
force: bool = False,
|
1527
|
+
**kwargs: Any,
|
1528
|
+
) -> _models.SetJobStatusReturn:
|
1529
|
+
"""Set Job Statuses.
|
1480
1530
|
|
1481
|
-
|
1531
|
+
Set Job Statuses.
|
1482
1532
|
|
1483
|
-
:param body: Is either a
|
1484
|
-
:type body:
|
1485
|
-
:
|
1486
|
-
:
|
1533
|
+
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
|
1534
|
+
:type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
|
1535
|
+
:keyword force: Default value is False.
|
1536
|
+
:paramtype force: bool
|
1537
|
+
:return: SetJobStatusReturn
|
1538
|
+
:rtype: ~generated.models.SetJobStatusReturn
|
1487
1539
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1488
1540
|
"""
|
1489
|
-
error_map: MutableMapping
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
}
|
1496
|
-
)
|
1541
|
+
error_map: MutableMapping = {
|
1542
|
+
401: ClientAuthenticationError,
|
1543
|
+
404: ResourceNotFoundError,
|
1544
|
+
409: ResourceExistsError,
|
1545
|
+
304: ResourceNotModifiedError,
|
1546
|
+
}
|
1497
1547
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1498
1548
|
|
1499
1549
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -1502,7 +1552,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1502
1552
|
content_type: Optional[str] = kwargs.pop(
|
1503
1553
|
"content_type", _headers.pop("Content-Type", None)
|
1504
1554
|
)
|
1505
|
-
cls: ClsType[
|
1555
|
+
cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None)
|
1506
1556
|
|
1507
1557
|
content_type = content_type or "application/json"
|
1508
1558
|
_json = None
|
@@ -1510,9 +1560,10 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1510
1560
|
if isinstance(body, (IOBase, bytes)):
|
1511
1561
|
_content = body
|
1512
1562
|
else:
|
1513
|
-
_json = self._serialize.body(body, "
|
1563
|
+
_json = self._serialize.body(body, "{{JobStatusUpdate}}")
|
1514
1564
|
|
1515
|
-
_request =
|
1565
|
+
_request = build_jobs_set_job_statuses_request(
|
1566
|
+
force=force,
|
1516
1567
|
content_type=content_type,
|
1517
1568
|
json=_json,
|
1518
1569
|
content=_content,
|
@@ -1537,7 +1588,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1537
1588
|
raise HttpResponseError(response=response)
|
1538
1589
|
|
1539
1590
|
deserialized = self._deserialize(
|
1540
|
-
"
|
1591
|
+
"SetJobStatusReturn", pipeline_response.http_response
|
1541
1592
|
)
|
1542
1593
|
|
1543
1594
|
if cls:
|
@@ -1546,25 +1597,27 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1546
1597
|
return deserialized # type: ignore
|
1547
1598
|
|
1548
1599
|
@distributed_trace_async
|
1549
|
-
async def
|
1550
|
-
|
1600
|
+
async def reschedule_bulk_jobs(
|
1601
|
+
self, *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
|
1602
|
+
) -> Any:
|
1603
|
+
"""Reschedule Bulk Jobs.
|
1551
1604
|
|
1552
|
-
|
1605
|
+
Reschedule Bulk Jobs.
|
1553
1606
|
|
1554
1607
|
:keyword job_ids: Required.
|
1555
1608
|
:paramtype job_ids: list[int]
|
1609
|
+
:keyword reset_jobs: Default value is False.
|
1610
|
+
:paramtype reset_jobs: bool
|
1556
1611
|
:return: any
|
1557
1612
|
:rtype: any
|
1558
1613
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1559
1614
|
"""
|
1560
|
-
error_map: MutableMapping
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
}
|
1567
|
-
)
|
1615
|
+
error_map: MutableMapping = {
|
1616
|
+
401: ClientAuthenticationError,
|
1617
|
+
404: ResourceNotFoundError,
|
1618
|
+
409: ResourceExistsError,
|
1619
|
+
304: ResourceNotModifiedError,
|
1620
|
+
}
|
1568
1621
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1569
1622
|
|
1570
1623
|
_headers = kwargs.pop("headers", {}) or {}
|
@@ -1572,8 +1625,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1572
1625
|
|
1573
1626
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1574
1627
|
|
1575
|
-
_request =
|
1628
|
+
_request = build_jobs_reschedule_bulk_jobs_request(
|
1576
1629
|
job_ids=job_ids,
|
1630
|
+
reset_jobs=reset_jobs,
|
1577
1631
|
headers=_headers,
|
1578
1632
|
params=_params,
|
1579
1633
|
)
|
@@ -1601,35 +1655,124 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1601
1655
|
|
1602
1656
|
return deserialized # type: ignore
|
1603
1657
|
|
1658
|
+
@overload
|
1659
|
+
async def search(
|
1660
|
+
self,
|
1661
|
+
body: Optional[_models.JobSearchParams] = None,
|
1662
|
+
*,
|
1663
|
+
page: int = 1,
|
1664
|
+
per_page: int = 100,
|
1665
|
+
content_type: str = "application/json",
|
1666
|
+
**kwargs: Any,
|
1667
|
+
) -> List[JSON]:
|
1668
|
+
"""Search.
|
1669
|
+
|
1670
|
+
Retrieve information about jobs.
|
1671
|
+
|
1672
|
+
**TODO: Add more docs**.
|
1673
|
+
|
1674
|
+
:param body: Default value is None.
|
1675
|
+
:type body: ~generated.models.JobSearchParams
|
1676
|
+
:keyword page: Default value is 1.
|
1677
|
+
:paramtype page: int
|
1678
|
+
:keyword per_page: Default value is 100.
|
1679
|
+
:paramtype per_page: int
|
1680
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1681
|
+
Default value is "application/json".
|
1682
|
+
:paramtype content_type: str
|
1683
|
+
:return: list of JSON
|
1684
|
+
:rtype: list[JSON]
|
1685
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1686
|
+
"""
|
1687
|
+
|
1688
|
+
@overload
|
1689
|
+
async def search(
|
1690
|
+
self,
|
1691
|
+
body: Optional[IO[bytes]] = None,
|
1692
|
+
*,
|
1693
|
+
page: int = 1,
|
1694
|
+
per_page: int = 100,
|
1695
|
+
content_type: str = "application/json",
|
1696
|
+
**kwargs: Any,
|
1697
|
+
) -> List[JSON]:
|
1698
|
+
"""Search.
|
1699
|
+
|
1700
|
+
Retrieve information about jobs.
|
1701
|
+
|
1702
|
+
**TODO: Add more docs**.
|
1703
|
+
|
1704
|
+
:param body: Default value is None.
|
1705
|
+
:type body: IO[bytes]
|
1706
|
+
:keyword page: Default value is 1.
|
1707
|
+
:paramtype page: int
|
1708
|
+
:keyword per_page: Default value is 100.
|
1709
|
+
:paramtype per_page: int
|
1710
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1711
|
+
Default value is "application/json".
|
1712
|
+
:paramtype content_type: str
|
1713
|
+
:return: list of JSON
|
1714
|
+
:rtype: list[JSON]
|
1715
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1716
|
+
"""
|
1717
|
+
|
1604
1718
|
@distributed_trace_async
|
1605
|
-
async def
|
1606
|
-
|
1719
|
+
async def search(
|
1720
|
+
self,
|
1721
|
+
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
|
1722
|
+
*,
|
1723
|
+
page: int = 1,
|
1724
|
+
per_page: int = 100,
|
1725
|
+
**kwargs: Any,
|
1726
|
+
) -> List[JSON]:
|
1727
|
+
"""Search.
|
1607
1728
|
|
1608
|
-
|
1729
|
+
Retrieve information about jobs.
|
1609
1730
|
|
1610
|
-
:
|
1611
|
-
|
1612
|
-
:
|
1613
|
-
:
|
1731
|
+
**TODO: Add more docs**.
|
1732
|
+
|
1733
|
+
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
|
1734
|
+
:type body: ~generated.models.JobSearchParams or IO[bytes]
|
1735
|
+
:keyword page: Default value is 1.
|
1736
|
+
:paramtype page: int
|
1737
|
+
:keyword per_page: Default value is 100.
|
1738
|
+
:paramtype per_page: int
|
1739
|
+
:return: list of JSON
|
1740
|
+
:rtype: list[JSON]
|
1614
1741
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1615
1742
|
"""
|
1616
|
-
error_map: MutableMapping
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
}
|
1623
|
-
)
|
1743
|
+
error_map: MutableMapping = {
|
1744
|
+
401: ClientAuthenticationError,
|
1745
|
+
404: ResourceNotFoundError,
|
1746
|
+
409: ResourceExistsError,
|
1747
|
+
304: ResourceNotModifiedError,
|
1748
|
+
}
|
1624
1749
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
1625
1750
|
|
1626
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1751
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
1627
1752
|
_params = kwargs.pop("params", {}) or {}
|
1628
1753
|
|
1629
|
-
|
1754
|
+
content_type: Optional[str] = kwargs.pop(
|
1755
|
+
"content_type", _headers.pop("Content-Type", None)
|
1756
|
+
)
|
1757
|
+
cls: ClsType[List[JSON]] = kwargs.pop("cls", None)
|
1630
1758
|
|
1631
|
-
|
1632
|
-
|
1759
|
+
content_type = content_type or "application/json"
|
1760
|
+
_json = None
|
1761
|
+
_content = None
|
1762
|
+
if isinstance(body, (IOBase, bytes)):
|
1763
|
+
_content = body
|
1764
|
+
else:
|
1765
|
+
if body is not None:
|
1766
|
+
_json = self._serialize.body(body, "JobSearchParams")
|
1767
|
+
else:
|
1768
|
+
_json = None
|
1769
|
+
|
1770
|
+
_request = build_jobs_search_request(
|
1771
|
+
page=page,
|
1772
|
+
per_page=per_page,
|
1773
|
+
content_type=content_type,
|
1774
|
+
json=_json,
|
1775
|
+
content=_content,
|
1633
1776
|
headers=_headers,
|
1634
1777
|
params=_params,
|
1635
1778
|
)
|
@@ -1644,1038 +1787,107 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
1644
1787
|
|
1645
1788
|
response = pipeline_response.http_response
|
1646
1789
|
|
1647
|
-
if response.status_code not in [200]:
|
1790
|
+
if response.status_code not in [200, 206]:
|
1648
1791
|
map_error(
|
1649
1792
|
status_code=response.status_code, response=response, error_map=error_map
|
1650
1793
|
)
|
1651
1794
|
raise HttpResponseError(response=response)
|
1652
1795
|
|
1653
|
-
|
1796
|
+
response_headers = {}
|
1797
|
+
if response.status_code == 206:
|
1798
|
+
response_headers["Content-Range"] = self._deserialize(
|
1799
|
+
"str", response.headers.get("Content-Range")
|
1800
|
+
)
|
1654
1801
|
|
1655
|
-
|
1656
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1657
|
-
|
1658
|
-
return deserialized # type: ignore
|
1659
|
-
|
1660
|
-
@distributed_trace_async
|
1661
|
-
async def remove_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
1662
|
-
"""Remove Bulk Jobs.
|
1663
|
-
|
1664
|
-
Fully remove a list of jobs from the WMS databases.
|
1665
|
-
|
1666
|
-
WARNING: This endpoint has been implemented for the compatibility with the legacy DIRAC WMS
|
1667
|
-
and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
|
1668
|
-
be removed, and the delete endpoint should be used instead for any other purpose.
|
1669
|
-
|
1670
|
-
:keyword job_ids: Required.
|
1671
|
-
:paramtype job_ids: list[int]
|
1672
|
-
:return: any
|
1673
|
-
:rtype: any
|
1674
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1675
|
-
"""
|
1676
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
1677
|
-
{ # pylint: disable=unsubscriptable-object
|
1678
|
-
401: ClientAuthenticationError,
|
1679
|
-
404: ResourceNotFoundError,
|
1680
|
-
409: ResourceExistsError,
|
1681
|
-
304: ResourceNotModifiedError,
|
1682
|
-
}
|
1683
|
-
)
|
1684
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1685
|
-
|
1686
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1687
|
-
_params = kwargs.pop("params", {}) or {}
|
1688
|
-
|
1689
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1690
|
-
|
1691
|
-
_request = build_jobs_remove_bulk_jobs_request(
|
1692
|
-
job_ids=job_ids,
|
1693
|
-
headers=_headers,
|
1694
|
-
params=_params,
|
1695
|
-
)
|
1696
|
-
_request.url = self._client.format_url(_request.url)
|
1697
|
-
|
1698
|
-
_stream = False
|
1699
|
-
pipeline_response: PipelineResponse = (
|
1700
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
1701
|
-
_request, stream=_stream, **kwargs
|
1702
|
-
)
|
1703
|
-
)
|
1704
|
-
|
1705
|
-
response = pipeline_response.http_response
|
1706
|
-
|
1707
|
-
if response.status_code not in [200]:
|
1708
|
-
map_error(
|
1709
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1710
|
-
)
|
1711
|
-
raise HttpResponseError(response=response)
|
1712
|
-
|
1713
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1714
|
-
|
1715
|
-
if cls:
|
1716
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1717
|
-
|
1718
|
-
return deserialized # type: ignore
|
1719
|
-
|
1720
|
-
@distributed_trace_async
|
1721
|
-
async def get_job_status_bulk(
|
1722
|
-
self, *, job_ids: List[int], **kwargs: Any
|
1723
|
-
) -> Dict[str, _models.LimitedJobStatusReturn]:
|
1724
|
-
"""Get Job Status Bulk.
|
1725
|
-
|
1726
|
-
Get Job Status Bulk.
|
1727
|
-
|
1728
|
-
:keyword job_ids: Required.
|
1729
|
-
:paramtype job_ids: list[int]
|
1730
|
-
:return: dict mapping str to LimitedJobStatusReturn
|
1731
|
-
:rtype: dict[str, ~generated.models.LimitedJobStatusReturn]
|
1732
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1733
|
-
"""
|
1734
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
1735
|
-
{ # pylint: disable=unsubscriptable-object
|
1736
|
-
401: ClientAuthenticationError,
|
1737
|
-
404: ResourceNotFoundError,
|
1738
|
-
409: ResourceExistsError,
|
1739
|
-
304: ResourceNotModifiedError,
|
1740
|
-
}
|
1741
|
-
)
|
1742
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1743
|
-
|
1744
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1745
|
-
_params = kwargs.pop("params", {}) or {}
|
1746
|
-
|
1747
|
-
cls: ClsType[Dict[str, _models.LimitedJobStatusReturn]] = kwargs.pop(
|
1748
|
-
"cls", None
|
1749
|
-
)
|
1750
|
-
|
1751
|
-
_request = build_jobs_get_job_status_bulk_request(
|
1752
|
-
job_ids=job_ids,
|
1753
|
-
headers=_headers,
|
1754
|
-
params=_params,
|
1755
|
-
)
|
1756
|
-
_request.url = self._client.format_url(_request.url)
|
1757
|
-
|
1758
|
-
_stream = False
|
1759
|
-
pipeline_response: PipelineResponse = (
|
1760
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
1761
|
-
_request, stream=_stream, **kwargs
|
1762
|
-
)
|
1763
|
-
)
|
1764
|
-
|
1765
|
-
response = pipeline_response.http_response
|
1766
|
-
|
1767
|
-
if response.status_code not in [200]:
|
1768
|
-
map_error(
|
1769
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1770
|
-
)
|
1771
|
-
raise HttpResponseError(response=response)
|
1772
|
-
|
1773
|
-
deserialized = self._deserialize(
|
1774
|
-
"{LimitedJobStatusReturn}", pipeline_response.http_response
|
1775
|
-
)
|
1776
|
-
|
1777
|
-
if cls:
|
1778
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1779
|
-
|
1780
|
-
return deserialized # type: ignore
|
1781
|
-
|
1782
|
-
@overload
|
1783
|
-
async def set_job_status_bulk(
|
1784
|
-
self,
|
1785
|
-
body: Dict[str, Dict[str, _models.JobStatusUpdate]],
|
1786
|
-
*,
|
1787
|
-
force: bool = False,
|
1788
|
-
content_type: str = "application/json",
|
1789
|
-
**kwargs: Any,
|
1790
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
1791
|
-
"""Set Job Status Bulk.
|
1792
|
-
|
1793
|
-
Set Job Status Bulk.
|
1794
|
-
|
1795
|
-
:param body: Required.
|
1796
|
-
:type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]]
|
1797
|
-
:keyword force: Default value is False.
|
1798
|
-
:paramtype force: bool
|
1799
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1800
|
-
Default value is "application/json".
|
1801
|
-
:paramtype content_type: str
|
1802
|
-
:return: dict mapping str to SetJobStatusReturn
|
1803
|
-
:rtype: dict[str, ~generated.models.SetJobStatusReturn]
|
1804
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1805
|
-
"""
|
1806
|
-
|
1807
|
-
@overload
|
1808
|
-
async def set_job_status_bulk(
|
1809
|
-
self,
|
1810
|
-
body: IO[bytes],
|
1811
|
-
*,
|
1812
|
-
force: bool = False,
|
1813
|
-
content_type: str = "application/json",
|
1814
|
-
**kwargs: Any,
|
1815
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
1816
|
-
"""Set Job Status Bulk.
|
1817
|
-
|
1818
|
-
Set Job Status Bulk.
|
1819
|
-
|
1820
|
-
:param body: Required.
|
1821
|
-
:type body: IO[bytes]
|
1822
|
-
:keyword force: Default value is False.
|
1823
|
-
:paramtype force: bool
|
1824
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1825
|
-
Default value is "application/json".
|
1826
|
-
:paramtype content_type: str
|
1827
|
-
:return: dict mapping str to SetJobStatusReturn
|
1828
|
-
:rtype: dict[str, ~generated.models.SetJobStatusReturn]
|
1829
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1830
|
-
"""
|
1831
|
-
|
1832
|
-
@distributed_trace_async
|
1833
|
-
async def set_job_status_bulk(
|
1834
|
-
self,
|
1835
|
-
body: Union[Dict[str, Dict[str, _models.JobStatusUpdate]], IO[bytes]],
|
1836
|
-
*,
|
1837
|
-
force: bool = False,
|
1838
|
-
**kwargs: Any,
|
1839
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
1840
|
-
"""Set Job Status Bulk.
|
1841
|
-
|
1842
|
-
Set Job Status Bulk.
|
1843
|
-
|
1844
|
-
:param body: Is either a {str: {str: JobStatusUpdate}} type or a IO[bytes] type. Required.
|
1845
|
-
:type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes]
|
1846
|
-
:keyword force: Default value is False.
|
1847
|
-
:paramtype force: bool
|
1848
|
-
:return: dict mapping str to SetJobStatusReturn
|
1849
|
-
:rtype: dict[str, ~generated.models.SetJobStatusReturn]
|
1850
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1851
|
-
"""
|
1852
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
1853
|
-
{ # pylint: disable=unsubscriptable-object
|
1854
|
-
401: ClientAuthenticationError,
|
1855
|
-
404: ResourceNotFoundError,
|
1856
|
-
409: ResourceExistsError,
|
1857
|
-
304: ResourceNotModifiedError,
|
1858
|
-
}
|
1859
|
-
)
|
1860
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1861
|
-
|
1862
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
1863
|
-
_params = kwargs.pop("params", {}) or {}
|
1864
|
-
|
1865
|
-
content_type: Optional[str] = kwargs.pop(
|
1866
|
-
"content_type", _headers.pop("Content-Type", None)
|
1867
|
-
)
|
1868
|
-
cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None)
|
1869
|
-
|
1870
|
-
content_type = content_type or "application/json"
|
1871
|
-
_json = None
|
1872
|
-
_content = None
|
1873
|
-
if isinstance(body, (IOBase, bytes)):
|
1874
|
-
_content = body
|
1875
|
-
else:
|
1876
|
-
_json = self._serialize.body(body, "{{JobStatusUpdate}}")
|
1877
|
-
|
1878
|
-
_request = build_jobs_set_job_status_bulk_request(
|
1879
|
-
force=force,
|
1880
|
-
content_type=content_type,
|
1881
|
-
json=_json,
|
1882
|
-
content=_content,
|
1883
|
-
headers=_headers,
|
1884
|
-
params=_params,
|
1885
|
-
)
|
1886
|
-
_request.url = self._client.format_url(_request.url)
|
1887
|
-
|
1888
|
-
_stream = False
|
1889
|
-
pipeline_response: PipelineResponse = (
|
1890
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
1891
|
-
_request, stream=_stream, **kwargs
|
1892
|
-
)
|
1893
|
-
)
|
1894
|
-
|
1895
|
-
response = pipeline_response.http_response
|
1896
|
-
|
1897
|
-
if response.status_code not in [200]:
|
1898
|
-
map_error(
|
1899
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1900
|
-
)
|
1901
|
-
raise HttpResponseError(response=response)
|
1902
|
-
|
1903
|
-
deserialized = self._deserialize(
|
1904
|
-
"{SetJobStatusReturn}", pipeline_response.http_response
|
1905
|
-
)
|
1906
|
-
|
1907
|
-
if cls:
|
1908
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1909
|
-
|
1910
|
-
return deserialized # type: ignore
|
1911
|
-
|
1912
|
-
@distributed_trace_async
|
1913
|
-
async def get_job_status_history_bulk(
|
1914
|
-
self, *, job_ids: List[int], **kwargs: Any
|
1915
|
-
) -> Dict[str, List[_models.JobStatusReturn]]:
|
1916
|
-
"""Get Job Status History Bulk.
|
1917
|
-
|
1918
|
-
Get Job Status History Bulk.
|
1919
|
-
|
1920
|
-
:keyword job_ids: Required.
|
1921
|
-
:paramtype job_ids: list[int]
|
1922
|
-
:return: dict mapping str to list of JobStatusReturn
|
1923
|
-
:rtype: dict[str, list[~generated.models.JobStatusReturn]]
|
1924
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1925
|
-
"""
|
1926
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
1927
|
-
{ # pylint: disable=unsubscriptable-object
|
1928
|
-
401: ClientAuthenticationError,
|
1929
|
-
404: ResourceNotFoundError,
|
1930
|
-
409: ResourceExistsError,
|
1931
|
-
304: ResourceNotModifiedError,
|
1932
|
-
}
|
1933
|
-
)
|
1934
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1935
|
-
|
1936
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1937
|
-
_params = kwargs.pop("params", {}) or {}
|
1938
|
-
|
1939
|
-
cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
|
1940
|
-
|
1941
|
-
_request = build_jobs_get_job_status_history_bulk_request(
|
1942
|
-
job_ids=job_ids,
|
1943
|
-
headers=_headers,
|
1944
|
-
params=_params,
|
1945
|
-
)
|
1946
|
-
_request.url = self._client.format_url(_request.url)
|
1947
|
-
|
1948
|
-
_stream = False
|
1949
|
-
pipeline_response: PipelineResponse = (
|
1950
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
1951
|
-
_request, stream=_stream, **kwargs
|
1952
|
-
)
|
1953
|
-
)
|
1954
|
-
|
1955
|
-
response = pipeline_response.http_response
|
1956
|
-
|
1957
|
-
if response.status_code not in [200]:
|
1958
|
-
map_error(
|
1959
|
-
status_code=response.status_code, response=response, error_map=error_map
|
1960
|
-
)
|
1961
|
-
raise HttpResponseError(response=response)
|
1962
|
-
|
1963
|
-
deserialized = self._deserialize(
|
1964
|
-
"{[JobStatusReturn]}", pipeline_response.http_response
|
1965
|
-
)
|
1966
|
-
|
1967
|
-
if cls:
|
1968
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1969
|
-
|
1970
|
-
return deserialized # type: ignore
|
1971
|
-
|
1972
|
-
@distributed_trace_async
|
1973
|
-
async def reschedule_bulk_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
1974
|
-
"""Reschedule Bulk Jobs.
|
1975
|
-
|
1976
|
-
Reschedule Bulk Jobs.
|
1977
|
-
|
1978
|
-
:keyword job_ids: Required.
|
1979
|
-
:paramtype job_ids: list[int]
|
1980
|
-
:return: any
|
1981
|
-
:rtype: any
|
1982
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
1983
|
-
"""
|
1984
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
1985
|
-
{ # pylint: disable=unsubscriptable-object
|
1986
|
-
401: ClientAuthenticationError,
|
1987
|
-
404: ResourceNotFoundError,
|
1988
|
-
409: ResourceExistsError,
|
1989
|
-
304: ResourceNotModifiedError,
|
1990
|
-
}
|
1991
|
-
)
|
1992
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
1993
|
-
|
1994
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1995
|
-
_params = kwargs.pop("params", {}) or {}
|
1996
|
-
|
1997
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1998
|
-
|
1999
|
-
_request = build_jobs_reschedule_bulk_jobs_request(
|
2000
|
-
job_ids=job_ids,
|
2001
|
-
headers=_headers,
|
2002
|
-
params=_params,
|
2003
|
-
)
|
2004
|
-
_request.url = self._client.format_url(_request.url)
|
2005
|
-
|
2006
|
-
_stream = False
|
2007
|
-
pipeline_response: PipelineResponse = (
|
2008
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2009
|
-
_request, stream=_stream, **kwargs
|
2010
|
-
)
|
2011
|
-
)
|
2012
|
-
|
2013
|
-
response = pipeline_response.http_response
|
2014
|
-
|
2015
|
-
if response.status_code not in [200]:
|
2016
|
-
map_error(
|
2017
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2018
|
-
)
|
2019
|
-
raise HttpResponseError(response=response)
|
2020
|
-
|
2021
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2022
|
-
|
2023
|
-
if cls:
|
2024
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2025
|
-
|
2026
|
-
return deserialized # type: ignore
|
2027
|
-
|
2028
|
-
@distributed_trace_async
|
2029
|
-
async def reschedule_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
2030
|
-
"""Reschedule Single Job.
|
2031
|
-
|
2032
|
-
Reschedule Single Job.
|
2033
|
-
|
2034
|
-
:param job_id: Required.
|
2035
|
-
:type job_id: int
|
2036
|
-
:return: any
|
2037
|
-
:rtype: any
|
2038
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2039
|
-
"""
|
2040
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2041
|
-
{ # pylint: disable=unsubscriptable-object
|
2042
|
-
401: ClientAuthenticationError,
|
2043
|
-
404: ResourceNotFoundError,
|
2044
|
-
409: ResourceExistsError,
|
2045
|
-
304: ResourceNotModifiedError,
|
2046
|
-
}
|
2047
|
-
)
|
2048
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2049
|
-
|
2050
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2051
|
-
_params = kwargs.pop("params", {}) or {}
|
2052
|
-
|
2053
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2054
|
-
|
2055
|
-
_request = build_jobs_reschedule_single_job_request(
|
2056
|
-
job_id=job_id,
|
2057
|
-
headers=_headers,
|
2058
|
-
params=_params,
|
2059
|
-
)
|
2060
|
-
_request.url = self._client.format_url(_request.url)
|
2061
|
-
|
2062
|
-
_stream = False
|
2063
|
-
pipeline_response: PipelineResponse = (
|
2064
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2065
|
-
_request, stream=_stream, **kwargs
|
2066
|
-
)
|
2067
|
-
)
|
2068
|
-
|
2069
|
-
response = pipeline_response.http_response
|
2070
|
-
|
2071
|
-
if response.status_code not in [200]:
|
2072
|
-
map_error(
|
2073
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2074
|
-
)
|
2075
|
-
raise HttpResponseError(response=response)
|
2076
|
-
|
2077
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2078
|
-
|
2079
|
-
if cls:
|
2080
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2081
|
-
|
2082
|
-
return deserialized # type: ignore
|
2083
|
-
|
2084
|
-
@overload
|
2085
|
-
async def search(
|
2086
|
-
self,
|
2087
|
-
body: Optional[_models.JobSearchParams] = None,
|
2088
|
-
*,
|
2089
|
-
page: int = 1,
|
2090
|
-
per_page: int = 100,
|
2091
|
-
content_type: str = "application/json",
|
2092
|
-
**kwargs: Any,
|
2093
|
-
) -> List[JSON]:
|
2094
|
-
"""Search.
|
2095
|
-
|
2096
|
-
Retrieve information about jobs.
|
2097
|
-
|
2098
|
-
**TODO: Add more docs**.
|
2099
|
-
|
2100
|
-
:param body: Default value is None.
|
2101
|
-
:type body: ~generated.models.JobSearchParams
|
2102
|
-
:keyword page: Default value is 1.
|
2103
|
-
:paramtype page: int
|
2104
|
-
:keyword per_page: Default value is 100.
|
2105
|
-
:paramtype per_page: int
|
2106
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2107
|
-
Default value is "application/json".
|
2108
|
-
:paramtype content_type: str
|
2109
|
-
:return: list of JSON
|
2110
|
-
:rtype: list[JSON]
|
2111
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2112
|
-
"""
|
2113
|
-
|
2114
|
-
@overload
|
2115
|
-
async def search(
|
2116
|
-
self,
|
2117
|
-
body: Optional[IO[bytes]] = None,
|
2118
|
-
*,
|
2119
|
-
page: int = 1,
|
2120
|
-
per_page: int = 100,
|
2121
|
-
content_type: str = "application/json",
|
2122
|
-
**kwargs: Any,
|
2123
|
-
) -> List[JSON]:
|
2124
|
-
"""Search.
|
2125
|
-
|
2126
|
-
Retrieve information about jobs.
|
2127
|
-
|
2128
|
-
**TODO: Add more docs**.
|
2129
|
-
|
2130
|
-
:param body: Default value is None.
|
2131
|
-
:type body: IO[bytes]
|
2132
|
-
:keyword page: Default value is 1.
|
2133
|
-
:paramtype page: int
|
2134
|
-
:keyword per_page: Default value is 100.
|
2135
|
-
:paramtype per_page: int
|
2136
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
2137
|
-
Default value is "application/json".
|
2138
|
-
:paramtype content_type: str
|
2139
|
-
:return: list of JSON
|
2140
|
-
:rtype: list[JSON]
|
2141
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2142
|
-
"""
|
2143
|
-
|
2144
|
-
@distributed_trace_async
|
2145
|
-
async def search(
|
2146
|
-
self,
|
2147
|
-
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
|
2148
|
-
*,
|
2149
|
-
page: int = 1,
|
2150
|
-
per_page: int = 100,
|
2151
|
-
**kwargs: Any,
|
2152
|
-
) -> List[JSON]:
|
2153
|
-
"""Search.
|
2154
|
-
|
2155
|
-
Retrieve information about jobs.
|
2156
|
-
|
2157
|
-
**TODO: Add more docs**.
|
2158
|
-
|
2159
|
-
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
|
2160
|
-
:type body: ~generated.models.JobSearchParams or IO[bytes]
|
2161
|
-
:keyword page: Default value is 1.
|
2162
|
-
:paramtype page: int
|
2163
|
-
:keyword per_page: Default value is 100.
|
2164
|
-
:paramtype per_page: int
|
2165
|
-
:return: list of JSON
|
2166
|
-
:rtype: list[JSON]
|
2167
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2168
|
-
"""
|
2169
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2170
|
-
{ # pylint: disable=unsubscriptable-object
|
2171
|
-
401: ClientAuthenticationError,
|
2172
|
-
404: ResourceNotFoundError,
|
2173
|
-
409: ResourceExistsError,
|
2174
|
-
304: ResourceNotModifiedError,
|
2175
|
-
}
|
2176
|
-
)
|
2177
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2178
|
-
|
2179
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2180
|
-
_params = kwargs.pop("params", {}) or {}
|
2181
|
-
|
2182
|
-
content_type: Optional[str] = kwargs.pop(
|
2183
|
-
"content_type", _headers.pop("Content-Type", None)
|
2184
|
-
)
|
2185
|
-
cls: ClsType[List[JSON]] = kwargs.pop("cls", None)
|
2186
|
-
|
2187
|
-
content_type = content_type or "application/json"
|
2188
|
-
_json = None
|
2189
|
-
_content = None
|
2190
|
-
if isinstance(body, (IOBase, bytes)):
|
2191
|
-
_content = body
|
2192
|
-
else:
|
2193
|
-
if body is not None:
|
2194
|
-
_json = self._serialize.body(body, "JobSearchParams")
|
2195
|
-
else:
|
2196
|
-
_json = None
|
2197
|
-
|
2198
|
-
_request = build_jobs_search_request(
|
2199
|
-
page=page,
|
2200
|
-
per_page=per_page,
|
2201
|
-
content_type=content_type,
|
2202
|
-
json=_json,
|
2203
|
-
content=_content,
|
2204
|
-
headers=_headers,
|
2205
|
-
params=_params,
|
2206
|
-
)
|
2207
|
-
_request.url = self._client.format_url(_request.url)
|
2208
|
-
|
2209
|
-
_stream = False
|
2210
|
-
pipeline_response: PipelineResponse = (
|
2211
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2212
|
-
_request, stream=_stream, **kwargs
|
2213
|
-
)
|
2214
|
-
)
|
2215
|
-
|
2216
|
-
response = pipeline_response.http_response
|
2217
|
-
|
2218
|
-
if response.status_code not in [200, 206]:
|
2219
|
-
map_error(
|
2220
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2221
|
-
)
|
2222
|
-
raise HttpResponseError(response=response)
|
2223
|
-
|
2224
|
-
response_headers = {}
|
2225
|
-
if response.status_code == 206:
|
2226
|
-
response_headers["Content-Range"] = self._deserialize(
|
2227
|
-
"str", response.headers.get("Content-Range")
|
2228
|
-
)
|
2229
|
-
|
2230
|
-
deserialized = self._deserialize("[object]", pipeline_response.http_response)
|
2231
|
-
|
2232
|
-
if cls:
|
2233
|
-
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
2234
|
-
|
2235
|
-
return deserialized # type: ignore
|
2236
|
-
|
2237
|
-
@overload
|
2238
|
-
async def summary(
|
2239
|
-
self,
|
2240
|
-
body: _models.JobSummaryParams,
|
2241
|
-
*,
|
2242
|
-
content_type: str = "application/json",
|
2243
|
-
**kwargs: Any,
|
2244
|
-
) -> Any:
|
2245
|
-
"""Summary.
|
2246
|
-
|
2247
|
-
Show information suitable for plotting.
|
2248
|
-
|
2249
|
-
:param body: Required.
|
2250
|
-
:type body: ~generated.models.JobSummaryParams
|
2251
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2252
|
-
Default value is "application/json".
|
2253
|
-
:paramtype content_type: str
|
2254
|
-
:return: any
|
2255
|
-
:rtype: any
|
2256
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2257
|
-
"""
|
2258
|
-
|
2259
|
-
@overload
|
2260
|
-
async def summary(
|
2261
|
-
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
2262
|
-
) -> Any:
|
2263
|
-
"""Summary.
|
2264
|
-
|
2265
|
-
Show information suitable for plotting.
|
2266
|
-
|
2267
|
-
:param body: Required.
|
2268
|
-
:type body: IO[bytes]
|
2269
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
2270
|
-
Default value is "application/json".
|
2271
|
-
:paramtype content_type: str
|
2272
|
-
:return: any
|
2273
|
-
:rtype: any
|
2274
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2275
|
-
"""
|
2276
|
-
|
2277
|
-
@distributed_trace_async
|
2278
|
-
async def summary(
|
2279
|
-
self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
|
2280
|
-
) -> Any:
|
2281
|
-
"""Summary.
|
2282
|
-
|
2283
|
-
Show information suitable for plotting.
|
2284
|
-
|
2285
|
-
:param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
|
2286
|
-
:type body: ~generated.models.JobSummaryParams or IO[bytes]
|
2287
|
-
:return: any
|
2288
|
-
:rtype: any
|
2289
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2290
|
-
"""
|
2291
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2292
|
-
{ # pylint: disable=unsubscriptable-object
|
2293
|
-
401: ClientAuthenticationError,
|
2294
|
-
404: ResourceNotFoundError,
|
2295
|
-
409: ResourceExistsError,
|
2296
|
-
304: ResourceNotModifiedError,
|
2297
|
-
}
|
2298
|
-
)
|
2299
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2300
|
-
|
2301
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2302
|
-
_params = kwargs.pop("params", {}) or {}
|
2303
|
-
|
2304
|
-
content_type: Optional[str] = kwargs.pop(
|
2305
|
-
"content_type", _headers.pop("Content-Type", None)
|
2306
|
-
)
|
2307
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2308
|
-
|
2309
|
-
content_type = content_type or "application/json"
|
2310
|
-
_json = None
|
2311
|
-
_content = None
|
2312
|
-
if isinstance(body, (IOBase, bytes)):
|
2313
|
-
_content = body
|
2314
|
-
else:
|
2315
|
-
_json = self._serialize.body(body, "JobSummaryParams")
|
2316
|
-
|
2317
|
-
_request = build_jobs_summary_request(
|
2318
|
-
content_type=content_type,
|
2319
|
-
json=_json,
|
2320
|
-
content=_content,
|
2321
|
-
headers=_headers,
|
2322
|
-
params=_params,
|
2323
|
-
)
|
2324
|
-
_request.url = self._client.format_url(_request.url)
|
2325
|
-
|
2326
|
-
_stream = False
|
2327
|
-
pipeline_response: PipelineResponse = (
|
2328
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2329
|
-
_request, stream=_stream, **kwargs
|
2330
|
-
)
|
2331
|
-
)
|
2332
|
-
|
2333
|
-
response = pipeline_response.http_response
|
2334
|
-
|
2335
|
-
if response.status_code not in [200]:
|
2336
|
-
map_error(
|
2337
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2338
|
-
)
|
2339
|
-
raise HttpResponseError(response=response)
|
2340
|
-
|
2341
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2342
|
-
|
2343
|
-
if cls:
|
2344
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2345
|
-
|
2346
|
-
return deserialized # type: ignore
|
2347
|
-
|
2348
|
-
@distributed_trace_async
|
2349
|
-
async def get_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
2350
|
-
"""Get Single Job.
|
2351
|
-
|
2352
|
-
Get Single Job.
|
2353
|
-
|
2354
|
-
:param job_id: Required.
|
2355
|
-
:type job_id: int
|
2356
|
-
:return: any
|
2357
|
-
:rtype: any
|
2358
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2359
|
-
"""
|
2360
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2361
|
-
{ # pylint: disable=unsubscriptable-object
|
2362
|
-
401: ClientAuthenticationError,
|
2363
|
-
404: ResourceNotFoundError,
|
2364
|
-
409: ResourceExistsError,
|
2365
|
-
304: ResourceNotModifiedError,
|
2366
|
-
}
|
2367
|
-
)
|
2368
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2369
|
-
|
2370
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2371
|
-
_params = kwargs.pop("params", {}) or {}
|
2372
|
-
|
2373
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2374
|
-
|
2375
|
-
_request = build_jobs_get_single_job_request(
|
2376
|
-
job_id=job_id,
|
2377
|
-
headers=_headers,
|
2378
|
-
params=_params,
|
2379
|
-
)
|
2380
|
-
_request.url = self._client.format_url(_request.url)
|
2381
|
-
|
2382
|
-
_stream = False
|
2383
|
-
pipeline_response: PipelineResponse = (
|
2384
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2385
|
-
_request, stream=_stream, **kwargs
|
2386
|
-
)
|
2387
|
-
)
|
2388
|
-
|
2389
|
-
response = pipeline_response.http_response
|
2390
|
-
|
2391
|
-
if response.status_code not in [200]:
|
2392
|
-
map_error(
|
2393
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2394
|
-
)
|
2395
|
-
raise HttpResponseError(response=response)
|
2396
|
-
|
2397
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2398
|
-
|
2399
|
-
if cls:
|
2400
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2401
|
-
|
2402
|
-
return deserialized # type: ignore
|
2403
|
-
|
2404
|
-
@distributed_trace_async
|
2405
|
-
async def delete_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
2406
|
-
"""Delete Single Job.
|
2407
|
-
|
2408
|
-
Delete a job by killing and setting the job status to DELETED.
|
2409
|
-
|
2410
|
-
:param job_id: Required.
|
2411
|
-
:type job_id: int
|
2412
|
-
:return: any
|
2413
|
-
:rtype: any
|
2414
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2415
|
-
"""
|
2416
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2417
|
-
{ # pylint: disable=unsubscriptable-object
|
2418
|
-
401: ClientAuthenticationError,
|
2419
|
-
404: ResourceNotFoundError,
|
2420
|
-
409: ResourceExistsError,
|
2421
|
-
304: ResourceNotModifiedError,
|
2422
|
-
}
|
2423
|
-
)
|
2424
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2425
|
-
|
2426
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2427
|
-
_params = kwargs.pop("params", {}) or {}
|
2428
|
-
|
2429
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2430
|
-
|
2431
|
-
_request = build_jobs_delete_single_job_request(
|
2432
|
-
job_id=job_id,
|
2433
|
-
headers=_headers,
|
2434
|
-
params=_params,
|
2435
|
-
)
|
2436
|
-
_request.url = self._client.format_url(_request.url)
|
2437
|
-
|
2438
|
-
_stream = False
|
2439
|
-
pipeline_response: PipelineResponse = (
|
2440
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2441
|
-
_request, stream=_stream, **kwargs
|
2442
|
-
)
|
2443
|
-
)
|
2444
|
-
|
2445
|
-
response = pipeline_response.http_response
|
2446
|
-
|
2447
|
-
if response.status_code not in [200]:
|
2448
|
-
map_error(
|
2449
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2450
|
-
)
|
2451
|
-
raise HttpResponseError(response=response)
|
2452
|
-
|
2453
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2454
|
-
|
2455
|
-
if cls:
|
2456
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2457
|
-
|
2458
|
-
return deserialized # type: ignore
|
2459
|
-
|
2460
|
-
@distributed_trace_async
|
2461
|
-
async def set_single_job_properties(
|
2462
|
-
self, job_id: int, body: JSON, *, update_timestamp: bool = False, **kwargs: Any
|
2463
|
-
) -> Any:
|
2464
|
-
"""Set Single Job Properties.
|
2465
|
-
|
2466
|
-
Update the given job properties (MinorStatus, ApplicationStatus, etc).
|
2467
|
-
|
2468
|
-
:param job_id: Required.
|
2469
|
-
:type job_id: int
|
2470
|
-
:param body: Required.
|
2471
|
-
:type body: JSON
|
2472
|
-
:keyword update_timestamp: Default value is False.
|
2473
|
-
:paramtype update_timestamp: bool
|
2474
|
-
:return: any
|
2475
|
-
:rtype: any
|
2476
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2477
|
-
"""
|
2478
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2479
|
-
{ # pylint: disable=unsubscriptable-object
|
2480
|
-
401: ClientAuthenticationError,
|
2481
|
-
404: ResourceNotFoundError,
|
2482
|
-
409: ResourceExistsError,
|
2483
|
-
304: ResourceNotModifiedError,
|
2484
|
-
}
|
2485
|
-
)
|
2486
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2487
|
-
|
2488
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2489
|
-
_params = kwargs.pop("params", {}) or {}
|
2490
|
-
|
2491
|
-
content_type: str = kwargs.pop(
|
2492
|
-
"content_type", _headers.pop("Content-Type", "application/json")
|
2493
|
-
)
|
2494
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2495
|
-
|
2496
|
-
_json = self._serialize.body(body, "object")
|
2497
|
-
|
2498
|
-
_request = build_jobs_set_single_job_properties_request(
|
2499
|
-
job_id=job_id,
|
2500
|
-
update_timestamp=update_timestamp,
|
2501
|
-
content_type=content_type,
|
2502
|
-
json=_json,
|
2503
|
-
headers=_headers,
|
2504
|
-
params=_params,
|
2505
|
-
)
|
2506
|
-
_request.url = self._client.format_url(_request.url)
|
2507
|
-
|
2508
|
-
_stream = False
|
2509
|
-
pipeline_response: PipelineResponse = (
|
2510
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2511
|
-
_request, stream=_stream, **kwargs
|
2512
|
-
)
|
2513
|
-
)
|
2514
|
-
|
2515
|
-
response = pipeline_response.http_response
|
2516
|
-
|
2517
|
-
if response.status_code not in [200]:
|
2518
|
-
map_error(
|
2519
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2520
|
-
)
|
2521
|
-
raise HttpResponseError(response=response)
|
2522
|
-
|
2523
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1802
|
+
deserialized = self._deserialize("[object]", pipeline_response.http_response)
|
2524
1803
|
|
2525
1804
|
if cls:
|
2526
|
-
return cls(pipeline_response, deserialized,
|
1805
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
2527
1806
|
|
2528
1807
|
return deserialized # type: ignore
|
2529
1808
|
|
2530
|
-
@
|
2531
|
-
async def
|
2532
|
-
|
1809
|
+
@overload
|
1810
|
+
async def summary(
|
1811
|
+
self,
|
1812
|
+
body: _models.JobSummaryParams,
|
1813
|
+
*,
|
1814
|
+
content_type: str = "application/json",
|
1815
|
+
**kwargs: Any,
|
1816
|
+
) -> Any:
|
1817
|
+
"""Summary.
|
2533
1818
|
|
2534
|
-
|
1819
|
+
Show information suitable for plotting.
|
2535
1820
|
|
2536
|
-
:param
|
2537
|
-
:type
|
1821
|
+
:param body: Required.
|
1822
|
+
:type body: ~generated.models.JobSummaryParams
|
1823
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1824
|
+
Default value is "application/json".
|
1825
|
+
:paramtype content_type: str
|
2538
1826
|
:return: any
|
2539
1827
|
:rtype: any
|
2540
1828
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2541
1829
|
"""
|
2542
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2543
|
-
{ # pylint: disable=unsubscriptable-object
|
2544
|
-
401: ClientAuthenticationError,
|
2545
|
-
404: ResourceNotFoundError,
|
2546
|
-
409: ResourceExistsError,
|
2547
|
-
304: ResourceNotModifiedError,
|
2548
|
-
}
|
2549
|
-
)
|
2550
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2551
|
-
|
2552
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2553
|
-
_params = kwargs.pop("params", {}) or {}
|
2554
|
-
|
2555
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2556
|
-
|
2557
|
-
_request = build_jobs_kill_single_job_request(
|
2558
|
-
job_id=job_id,
|
2559
|
-
headers=_headers,
|
2560
|
-
params=_params,
|
2561
|
-
)
|
2562
|
-
_request.url = self._client.format_url(_request.url)
|
2563
|
-
|
2564
|
-
_stream = False
|
2565
|
-
pipeline_response: PipelineResponse = (
|
2566
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2567
|
-
_request, stream=_stream, **kwargs
|
2568
|
-
)
|
2569
|
-
)
|
2570
|
-
|
2571
|
-
response = pipeline_response.http_response
|
2572
|
-
|
2573
|
-
if response.status_code not in [200]:
|
2574
|
-
map_error(
|
2575
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2576
|
-
)
|
2577
|
-
raise HttpResponseError(response=response)
|
2578
|
-
|
2579
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2580
|
-
|
2581
|
-
if cls:
|
2582
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2583
|
-
|
2584
|
-
return deserialized # type: ignore
|
2585
|
-
|
2586
|
-
@distributed_trace_async
|
2587
|
-
async def remove_single_job(self, job_id: int, **kwargs: Any) -> Any:
|
2588
|
-
"""Remove Single Job.
|
2589
1830
|
|
2590
|
-
|
1831
|
+
@overload
|
1832
|
+
async def summary(
|
1833
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1834
|
+
) -> Any:
|
1835
|
+
"""Summary.
|
2591
1836
|
|
2592
|
-
|
2593
|
-
and the JobCleaningAgent. However, once this agent is ported to diracx, this endpoint should
|
2594
|
-
be removed, and the delete endpoint should be used instead.
|
1837
|
+
Show information suitable for plotting.
|
2595
1838
|
|
2596
|
-
:param
|
2597
|
-
:type
|
1839
|
+
:param body: Required.
|
1840
|
+
:type body: IO[bytes]
|
1841
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1842
|
+
Default value is "application/json".
|
1843
|
+
:paramtype content_type: str
|
2598
1844
|
:return: any
|
2599
1845
|
:rtype: any
|
2600
1846
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2601
1847
|
"""
|
2602
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2603
|
-
{ # pylint: disable=unsubscriptable-object
|
2604
|
-
401: ClientAuthenticationError,
|
2605
|
-
404: ResourceNotFoundError,
|
2606
|
-
409: ResourceExistsError,
|
2607
|
-
304: ResourceNotModifiedError,
|
2608
|
-
}
|
2609
|
-
)
|
2610
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2611
|
-
|
2612
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2613
|
-
_params = kwargs.pop("params", {}) or {}
|
2614
|
-
|
2615
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2616
|
-
|
2617
|
-
_request = build_jobs_remove_single_job_request(
|
2618
|
-
job_id=job_id,
|
2619
|
-
headers=_headers,
|
2620
|
-
params=_params,
|
2621
|
-
)
|
2622
|
-
_request.url = self._client.format_url(_request.url)
|
2623
|
-
|
2624
|
-
_stream = False
|
2625
|
-
pipeline_response: PipelineResponse = (
|
2626
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2627
|
-
_request, stream=_stream, **kwargs
|
2628
|
-
)
|
2629
|
-
)
|
2630
|
-
|
2631
|
-
response = pipeline_response.http_response
|
2632
|
-
|
2633
|
-
if response.status_code not in [200]:
|
2634
|
-
map_error(
|
2635
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2636
|
-
)
|
2637
|
-
raise HttpResponseError(response=response)
|
2638
|
-
|
2639
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2640
|
-
|
2641
|
-
if cls:
|
2642
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2643
|
-
|
2644
|
-
return deserialized # type: ignore
|
2645
1848
|
|
2646
1849
|
@distributed_trace_async
|
2647
|
-
async def
|
2648
|
-
self,
|
2649
|
-
) ->
|
2650
|
-
"""
|
1850
|
+
async def summary(
|
1851
|
+
self, body: Union[_models.JobSummaryParams, IO[bytes]], **kwargs: Any
|
1852
|
+
) -> Any:
|
1853
|
+
"""Summary.
|
2651
1854
|
|
2652
|
-
|
1855
|
+
Show information suitable for plotting.
|
2653
1856
|
|
2654
|
-
:param
|
2655
|
-
:type
|
2656
|
-
:return:
|
2657
|
-
:rtype:
|
1857
|
+
:param body: Is either a JobSummaryParams type or a IO[bytes] type. Required.
|
1858
|
+
:type body: ~generated.models.JobSummaryParams or IO[bytes]
|
1859
|
+
:return: any
|
1860
|
+
:rtype: any
|
2658
1861
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2659
1862
|
"""
|
2660
|
-
error_map: MutableMapping
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
2664
|
-
|
2665
|
-
|
2666
|
-
}
|
2667
|
-
)
|
1863
|
+
error_map: MutableMapping = {
|
1864
|
+
401: ClientAuthenticationError,
|
1865
|
+
404: ResourceNotFoundError,
|
1866
|
+
409: ResourceExistsError,
|
1867
|
+
304: ResourceNotModifiedError,
|
1868
|
+
}
|
2668
1869
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2669
1870
|
|
2670
|
-
_headers = kwargs.pop("headers", {}) or {}
|
1871
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
2671
1872
|
_params = kwargs.pop("params", {}) or {}
|
2672
1873
|
|
2673
|
-
|
2674
|
-
"
|
1874
|
+
content_type: Optional[str] = kwargs.pop(
|
1875
|
+
"content_type", _headers.pop("Content-Type", None)
|
2675
1876
|
)
|
1877
|
+
cls: ClsType[Any] = kwargs.pop("cls", None)
|
2676
1878
|
|
2677
|
-
|
2678
|
-
|
1879
|
+
content_type = content_type or "application/json"
|
1880
|
+
_json = None
|
1881
|
+
_content = None
|
1882
|
+
if isinstance(body, (IOBase, bytes)):
|
1883
|
+
_content = body
|
1884
|
+
else:
|
1885
|
+
_json = self._serialize.body(body, "JobSummaryParams")
|
1886
|
+
|
1887
|
+
_request = build_jobs_summary_request(
|
1888
|
+
content_type=content_type,
|
1889
|
+
json=_json,
|
1890
|
+
content=_content,
|
2679
1891
|
headers=_headers,
|
2680
1892
|
params=_params,
|
2681
1893
|
)
|
@@ -2696,9 +1908,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2696
1908
|
)
|
2697
1909
|
raise HttpResponseError(response=response)
|
2698
1910
|
|
2699
|
-
deserialized = self._deserialize(
|
2700
|
-
"{LimitedJobStatusReturn}", pipeline_response.http_response
|
2701
|
-
)
|
1911
|
+
deserialized = self._deserialize("object", pipeline_response.http_response)
|
2702
1912
|
|
2703
1913
|
if cls:
|
2704
1914
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -2706,92 +1916,61 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2706
1916
|
return deserialized # type: ignore
|
2707
1917
|
|
2708
1918
|
@overload
|
2709
|
-
async def
|
2710
|
-
self,
|
2711
|
-
|
2712
|
-
|
2713
|
-
*,
|
2714
|
-
force: bool = False,
|
2715
|
-
content_type: str = "application/json",
|
2716
|
-
**kwargs: Any,
|
2717
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
2718
|
-
"""Set Single Job Status.
|
1919
|
+
async def submit_bulk_jdl_jobs(
|
1920
|
+
self, body: List[str], *, content_type: str = "application/json", **kwargs: Any
|
1921
|
+
) -> List[_models.InsertedJob]:
|
1922
|
+
"""Submit Bulk Jdl Jobs.
|
2719
1923
|
|
2720
|
-
|
1924
|
+
Submit Bulk Jdl Jobs.
|
2721
1925
|
|
2722
|
-
:param job_id: Required.
|
2723
|
-
:type job_id: int
|
2724
1926
|
:param body: Required.
|
2725
|
-
:type body:
|
2726
|
-
:keyword force: Default value is False.
|
2727
|
-
:paramtype force: bool
|
1927
|
+
:type body: list[str]
|
2728
1928
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
2729
1929
|
Default value is "application/json".
|
2730
1930
|
:paramtype content_type: str
|
2731
|
-
:return:
|
2732
|
-
:rtype:
|
1931
|
+
:return: list of InsertedJob
|
1932
|
+
:rtype: list[~generated.models.InsertedJob]
|
2733
1933
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2734
1934
|
"""
|
2735
1935
|
|
2736
1936
|
@overload
|
2737
|
-
async def
|
2738
|
-
self,
|
2739
|
-
|
2740
|
-
|
2741
|
-
*,
|
2742
|
-
force: bool = False,
|
2743
|
-
content_type: str = "application/json",
|
2744
|
-
**kwargs: Any,
|
2745
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
2746
|
-
"""Set Single Job Status.
|
1937
|
+
async def submit_bulk_jdl_jobs(
|
1938
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1939
|
+
) -> List[_models.InsertedJob]:
|
1940
|
+
"""Submit Bulk Jdl Jobs.
|
2747
1941
|
|
2748
|
-
|
1942
|
+
Submit Bulk Jdl Jobs.
|
2749
1943
|
|
2750
|
-
:param job_id: Required.
|
2751
|
-
:type job_id: int
|
2752
1944
|
:param body: Required.
|
2753
1945
|
:type body: IO[bytes]
|
2754
|
-
:keyword force: Default value is False.
|
2755
|
-
:paramtype force: bool
|
2756
1946
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
2757
1947
|
Default value is "application/json".
|
2758
1948
|
:paramtype content_type: str
|
2759
|
-
:return:
|
2760
|
-
:rtype:
|
1949
|
+
:return: list of InsertedJob
|
1950
|
+
:rtype: list[~generated.models.InsertedJob]
|
2761
1951
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2762
1952
|
"""
|
2763
1953
|
|
2764
1954
|
@distributed_trace_async
|
2765
|
-
async def
|
2766
|
-
self,
|
2767
|
-
|
2768
|
-
|
2769
|
-
*,
|
2770
|
-
force: bool = False,
|
2771
|
-
**kwargs: Any,
|
2772
|
-
) -> Dict[str, _models.SetJobStatusReturn]:
|
2773
|
-
"""Set Single Job Status.
|
1955
|
+
async def submit_bulk_jdl_jobs(
|
1956
|
+
self, body: Union[List[str], IO[bytes]], **kwargs: Any
|
1957
|
+
) -> List[_models.InsertedJob]:
|
1958
|
+
"""Submit Bulk Jdl Jobs.
|
2774
1959
|
|
2775
|
-
|
1960
|
+
Submit Bulk Jdl Jobs.
|
2776
1961
|
|
2777
|
-
:param
|
2778
|
-
:type
|
2779
|
-
:
|
2780
|
-
:
|
2781
|
-
:keyword force: Default value is False.
|
2782
|
-
:paramtype force: bool
|
2783
|
-
:return: dict mapping str to SetJobStatusReturn
|
2784
|
-
:rtype: dict[str, ~generated.models.SetJobStatusReturn]
|
1962
|
+
:param body: Is either a [str] type or a IO[bytes] type. Required.
|
1963
|
+
:type body: list[str] or IO[bytes]
|
1964
|
+
:return: list of InsertedJob
|
1965
|
+
:rtype: list[~generated.models.InsertedJob]
|
2785
1966
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2786
1967
|
"""
|
2787
|
-
error_map: MutableMapping
|
2788
|
-
|
2789
|
-
|
2790
|
-
|
2791
|
-
|
2792
|
-
|
2793
|
-
}
|
2794
|
-
)
|
1968
|
+
error_map: MutableMapping = {
|
1969
|
+
401: ClientAuthenticationError,
|
1970
|
+
404: ResourceNotFoundError,
|
1971
|
+
409: ResourceExistsError,
|
1972
|
+
304: ResourceNotModifiedError,
|
1973
|
+
}
|
2795
1974
|
error_map.update(kwargs.pop("error_map", {}) or {})
|
2796
1975
|
|
2797
1976
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -2800,7 +1979,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2800
1979
|
content_type: Optional[str] = kwargs.pop(
|
2801
1980
|
"content_type", _headers.pop("Content-Type", None)
|
2802
1981
|
)
|
2803
|
-
cls: ClsType[
|
1982
|
+
cls: ClsType[List[_models.InsertedJob]] = kwargs.pop("cls", None)
|
2804
1983
|
|
2805
1984
|
content_type = content_type or "application/json"
|
2806
1985
|
_json = None
|
@@ -2808,11 +1987,9 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2808
1987
|
if isinstance(body, (IOBase, bytes)):
|
2809
1988
|
_content = body
|
2810
1989
|
else:
|
2811
|
-
_json = self._serialize.body(body, "
|
1990
|
+
_json = self._serialize.body(body, "[str]")
|
2812
1991
|
|
2813
|
-
_request =
|
2814
|
-
job_id=job_id,
|
2815
|
-
force=force,
|
1992
|
+
_request = build_jobs_submit_bulk_jdl_jobs_request(
|
2816
1993
|
content_type=content_type,
|
2817
1994
|
json=_json,
|
2818
1995
|
content=_content,
|
@@ -2837,67 +2014,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2837
2014
|
raise HttpResponseError(response=response)
|
2838
2015
|
|
2839
2016
|
deserialized = self._deserialize(
|
2840
|
-
"
|
2841
|
-
)
|
2842
|
-
|
2843
|
-
if cls:
|
2844
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
2845
|
-
|
2846
|
-
return deserialized # type: ignore
|
2847
|
-
|
2848
|
-
@distributed_trace_async
|
2849
|
-
async def get_single_job_status_history(
|
2850
|
-
self, job_id: int, **kwargs: Any
|
2851
|
-
) -> Dict[str, List[_models.JobStatusReturn]]:
|
2852
|
-
"""Get Single Job Status History.
|
2853
|
-
|
2854
|
-
Get Single Job Status History.
|
2855
|
-
|
2856
|
-
:param job_id: Required.
|
2857
|
-
:type job_id: int
|
2858
|
-
:return: dict mapping str to list of JobStatusReturn
|
2859
|
-
:rtype: dict[str, list[~generated.models.JobStatusReturn]]
|
2860
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
2861
|
-
"""
|
2862
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = (
|
2863
|
-
{ # pylint: disable=unsubscriptable-object
|
2864
|
-
401: ClientAuthenticationError,
|
2865
|
-
404: ResourceNotFoundError,
|
2866
|
-
409: ResourceExistsError,
|
2867
|
-
304: ResourceNotModifiedError,
|
2868
|
-
}
|
2869
|
-
)
|
2870
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
2871
|
-
|
2872
|
-
_headers = kwargs.pop("headers", {}) or {}
|
2873
|
-
_params = kwargs.pop("params", {}) or {}
|
2874
|
-
|
2875
|
-
cls: ClsType[Dict[str, List[_models.JobStatusReturn]]] = kwargs.pop("cls", None)
|
2876
|
-
|
2877
|
-
_request = build_jobs_get_single_job_status_history_request(
|
2878
|
-
job_id=job_id,
|
2879
|
-
headers=_headers,
|
2880
|
-
params=_params,
|
2881
|
-
)
|
2882
|
-
_request.url = self._client.format_url(_request.url)
|
2883
|
-
|
2884
|
-
_stream = False
|
2885
|
-
pipeline_response: PipelineResponse = (
|
2886
|
-
await self._client._pipeline.run( # pylint: disable=protected-access
|
2887
|
-
_request, stream=_stream, **kwargs
|
2888
|
-
)
|
2889
|
-
)
|
2890
|
-
|
2891
|
-
response = pipeline_response.http_response
|
2892
|
-
|
2893
|
-
if response.status_code not in [200]:
|
2894
|
-
map_error(
|
2895
|
-
status_code=response.status_code, response=response, error_map=error_map
|
2896
|
-
)
|
2897
|
-
raise HttpResponseError(response=response)
|
2898
|
-
|
2899
|
-
deserialized = self._deserialize(
|
2900
|
-
"{[JobStatusReturn]}", pipeline_response.http_response
|
2017
|
+
"[InsertedJob]", pipeline_response.http_response
|
2901
2018
|
)
|
2902
2019
|
|
2903
2020
|
if cls:
|