diracx-client 0.0.1a28__py3-none-any.whl → 0.0.1a31__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 +1 -1
- diracx/client/generated/_client.py +1 -1
- diracx/client/generated/_configuration.py +1 -1
- diracx/client/generated/_patch.py +1 -21
- diracx/client/generated/_serialization.py +3 -3
- diracx/client/generated/_vendor.py +1 -1
- diracx/client/generated/aio/__init__.py +1 -1
- 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 +1 -1
- diracx/client/generated/aio/operations/_operations.py +168 -59
- diracx/client/generated/aio/operations/_patch.py +4 -5
- diracx/client/generated/models/__init__.py +7 -7
- diracx/client/generated/models/_enums.py +1 -1
- diracx/client/generated/models/_models.py +145 -60
- diracx/client/generated/operations/__init__.py +1 -1
- diracx/client/generated/operations/_operations.py +183 -61
- diracx/client/generated/operations/_patch.py +4 -5
- {diracx_client-0.0.1a28.dist-info → diracx_client-0.0.1a31.dist-info}/METADATA +2 -2
- diracx_client-0.0.1a31.dist-info/RECORD +36 -0
- {diracx_client-0.0.1a28.dist-info → diracx_client-0.0.1a31.dist-info}/WHEEL +1 -1
- diracx_client-0.0.1a28.dist-info/RECORD +0 -36
- {diracx_client-0.0.1a28.dist-info → diracx_client-0.0.1a31.dist-info}/entry_points.txt +0 -0
- {diracx_client-0.0.1a28.dist-info → diracx_client-0.0.1a31.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
# pylint: disable=wrong-import-position
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -8,27 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python
|
|
8
8
|
"""
|
9
9
|
from __future__ import annotations
|
10
10
|
|
11
|
-
import
|
12
|
-
from datetime import datetime, timezone
|
13
|
-
import importlib.util
|
14
|
-
import json
|
15
|
-
import jwt
|
16
|
-
import httpx
|
17
|
-
|
18
|
-
from pathlib import Path
|
19
|
-
from typing import Any, Dict, List, Optional, cast
|
20
|
-
from urllib import parse
|
21
|
-
from azure.core.credentials import AccessToken
|
22
|
-
from azure.core.credentials import TokenCredential
|
23
|
-
from azure.core.pipeline import PipelineRequest
|
24
|
-
from azure.core.pipeline.policies import BearerTokenCredentialPolicy
|
25
|
-
|
26
|
-
from diracx.core.preferences import DiracxPreferences, get_diracx_preferences
|
27
|
-
|
28
|
-
|
29
|
-
import sys
|
30
|
-
import importlib
|
31
|
-
from importlib.abc import MetaPathFinder, Loader
|
11
|
+
from typing import List
|
32
12
|
|
33
13
|
__all__: List[str] = [
|
34
14
|
"DiracClient",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
|
2
2
|
# --------------------------------------------------------------------------
|
3
3
|
#
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -437,7 +437,7 @@ class Model:
|
|
437
437
|
:param function key_extractors: A key extractor function.
|
438
438
|
:param str content_type: JSON by default, set application/xml if XML.
|
439
439
|
:returns: An instance of this model
|
440
|
-
:raises
|
440
|
+
:raises DeserializationError: if something went wrong
|
441
441
|
:rtype: Self
|
442
442
|
"""
|
443
443
|
deserializer = Deserializer(cls._infer_class_models())
|
@@ -1452,7 +1452,7 @@ def xml_key_extractor(
|
|
1452
1452
|
# Iter and wrapped, should have found one node only (the wrap one)
|
1453
1453
|
if len(children) != 1:
|
1454
1454
|
raise DeserializationError(
|
1455
|
-
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
|
1455
|
+
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
|
1456
1456
|
xml_name
|
1457
1457
|
)
|
1458
1458
|
)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# --------------------------------------------------------------------------
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
4
4
|
# --------------------------------------------------------------------------
|
5
5
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
# pylint: disable=wrong-import-position
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# --------------------------------------------------------------------------
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
4
4
|
# --------------------------------------------------------------------------
|
5
5
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.4, generator: @autorest/python@6.31.0)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
# pylint: disable=wrong-import-position
|
@@ -1,7 +1,7 @@
|
|
1
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.4, generator: @autorest/python@6.31.0)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
from io import IOBase
|
@@ -26,12 +26,12 @@ from azure.core.utils import case_insensitive_dict
|
|
26
26
|
from ... import models as _models
|
27
27
|
from ..._serialization import Deserializer, Serializer
|
28
28
|
from ...operations._operations import (
|
29
|
-
|
30
|
-
build_auth_authorization_flow_request,
|
29
|
+
build_auth_complete_authorization_flow_request,
|
31
30
|
build_auth_do_device_flow_request,
|
32
31
|
build_auth_finish_device_flow_request,
|
33
32
|
build_auth_finished_request,
|
34
33
|
build_auth_get_refresh_tokens_request,
|
34
|
+
build_auth_initiate_authorization_flow_request,
|
35
35
|
build_auth_initiate_device_flow_request,
|
36
36
|
build_auth_revoke_refresh_token_request,
|
37
37
|
build_auth_userinfo_request,
|
@@ -41,16 +41,17 @@ from ...operations._operations import (
|
|
41
41
|
build_jobs_get_job_sandboxes_request,
|
42
42
|
build_jobs_get_sandbox_file_request,
|
43
43
|
build_jobs_initiate_sandbox_upload_request,
|
44
|
-
|
45
|
-
|
44
|
+
build_jobs_patch_metadata_request,
|
45
|
+
build_jobs_remove_jobs_request,
|
46
|
+
build_jobs_reschedule_jobs_request,
|
46
47
|
build_jobs_search_request,
|
47
48
|
build_jobs_set_job_statuses_request,
|
48
|
-
|
49
|
+
build_jobs_submit_jdl_jobs_request,
|
49
50
|
build_jobs_summary_request,
|
50
51
|
build_jobs_unassign_bulk_jobs_sandboxes_request,
|
51
52
|
build_jobs_unassign_job_sandboxes_request,
|
52
|
-
|
53
|
-
|
53
|
+
build_well_known_get_installation_metadata_request,
|
54
|
+
build_well_known_get_openid_configuration_request,
|
54
55
|
)
|
55
56
|
from .._configuration import DiracConfiguration
|
56
57
|
from .._vendor import raise_if_not_implemented
|
@@ -63,7 +64,6 @@ T = TypeVar("T")
|
|
63
64
|
ClsType = Optional[
|
64
65
|
Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]
|
65
66
|
]
|
66
|
-
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
|
67
67
|
|
68
68
|
|
69
69
|
class WellKnownOperations:
|
@@ -94,13 +94,15 @@ class WellKnownOperations:
|
|
94
94
|
)
|
95
95
|
|
96
96
|
@distributed_trace_async
|
97
|
-
async def
|
98
|
-
|
97
|
+
async def get_openid_configuration(
|
98
|
+
self, **kwargs: Any
|
99
|
+
) -> _models.OpenIDConfiguration:
|
100
|
+
"""Get Openid Configuration.
|
99
101
|
|
100
102
|
OpenID Connect discovery endpoint.
|
101
103
|
|
102
|
-
:return:
|
103
|
-
:rtype:
|
104
|
+
:return: OpenIDConfiguration
|
105
|
+
:rtype: ~generated.models.OpenIDConfiguration
|
104
106
|
:raises ~azure.core.exceptions.HttpResponseError:
|
105
107
|
"""
|
106
108
|
error_map: MutableMapping = {
|
@@ -114,9 +116,9 @@ class WellKnownOperations:
|
|
114
116
|
_headers = kwargs.pop("headers", {}) or {}
|
115
117
|
_params = kwargs.pop("params", {}) or {}
|
116
118
|
|
117
|
-
cls: ClsType[
|
119
|
+
cls: ClsType[_models.OpenIDConfiguration] = kwargs.pop("cls", None)
|
118
120
|
|
119
|
-
_request =
|
121
|
+
_request = build_well_known_get_openid_configuration_request(
|
120
122
|
headers=_headers,
|
121
123
|
params=_params,
|
122
124
|
)
|
@@ -137,7 +139,9 @@ class WellKnownOperations:
|
|
137
139
|
)
|
138
140
|
raise HttpResponseError(response=response)
|
139
141
|
|
140
|
-
deserialized = self._deserialize(
|
142
|
+
deserialized = self._deserialize(
|
143
|
+
"OpenIDConfiguration", pipeline_response.http_response
|
144
|
+
)
|
141
145
|
|
142
146
|
if cls:
|
143
147
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
@@ -145,8 +149,8 @@ class WellKnownOperations:
|
|
145
149
|
return deserialized # type: ignore
|
146
150
|
|
147
151
|
@distributed_trace_async
|
148
|
-
async def
|
149
|
-
"""Installation Metadata.
|
152
|
+
async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
|
153
|
+
"""Get Installation Metadata.
|
150
154
|
|
151
155
|
Get metadata about the dirac installation.
|
152
156
|
|
@@ -167,7 +171,7 @@ class WellKnownOperations:
|
|
167
171
|
|
168
172
|
cls: ClsType[_models.Metadata] = kwargs.pop("cls", None)
|
169
173
|
|
170
|
-
_request =
|
174
|
+
_request = build_well_known_get_installation_metadata_request(
|
171
175
|
headers=_headers,
|
172
176
|
params=_params,
|
173
177
|
)
|
@@ -226,7 +230,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
226
230
|
raise_if_not_implemented(
|
227
231
|
self.__class__,
|
228
232
|
[
|
229
|
-
"
|
233
|
+
"get_oidc_token",
|
230
234
|
],
|
231
235
|
)
|
232
236
|
|
@@ -647,7 +651,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
647
651
|
return deserialized # type: ignore
|
648
652
|
|
649
653
|
@distributed_trace_async
|
650
|
-
async def
|
654
|
+
async def initiate_authorization_flow(
|
651
655
|
self,
|
652
656
|
*,
|
653
657
|
response_type: str,
|
@@ -659,7 +663,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
659
663
|
state: str,
|
660
664
|
**kwargs: Any,
|
661
665
|
) -> Any:
|
662
|
-
"""Authorization Flow.
|
666
|
+
"""Initiate Authorization Flow.
|
663
667
|
|
664
668
|
Initiate the authorization flow.
|
665
669
|
It will redirect to the actual OpenID server (IAM, CheckIn) to
|
@@ -719,7 +723,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
719
723
|
|
720
724
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
721
725
|
|
722
|
-
_request =
|
726
|
+
_request = build_auth_initiate_authorization_flow_request(
|
723
727
|
response_type=response_type,
|
724
728
|
code_challenge=code_challenge,
|
725
729
|
code_challenge_method=code_challenge_method,
|
@@ -755,10 +759,10 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
755
759
|
return deserialized # type: ignore
|
756
760
|
|
757
761
|
@distributed_trace_async
|
758
|
-
async def
|
762
|
+
async def complete_authorization_flow(
|
759
763
|
self, *, code: str, state: str, **kwargs: Any
|
760
764
|
) -> Any:
|
761
|
-
"""Authorization Flow
|
765
|
+
"""Complete Authorization Flow.
|
762
766
|
|
763
767
|
Complete the authorization flow.
|
764
768
|
|
@@ -789,7 +793,7 @@ class AuthOperations: # pylint: disable=abstract-class-instantiated
|
|
789
793
|
|
790
794
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
791
795
|
|
792
|
-
_request =
|
796
|
+
_request = build_auth_complete_authorization_flow_request(
|
793
797
|
code=code,
|
794
798
|
state=state,
|
795
799
|
headers=_headers,
|
@@ -1436,8 +1440,8 @@ class JobsOperations:
|
|
1436
1440
|
return deserialized # type: ignore
|
1437
1441
|
|
1438
1442
|
@distributed_trace_async
|
1439
|
-
async def
|
1440
|
-
"""Remove
|
1443
|
+
async def remove_jobs(self, *, job_ids: List[int], **kwargs: Any) -> Any:
|
1444
|
+
"""Remove Jobs.
|
1441
1445
|
|
1442
1446
|
Fully remove a list of jobs from the WMS databases.
|
1443
1447
|
|
@@ -1465,7 +1469,7 @@ class JobsOperations:
|
|
1465
1469
|
|
1466
1470
|
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1467
1471
|
|
1468
|
-
_request =
|
1472
|
+
_request = build_jobs_remove_jobs_request(
|
1469
1473
|
job_ids=job_ids,
|
1470
1474
|
headers=_headers,
|
1471
1475
|
params=_params,
|
@@ -1623,19 +1627,19 @@ class JobsOperations:
|
|
1623
1627
|
return deserialized # type: ignore
|
1624
1628
|
|
1625
1629
|
@distributed_trace_async
|
1626
|
-
async def
|
1630
|
+
async def reschedule_jobs(
|
1627
1631
|
self, *, job_ids: List[int], reset_jobs: bool = False, **kwargs: Any
|
1628
|
-
) -> Any:
|
1629
|
-
"""Reschedule
|
1632
|
+
) -> Dict[str, Any]:
|
1633
|
+
"""Reschedule Jobs.
|
1630
1634
|
|
1631
|
-
Reschedule
|
1635
|
+
Reschedule Jobs.
|
1632
1636
|
|
1633
1637
|
:keyword job_ids: Required.
|
1634
1638
|
:paramtype job_ids: list[int]
|
1635
1639
|
:keyword reset_jobs: Default value is False.
|
1636
1640
|
:paramtype reset_jobs: bool
|
1637
|
-
:return: any
|
1638
|
-
:rtype: any
|
1641
|
+
:return: dict mapping str to any
|
1642
|
+
:rtype: dict[str, any]
|
1639
1643
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1640
1644
|
"""
|
1641
1645
|
error_map: MutableMapping = {
|
@@ -1649,9 +1653,9 @@ class JobsOperations:
|
|
1649
1653
|
_headers = kwargs.pop("headers", {}) or {}
|
1650
1654
|
_params = kwargs.pop("params", {}) or {}
|
1651
1655
|
|
1652
|
-
cls: ClsType[Any] = kwargs.pop("cls", None)
|
1656
|
+
cls: ClsType[Dict[str, Any]] = kwargs.pop("cls", None)
|
1653
1657
|
|
1654
|
-
_request =
|
1658
|
+
_request = build_jobs_reschedule_jobs_request(
|
1655
1659
|
job_ids=job_ids,
|
1656
1660
|
reset_jobs=reset_jobs,
|
1657
1661
|
headers=_headers,
|
@@ -1674,13 +1678,118 @@ class JobsOperations:
|
|
1674
1678
|
)
|
1675
1679
|
raise HttpResponseError(response=response)
|
1676
1680
|
|
1677
|
-
deserialized = self._deserialize("object", pipeline_response.http_response)
|
1681
|
+
deserialized = self._deserialize("{object}", pipeline_response.http_response)
|
1678
1682
|
|
1679
1683
|
if cls:
|
1680
1684
|
return cls(pipeline_response, deserialized, {}) # type: ignore
|
1681
1685
|
|
1682
1686
|
return deserialized # type: ignore
|
1683
1687
|
|
1688
|
+
@overload
|
1689
|
+
async def patch_metadata(
|
1690
|
+
self,
|
1691
|
+
body: Dict[str, Dict[str, Any]],
|
1692
|
+
*,
|
1693
|
+
content_type: str = "application/json",
|
1694
|
+
**kwargs: Any,
|
1695
|
+
) -> None:
|
1696
|
+
"""Patch Metadata.
|
1697
|
+
|
1698
|
+
Patch Metadata.
|
1699
|
+
|
1700
|
+
:param body: Required.
|
1701
|
+
:type body: dict[str, dict[str, any]]
|
1702
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1703
|
+
Default value is "application/json".
|
1704
|
+
:paramtype content_type: str
|
1705
|
+
:return: None
|
1706
|
+
:rtype: None
|
1707
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1708
|
+
"""
|
1709
|
+
|
1710
|
+
@overload
|
1711
|
+
async def patch_metadata(
|
1712
|
+
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1713
|
+
) -> None:
|
1714
|
+
"""Patch Metadata.
|
1715
|
+
|
1716
|
+
Patch Metadata.
|
1717
|
+
|
1718
|
+
:param body: Required.
|
1719
|
+
:type body: IO[bytes]
|
1720
|
+
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1721
|
+
Default value is "application/json".
|
1722
|
+
:paramtype content_type: str
|
1723
|
+
:return: None
|
1724
|
+
:rtype: None
|
1725
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1726
|
+
"""
|
1727
|
+
|
1728
|
+
@distributed_trace_async
|
1729
|
+
async def patch_metadata(
|
1730
|
+
self, body: Union[Dict[str, Dict[str, Any]], IO[bytes]], **kwargs: Any
|
1731
|
+
) -> None:
|
1732
|
+
"""Patch Metadata.
|
1733
|
+
|
1734
|
+
Patch Metadata.
|
1735
|
+
|
1736
|
+
:param body: Is either a {str: {str: Any}} type or a IO[bytes] type. Required.
|
1737
|
+
:type body: dict[str, dict[str, any]] or IO[bytes]
|
1738
|
+
:return: None
|
1739
|
+
:rtype: None
|
1740
|
+
:raises ~azure.core.exceptions.HttpResponseError:
|
1741
|
+
"""
|
1742
|
+
error_map: MutableMapping = {
|
1743
|
+
401: ClientAuthenticationError,
|
1744
|
+
404: ResourceNotFoundError,
|
1745
|
+
409: ResourceExistsError,
|
1746
|
+
304: ResourceNotModifiedError,
|
1747
|
+
}
|
1748
|
+
error_map.update(kwargs.pop("error_map", {}) or {})
|
1749
|
+
|
1750
|
+
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
1751
|
+
_params = kwargs.pop("params", {}) or {}
|
1752
|
+
|
1753
|
+
content_type: Optional[str] = kwargs.pop(
|
1754
|
+
"content_type", _headers.pop("Content-Type", None)
|
1755
|
+
)
|
1756
|
+
cls: ClsType[None] = kwargs.pop("cls", None)
|
1757
|
+
|
1758
|
+
content_type = content_type or "application/json"
|
1759
|
+
_json = None
|
1760
|
+
_content = None
|
1761
|
+
if isinstance(body, (IOBase, bytes)):
|
1762
|
+
_content = body
|
1763
|
+
else:
|
1764
|
+
_json = self._serialize.body(body, "{{object}}")
|
1765
|
+
|
1766
|
+
_request = build_jobs_patch_metadata_request(
|
1767
|
+
content_type=content_type,
|
1768
|
+
json=_json,
|
1769
|
+
content=_content,
|
1770
|
+
headers=_headers,
|
1771
|
+
params=_params,
|
1772
|
+
)
|
1773
|
+
_request.url = self._client.format_url(_request.url)
|
1774
|
+
|
1775
|
+
_stream = False
|
1776
|
+
pipeline_response: PipelineResponse = (
|
1777
|
+
await self._client._pipeline.run( # pylint: disable=protected-access
|
1778
|
+
_request, stream=_stream, **kwargs
|
1779
|
+
)
|
1780
|
+
)
|
1781
|
+
|
1782
|
+
response = pipeline_response.http_response
|
1783
|
+
|
1784
|
+
if response.status_code not in [204]:
|
1785
|
+
map_error(
|
1786
|
+
status_code=response.status_code, response=response, error_map=error_map
|
1787
|
+
)
|
1788
|
+
raise HttpResponseError(response=response)
|
1789
|
+
|
1790
|
+
if cls:
|
1791
|
+
return cls(pipeline_response, None, {}) # type: ignore
|
1792
|
+
|
1684
1793
|
@overload
|
1685
1794
|
async def search(
|
1686
1795
|
self,
|
@@ -1690,7 +1799,7 @@ class JobsOperations:
|
|
1690
1799
|
per_page: int = 100,
|
1691
1800
|
content_type: str = "application/json",
|
1692
1801
|
**kwargs: Any,
|
1693
|
-
) -> List[
|
1802
|
+
) -> List[Dict[str, Any]]:
|
1694
1803
|
"""Search.
|
1695
1804
|
|
1696
1805
|
Retrieve information about jobs.
|
@@ -1706,8 +1815,8 @@ class JobsOperations:
|
|
1706
1815
|
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
1707
1816
|
Default value is "application/json".
|
1708
1817
|
:paramtype content_type: str
|
1709
|
-
:return: list of
|
1710
|
-
:rtype: list[
|
1818
|
+
:return: list of dict mapping str to any
|
1819
|
+
:rtype: list[dict[str, any]]
|
1711
1820
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1712
1821
|
"""
|
1713
1822
|
|
@@ -1720,7 +1829,7 @@ class JobsOperations:
|
|
1720
1829
|
per_page: int = 100,
|
1721
1830
|
content_type: str = "application/json",
|
1722
1831
|
**kwargs: Any,
|
1723
|
-
) -> List[
|
1832
|
+
) -> List[Dict[str, Any]]:
|
1724
1833
|
"""Search.
|
1725
1834
|
|
1726
1835
|
Retrieve information about jobs.
|
@@ -1736,8 +1845,8 @@ class JobsOperations:
|
|
1736
1845
|
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
1737
1846
|
Default value is "application/json".
|
1738
1847
|
:paramtype content_type: str
|
1739
|
-
:return: list of
|
1740
|
-
:rtype: list[
|
1848
|
+
:return: list of dict mapping str to any
|
1849
|
+
:rtype: list[dict[str, any]]
|
1741
1850
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1742
1851
|
"""
|
1743
1852
|
|
@@ -1749,7 +1858,7 @@ class JobsOperations:
|
|
1749
1858
|
page: int = 1,
|
1750
1859
|
per_page: int = 100,
|
1751
1860
|
**kwargs: Any,
|
1752
|
-
) -> List[
|
1861
|
+
) -> List[Dict[str, Any]]:
|
1753
1862
|
"""Search.
|
1754
1863
|
|
1755
1864
|
Retrieve information about jobs.
|
@@ -1762,8 +1871,8 @@ class JobsOperations:
|
|
1762
1871
|
:paramtype page: int
|
1763
1872
|
:keyword per_page: Default value is 100.
|
1764
1873
|
:paramtype per_page: int
|
1765
|
-
:return: list of
|
1766
|
-
:rtype: list[
|
1874
|
+
:return: list of dict mapping str to any
|
1875
|
+
:rtype: list[dict[str, any]]
|
1767
1876
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1768
1877
|
"""
|
1769
1878
|
error_map: MutableMapping = {
|
@@ -1780,7 +1889,7 @@ class JobsOperations:
|
|
1780
1889
|
content_type: Optional[str] = kwargs.pop(
|
1781
1890
|
"content_type", _headers.pop("Content-Type", None)
|
1782
1891
|
)
|
1783
|
-
cls: ClsType[List[
|
1892
|
+
cls: ClsType[List[Dict[str, Any]]] = kwargs.pop("cls", None)
|
1784
1893
|
|
1785
1894
|
content_type = content_type or "application/json"
|
1786
1895
|
_json = None
|
@@ -1825,7 +1934,7 @@ class JobsOperations:
|
|
1825
1934
|
"str", response.headers.get("Content-Range")
|
1826
1935
|
)
|
1827
1936
|
|
1828
|
-
deserialized = self._deserialize("[object]", pipeline_response.http_response)
|
1937
|
+
deserialized = self._deserialize("[{object}]", pipeline_response.http_response)
|
1829
1938
|
|
1830
1939
|
if cls:
|
1831
1940
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -1942,12 +2051,12 @@ class JobsOperations:
|
|
1942
2051
|
return deserialized # type: ignore
|
1943
2052
|
|
1944
2053
|
@overload
|
1945
|
-
async def
|
2054
|
+
async def submit_jdl_jobs(
|
1946
2055
|
self, body: List[str], *, content_type: str = "application/json", **kwargs: Any
|
1947
2056
|
) -> List[_models.InsertedJob]:
|
1948
|
-
"""Submit
|
2057
|
+
"""Submit Jdl Jobs.
|
1949
2058
|
|
1950
|
-
Submit
|
2059
|
+
Submit a list of jobs in JDL format.
|
1951
2060
|
|
1952
2061
|
:param body: Required.
|
1953
2062
|
:type body: list[str]
|
@@ -1960,12 +2069,12 @@ class JobsOperations:
|
|
1960
2069
|
"""
|
1961
2070
|
|
1962
2071
|
@overload
|
1963
|
-
async def
|
2072
|
+
async def submit_jdl_jobs(
|
1964
2073
|
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
|
1965
2074
|
) -> List[_models.InsertedJob]:
|
1966
|
-
"""Submit
|
2075
|
+
"""Submit Jdl Jobs.
|
1967
2076
|
|
1968
|
-
Submit
|
2077
|
+
Submit a list of jobs in JDL format.
|
1969
2078
|
|
1970
2079
|
:param body: Required.
|
1971
2080
|
:type body: IO[bytes]
|
@@ -1978,12 +2087,12 @@ class JobsOperations:
|
|
1978
2087
|
"""
|
1979
2088
|
|
1980
2089
|
@distributed_trace_async
|
1981
|
-
async def
|
2090
|
+
async def submit_jdl_jobs(
|
1982
2091
|
self, body: Union[List[str], IO[bytes]], **kwargs: Any
|
1983
2092
|
) -> List[_models.InsertedJob]:
|
1984
|
-
"""Submit
|
2093
|
+
"""Submit Jdl Jobs.
|
1985
2094
|
|
1986
|
-
Submit
|
2095
|
+
Submit a list of jobs in JDL format.
|
1987
2096
|
|
1988
2097
|
:param body: Is either a [str] type or a IO[bytes] type. Required.
|
1989
2098
|
:type body: list[str] or IO[bytes]
|
@@ -2015,7 +2124,7 @@ class JobsOperations:
|
|
2015
2124
|
else:
|
2016
2125
|
_json = self._serialize.body(body, "[str]")
|
2017
2126
|
|
2018
|
-
_request =
|
2127
|
+
_request = build_jobs_submit_jdl_jobs_request(
|
2019
2128
|
content_type=content_type,
|
2020
2129
|
json=_json,
|
2021
2130
|
content=_content,
|
@@ -8,7 +8,7 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python
|
|
8
8
|
"""
|
9
9
|
import io
|
10
10
|
import json
|
11
|
-
from typing import Any, List
|
11
|
+
from typing import Any, Dict, List
|
12
12
|
|
13
13
|
from azure.core.rest import HttpRequest
|
14
14
|
from azure.core.exceptions import map_error, HttpResponseError
|
@@ -21,7 +21,6 @@ from ._operations import (
|
|
21
21
|
AuthOperations as AuthOperationsGenerated,
|
22
22
|
JobsOperations as JobsOperationsGenerated,
|
23
23
|
_models,
|
24
|
-
JSON,
|
25
24
|
)
|
26
25
|
|
27
26
|
__all__: List[str] = [
|
@@ -54,7 +53,7 @@ def build_token_request(**kwargs: Any) -> HttpRequest:
|
|
54
53
|
|
55
54
|
class AuthOperations(AuthOperationsGenerated):
|
56
55
|
@distributed_trace_async
|
57
|
-
async def
|
56
|
+
async def get_oidc_token(
|
58
57
|
self, device_code: str, client_id: str, **kwargs
|
59
58
|
) -> _models.TokenResponse | _models.DeviceFlowErrorResponse:
|
60
59
|
request = build_token_request(
|
@@ -93,7 +92,7 @@ class JobsOperations(JobsOperationsGenerated):
|
|
93
92
|
search: list[str] | None = None,
|
94
93
|
sort: list[str] | None = None,
|
95
94
|
**kwargs: Any,
|
96
|
-
) -> List[
|
95
|
+
) -> List[Dict[str, Any]]:
|
97
96
|
"""TODO"""
|
98
97
|
body = {}
|
99
98
|
if parameters is not None:
|
@@ -114,7 +113,7 @@ class JobsOperations(JobsOperationsGenerated):
|
|
114
113
|
grouping: list[str] | None = None,
|
115
114
|
search: list[str] | None = None,
|
116
115
|
**kwargs: Any,
|
117
|
-
) -> List[
|
116
|
+
) -> List[Dict[str, Any]]:
|
118
117
|
"""TODO"""
|
119
118
|
body = {}
|
120
119
|
if grouping is not None:
|