diracx-client 0.0.1a15__tar.gz → 0.0.1a16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/PKG-INFO +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/__init__.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/_client.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/_configuration.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/_patch.py +21 -5
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/_vendor.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/__init__.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/_client.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/_configuration.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/_patch.py +12 -3
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/_vendor.py +1 -1
- {diracx_client-0.0.1a15/src/diracx/client → diracx_client-0.0.1a16/src/diracx/client/aio}/operations/__init__.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/operations/_operations.py +19 -10
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/models/__init__.py +3 -7
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/models/_enums.py +8 -13
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/models/_models.py +11 -11
- {diracx_client-0.0.1a15/src/diracx/client/aio → diracx_client-0.0.1a16/src/diracx/client}/operations/__init__.py +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/operations/_operations.py +20 -11
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/PKG-INFO +1 -1
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/README.md +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/pyproject.toml +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/setup.cfg +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/_serialization.py +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/operations/_patch.py +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/models/_patch.py +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/operations/_patch.py +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/py.typed +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/SOURCES.txt +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/dependency_links.txt +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/requires.txt +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/top_level.txt +0 -0
- {diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/tests/test_regenerate.py +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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -8,8 +8,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python
|
|
8
8
|
"""
|
9
9
|
from __future__ import annotations
|
10
10
|
|
11
|
-
from datetime import datetime
|
11
|
+
from datetime import datetime, timezone
|
12
12
|
import json
|
13
|
+
import jwt
|
13
14
|
import requests
|
14
15
|
|
15
16
|
from pathlib import Path
|
@@ -113,9 +114,12 @@ class DiracBearerTokenCredentialPolicy(BearerTokenCredentialPolicy):
|
|
113
114
|
|
114
115
|
if not self._token:
|
115
116
|
credentials = json.loads(self._credential.location.read_text())
|
116
|
-
|
117
|
-
|
118
|
-
|
117
|
+
refresh_token = credentials["refresh_token"]
|
118
|
+
if not is_refresh_token_valid(refresh_token):
|
119
|
+
# If we are here, it means the refresh token is not valid anymore
|
120
|
+
# we suppose it is not needed to perform the request
|
121
|
+
return
|
122
|
+
self._token = self._credential.get_token("", refresh_token=refresh_token)
|
119
123
|
|
120
124
|
request.http_request.headers["Authorization"] = f"Bearer {self._token.token}"
|
121
125
|
|
@@ -242,8 +246,20 @@ def get_token(location: Path, token: AccessToken | None) -> AccessToken | None:
|
|
242
246
|
return token
|
243
247
|
|
244
248
|
|
249
|
+
def is_refresh_token_valid(refresh_token: str) -> bool:
|
250
|
+
"""Check if the refresh token is still valid."""
|
251
|
+
# Decode the refresh token
|
252
|
+
refresh_payload = jwt.decode(refresh_token, options={"verify_signature": False})
|
253
|
+
if not refresh_payload or "exp" not in refresh_payload:
|
254
|
+
return False
|
255
|
+
|
256
|
+
# Check the expiration time
|
257
|
+
return refresh_payload["exp"] > datetime.now(tz=timezone.utc).timestamp()
|
258
|
+
|
259
|
+
|
245
260
|
def is_token_valid(token: AccessToken) -> bool:
|
246
261
|
"""Condition to get a new token"""
|
247
262
|
return (
|
248
|
-
datetime.
|
263
|
+
datetime.fromtimestamp(token.expires_on, tz=timezone.utc)
|
264
|
+
- datetime.now(tz=timezone.utc)
|
249
265
|
).total_seconds() > 300
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# --------------------------------------------------------------------------
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -18,7 +18,12 @@ from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy
|
|
18
18
|
from diracx.core.preferences import get_diracx_preferences, DiracxPreferences
|
19
19
|
|
20
20
|
from ._client import Dirac as DiracGenerated
|
21
|
-
from .._patch import
|
21
|
+
from .._patch import (
|
22
|
+
get_openid_configuration,
|
23
|
+
get_token,
|
24
|
+
refresh_token,
|
25
|
+
is_refresh_token_valid,
|
26
|
+
)
|
22
27
|
|
23
28
|
__all__: List[str] = [
|
24
29
|
"DiracClient",
|
@@ -114,7 +119,6 @@ class DiracBearerTokenCredentialPolicy(AsyncBearerTokenCredentialPolicy):
|
|
114
119
|
self._token: AccessToken | None
|
115
120
|
self._credential: DiracTokenCredential
|
116
121
|
credentials: dict[str, Any]
|
117
|
-
|
118
122
|
try:
|
119
123
|
self._token = get_token(self._credential.location, self._token)
|
120
124
|
except RuntimeError:
|
@@ -124,8 +128,13 @@ class DiracBearerTokenCredentialPolicy(AsyncBearerTokenCredentialPolicy):
|
|
124
128
|
|
125
129
|
if not self._token:
|
126
130
|
credentials = json.loads(self._credential.location.read_text())
|
131
|
+
refresh_token = credentials["refresh_token"]
|
132
|
+
if not is_refresh_token_valid(refresh_token):
|
133
|
+
# If we are here, it means the refresh token is not valid anymore
|
134
|
+
# we suppose it is not needed to perform the request
|
135
|
+
return
|
127
136
|
self._token = await self._credential.get_token(
|
128
|
-
"", refresh_token=
|
137
|
+
"", refresh_token=refresh_token
|
129
138
|
)
|
130
139
|
|
131
140
|
request.http_request.headers["Authorization"] = f"Bearer {self._token.token}"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# --------------------------------------------------------------------------
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
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.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
{diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/operations/_operations.py
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
4
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
from io import IOBase
|
@@ -2072,7 +2072,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2072
2072
|
self,
|
2073
2073
|
body: Optional[_models.JobSearchParams] = None,
|
2074
2074
|
*,
|
2075
|
-
page: int =
|
2075
|
+
page: int = 1,
|
2076
2076
|
per_page: int = 100,
|
2077
2077
|
content_type: str = "application/json",
|
2078
2078
|
**kwargs: Any,
|
@@ -2085,7 +2085,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2085
2085
|
|
2086
2086
|
:param body: Default value is None.
|
2087
2087
|
:type body: ~client.models.JobSearchParams
|
2088
|
-
:keyword page: Default value is
|
2088
|
+
:keyword page: Default value is 1.
|
2089
2089
|
:paramtype page: int
|
2090
2090
|
:keyword per_page: Default value is 100.
|
2091
2091
|
:paramtype per_page: int
|
@@ -2102,7 +2102,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2102
2102
|
self,
|
2103
2103
|
body: Optional[IO[bytes]] = None,
|
2104
2104
|
*,
|
2105
|
-
page: int =
|
2105
|
+
page: int = 1,
|
2106
2106
|
per_page: int = 100,
|
2107
2107
|
content_type: str = "application/json",
|
2108
2108
|
**kwargs: Any,
|
@@ -2115,7 +2115,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2115
2115
|
|
2116
2116
|
:param body: Default value is None.
|
2117
2117
|
:type body: IO[bytes]
|
2118
|
-
:keyword page: Default value is
|
2118
|
+
:keyword page: Default value is 1.
|
2119
2119
|
:paramtype page: int
|
2120
2120
|
:keyword per_page: Default value is 100.
|
2121
2121
|
:paramtype per_page: int
|
@@ -2132,7 +2132,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2132
2132
|
self,
|
2133
2133
|
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
|
2134
2134
|
*,
|
2135
|
-
page: int =
|
2135
|
+
page: int = 1,
|
2136
2136
|
per_page: int = 100,
|
2137
2137
|
**kwargs: Any,
|
2138
2138
|
) -> List[JSON]:
|
@@ -2144,7 +2144,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2144
2144
|
|
2145
2145
|
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
|
2146
2146
|
:type body: ~client.models.JobSearchParams or IO[bytes]
|
2147
|
-
:keyword page: Default value is
|
2147
|
+
:keyword page: Default value is 1.
|
2148
2148
|
:paramtype page: int
|
2149
2149
|
:keyword per_page: Default value is 100.
|
2150
2150
|
:paramtype per_page: int
|
@@ -2199,7 +2199,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2199
2199
|
|
2200
2200
|
response = pipeline_response.http_response
|
2201
2201
|
|
2202
|
-
if response.status_code not in [200]:
|
2202
|
+
if response.status_code not in [200, 206]:
|
2203
2203
|
if _stream:
|
2204
2204
|
await response.read() # Load the body in memory and close the socket
|
2205
2205
|
map_error(
|
@@ -2207,10 +2207,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2207
2207
|
)
|
2208
2208
|
raise HttpResponseError(response=response)
|
2209
2209
|
|
2210
|
-
|
2210
|
+
response_headers = {}
|
2211
|
+
if response.status_code == 200:
|
2212
|
+
deserialized = self._deserialize("[object]", pipeline_response)
|
2213
|
+
|
2214
|
+
if response.status_code == 206:
|
2215
|
+
response_headers["Content-Range"] = self._deserialize(
|
2216
|
+
"str", response.headers.get("Content-Range")
|
2217
|
+
)
|
2218
|
+
|
2219
|
+
deserialized = self._deserialize("[object]", pipeline_response)
|
2211
2220
|
|
2212
2221
|
if cls:
|
2213
|
-
return cls(pipeline_response, deserialized,
|
2222
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
2214
2223
|
|
2215
2224
|
return deserialized # type: ignore
|
2216
2225
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -25,7 +25,6 @@ from ._models import ScalarSearchSpec
|
|
25
25
|
from ._models import ScalarSearchSpecValue
|
26
26
|
from ._models import SetJobStatusReturn
|
27
27
|
from ._models import SortSpec
|
28
|
-
from ._models import SortSpecDirection
|
29
28
|
from ._models import SupportInfo
|
30
29
|
from ._models import TokenResponse
|
31
30
|
from ._models import UserInfoResponse
|
@@ -38,8 +37,6 @@ from ._models import VectorSearchSpecValues
|
|
38
37
|
from ._enums import ChecksumAlgorithm
|
39
38
|
from ._enums import Enum0
|
40
39
|
from ._enums import Enum1
|
41
|
-
from ._enums import Enum11
|
42
|
-
from ._enums import Enum12
|
43
40
|
from ._enums import Enum2
|
44
41
|
from ._enums import Enum3
|
45
42
|
from ._enums import Enum4
|
@@ -47,6 +44,7 @@ from ._enums import JobStatus
|
|
47
44
|
from ._enums import SandboxFormat
|
48
45
|
from ._enums import SandboxType
|
49
46
|
from ._enums import ScalarSearchOperator
|
47
|
+
from ._enums import SortDirection
|
50
48
|
from ._enums import VectorSearchOperator
|
51
49
|
from ._patch import __all__ as _patch_all
|
52
50
|
from ._patch import * # pylint: disable=unused-wildcard-import
|
@@ -74,7 +72,6 @@ __all__ = [
|
|
74
72
|
"ScalarSearchSpecValue",
|
75
73
|
"SetJobStatusReturn",
|
76
74
|
"SortSpec",
|
77
|
-
"SortSpecDirection",
|
78
75
|
"SupportInfo",
|
79
76
|
"TokenResponse",
|
80
77
|
"UserInfoResponse",
|
@@ -86,8 +83,6 @@ __all__ = [
|
|
86
83
|
"ChecksumAlgorithm",
|
87
84
|
"Enum0",
|
88
85
|
"Enum1",
|
89
|
-
"Enum11",
|
90
|
-
"Enum12",
|
91
86
|
"Enum2",
|
92
87
|
"Enum3",
|
93
88
|
"Enum4",
|
@@ -95,6 +90,7 @@ __all__ = [
|
|
95
90
|
"SandboxFormat",
|
96
91
|
"SandboxType",
|
97
92
|
"ScalarSearchOperator",
|
93
|
+
"SortDirection",
|
98
94
|
"VectorSearchOperator",
|
99
95
|
]
|
100
96
|
__all__.extend([p for p in _patch_all if p not in __all__])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
@@ -26,18 +26,6 @@ class Enum1(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
26
26
|
S256 = "S256"
|
27
27
|
|
28
28
|
|
29
|
-
class Enum11(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
30
|
-
"""Enum11."""
|
31
|
-
|
32
|
-
ASC = "asc"
|
33
|
-
|
34
|
-
|
35
|
-
class Enum12(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
36
|
-
"""Enum12."""
|
37
|
-
|
38
|
-
DSC = "dsc"
|
39
|
-
|
40
|
-
|
41
29
|
class Enum2(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
42
30
|
"""Enum2."""
|
43
31
|
|
@@ -101,6 +89,13 @@ class ScalarSearchOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
|
101
89
|
LIKE = "like"
|
102
90
|
|
103
91
|
|
92
|
+
class SortDirection(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
93
|
+
"""An enumeration."""
|
94
|
+
|
95
|
+
ASC = "asc"
|
96
|
+
DESC = "desc"
|
97
|
+
|
98
|
+
|
104
99
|
class VectorSearchOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta):
|
105
100
|
"""An enumeration."""
|
106
101
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# pylint: disable=too-many-lines
|
3
3
|
# --------------------------------------------------------------------------
|
4
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
4
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
|
@@ -816,8 +816,8 @@ class SortSpec(_serialization.Model):
|
|
816
816
|
|
817
817
|
:ivar parameter: Parameter. Required.
|
818
818
|
:vartype parameter: str
|
819
|
-
:ivar direction:
|
820
|
-
:vartype direction: ~client.models.
|
819
|
+
:ivar direction: An enumeration. Required. Known values are: "asc" and "desc".
|
820
|
+
:vartype direction: str or ~client.models.SortDirection
|
821
821
|
"""
|
822
822
|
|
823
823
|
_validation = {
|
@@ -827,27 +827,27 @@ class SortSpec(_serialization.Model):
|
|
827
827
|
|
828
828
|
_attribute_map = {
|
829
829
|
"parameter": {"key": "parameter", "type": "str"},
|
830
|
-
"direction": {"key": "direction", "type": "
|
830
|
+
"direction": {"key": "direction", "type": "str"},
|
831
831
|
}
|
832
832
|
|
833
833
|
def __init__(
|
834
|
-
self,
|
834
|
+
self,
|
835
|
+
*,
|
836
|
+
parameter: str,
|
837
|
+
direction: Union[str, "_models.SortDirection"],
|
838
|
+
**kwargs: Any,
|
835
839
|
) -> None:
|
836
840
|
"""
|
837
841
|
:keyword parameter: Parameter. Required.
|
838
842
|
:paramtype parameter: str
|
839
|
-
:keyword direction:
|
840
|
-
:paramtype direction: ~client.models.
|
843
|
+
:keyword direction: An enumeration. Required. Known values are: "asc" and "desc".
|
844
|
+
:paramtype direction: str or ~client.models.SortDirection
|
841
845
|
"""
|
842
846
|
super().__init__(**kwargs)
|
843
847
|
self.parameter = parameter
|
844
848
|
self.direction = direction
|
845
849
|
|
846
850
|
|
847
|
-
class SortSpecDirection(_serialization.Model):
|
848
|
-
"""Direction."""
|
849
|
-
|
850
|
-
|
851
851
|
class SupportInfo(_serialization.Model):
|
852
852
|
"""SupportInfo.
|
853
853
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding=utf-8
|
2
2
|
# --------------------------------------------------------------------------
|
3
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
3
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
4
4
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
5
5
|
# --------------------------------------------------------------------------
|
6
6
|
|
{diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/operations/_operations.py
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
|
-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.
|
4
|
+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/python@6.13.17)
|
5
5
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
6
6
|
# --------------------------------------------------------------------------
|
7
7
|
from io import IOBase
|
@@ -672,7 +672,7 @@ def build_jobs_reschedule_single_job_request(job_id: int, **kwargs: Any) -> Http
|
|
672
672
|
|
673
673
|
|
674
674
|
def build_jobs_search_request(
|
675
|
-
*, page: int =
|
675
|
+
*, page: int = 1, per_page: int = 100, **kwargs: Any
|
676
676
|
) -> HttpRequest:
|
677
677
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
678
678
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
@@ -2894,7 +2894,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2894
2894
|
self,
|
2895
2895
|
body: Optional[_models.JobSearchParams] = None,
|
2896
2896
|
*,
|
2897
|
-
page: int =
|
2897
|
+
page: int = 1,
|
2898
2898
|
per_page: int = 100,
|
2899
2899
|
content_type: str = "application/json",
|
2900
2900
|
**kwargs: Any,
|
@@ -2907,7 +2907,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2907
2907
|
|
2908
2908
|
:param body: Default value is None.
|
2909
2909
|
:type body: ~client.models.JobSearchParams
|
2910
|
-
:keyword page: Default value is
|
2910
|
+
:keyword page: Default value is 1.
|
2911
2911
|
:paramtype page: int
|
2912
2912
|
:keyword per_page: Default value is 100.
|
2913
2913
|
:paramtype per_page: int
|
@@ -2924,7 +2924,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2924
2924
|
self,
|
2925
2925
|
body: Optional[IO[bytes]] = None,
|
2926
2926
|
*,
|
2927
|
-
page: int =
|
2927
|
+
page: int = 1,
|
2928
2928
|
per_page: int = 100,
|
2929
2929
|
content_type: str = "application/json",
|
2930
2930
|
**kwargs: Any,
|
@@ -2937,7 +2937,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2937
2937
|
|
2938
2938
|
:param body: Default value is None.
|
2939
2939
|
:type body: IO[bytes]
|
2940
|
-
:keyword page: Default value is
|
2940
|
+
:keyword page: Default value is 1.
|
2941
2941
|
:paramtype page: int
|
2942
2942
|
:keyword per_page: Default value is 100.
|
2943
2943
|
:paramtype per_page: int
|
@@ -2954,7 +2954,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2954
2954
|
self,
|
2955
2955
|
body: Optional[Union[_models.JobSearchParams, IO[bytes]]] = None,
|
2956
2956
|
*,
|
2957
|
-
page: int =
|
2957
|
+
page: int = 1,
|
2958
2958
|
per_page: int = 100,
|
2959
2959
|
**kwargs: Any,
|
2960
2960
|
) -> List[JSON]:
|
@@ -2966,7 +2966,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
2966
2966
|
|
2967
2967
|
:param body: Is either a JobSearchParams type or a IO[bytes] type. Default value is None.
|
2968
2968
|
:type body: ~client.models.JobSearchParams or IO[bytes]
|
2969
|
-
:keyword page: Default value is
|
2969
|
+
:keyword page: Default value is 1.
|
2970
2970
|
:paramtype page: int
|
2971
2971
|
:keyword per_page: Default value is 100.
|
2972
2972
|
:paramtype per_page: int
|
@@ -3021,7 +3021,7 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
3021
3021
|
|
3022
3022
|
response = pipeline_response.http_response
|
3023
3023
|
|
3024
|
-
if response.status_code not in [200]:
|
3024
|
+
if response.status_code not in [200, 206]:
|
3025
3025
|
if _stream:
|
3026
3026
|
response.read() # Load the body in memory and close the socket
|
3027
3027
|
map_error(
|
@@ -3029,10 +3029,19 @@ class JobsOperations: # pylint: disable=too-many-public-methods
|
|
3029
3029
|
)
|
3030
3030
|
raise HttpResponseError(response=response)
|
3031
3031
|
|
3032
|
-
|
3032
|
+
response_headers = {}
|
3033
|
+
if response.status_code == 200:
|
3034
|
+
deserialized = self._deserialize("[object]", pipeline_response)
|
3035
|
+
|
3036
|
+
if response.status_code == 206:
|
3037
|
+
response_headers["Content-Range"] = self._deserialize(
|
3038
|
+
"str", response.headers.get("Content-Range")
|
3039
|
+
)
|
3040
|
+
|
3041
|
+
deserialized = self._deserialize("[object]", pipeline_response)
|
3033
3042
|
|
3034
3043
|
if cls:
|
3035
|
-
return cls(pipeline_response, deserialized,
|
3044
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
3036
3045
|
|
3037
3046
|
return deserialized # type: ignore
|
3038
3047
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx/client/aio/operations/_patch.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{diracx_client-0.0.1a15 → diracx_client-0.0.1a16}/src/diracx_client.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|