Skip to content

Commit c2181aa

Browse files
fix: Chunky client
1 parent d374ec6 commit c2181aa

File tree

11 files changed

+114
-579
lines changed

11 files changed

+114
-579
lines changed

diracx-client/src/diracx/client/_generated/_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
AuthOperations,
2020
ConfigOperations,
2121
JobsOperations,
22-
LollygagOperations,
2322
WellKnownOperations,
2423
)
2524

@@ -35,8 +34,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3534
:vartype config: _generated.operations.ConfigOperations
3635
:ivar jobs: JobsOperations operations
3736
:vartype jobs: _generated.operations.JobsOperations
38-
:ivar lollygag: LollygagOperations operations
39-
:vartype lollygag: _generated.operations.LollygagOperations
4037
:keyword endpoint: Service URL. Required. Default value is "".
4138
:paramtype endpoint: str
4239
"""
@@ -89,9 +86,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
8986
self.jobs = JobsOperations(
9087
self._client, self._config, self._serialize, self._deserialize
9188
)
92-
self.lollygag = LollygagOperations(
93-
self._client, self._config, self._serialize, self._deserialize
94-
)
9589

9690
def send_request(
9791
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any

diracx-client/src/diracx/client/_generated/aio/_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
AuthOperations,
2020
ConfigOperations,
2121
JobsOperations,
22-
LollygagOperations,
2322
WellKnownOperations,
2423
)
2524

@@ -35,8 +34,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3534
:vartype config: _generated.aio.operations.ConfigOperations
3635
:ivar jobs: JobsOperations operations
3736
:vartype jobs: _generated.aio.operations.JobsOperations
38-
:ivar lollygag: LollygagOperations operations
39-
:vartype lollygag: _generated.aio.operations.LollygagOperations
4037
:keyword endpoint: Service URL. Required. Default value is "".
4138
:paramtype endpoint: str
4239
"""
@@ -89,9 +86,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
8986
self.jobs = JobsOperations(
9087
self._client, self._config, self._serialize, self._deserialize
9188
)
92-
self.lollygag = LollygagOperations(
93-
self._client, self._config, self._serialize, self._deserialize
94-
)
9589

9690
def send_request(
9791
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any

diracx-client/src/diracx/client/_generated/aio/operations/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._operations import AuthOperations # type: ignore
1515
from ._operations import ConfigOperations # type: ignore
1616
from ._operations import JobsOperations # type: ignore
17-
from ._operations import LollygagOperations # type: ignore
1817

1918
from ._patch import __all__ as _patch_all
2019
from ._patch import *
@@ -25,7 +24,6 @@
2524
"AuthOperations",
2625
"ConfigOperations",
2726
"JobsOperations",
28-
"LollygagOperations",
2927
]
3028
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
3129
_patch_sdk()

diracx-client/src/diracx/client/_generated/aio/operations/_operations.py

Lines changed: 8 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
build_jobs_summary_request,
5757
build_jobs_unassign_bulk_jobs_sandboxes_request,
5858
build_jobs_unassign_job_sandboxes_request,
59-
build_lollygag_get_gubbins_secrets_request,
60-
build_lollygag_get_owner_object_request,
61-
build_lollygag_insert_owner_object_request,
6259
build_well_known_get_installation_metadata_request,
6360
build_well_known_get_jwks_request,
6461
build_well_known_get_openid_configuration_request,
@@ -208,10 +205,10 @@ async def get_jwks(self, **kwargs: Any) -> Dict[str, Any]:
208205
async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
209206
"""Get Installation Metadata.
210207
211-
Get Installation Metadata.
208+
Get metadata about the dirac installation.
212209
213-
:return: ExtendedMetadata
214-
:rtype: ~_generated.models.ExtendedMetadata
210+
:return: Metadata
211+
:rtype: ~_generated.models.Metadata
215212
:raises ~azure.core.exceptions.HttpResponseError:
216213
"""
217214
error_map: MutableMapping = {
@@ -225,7 +222,7 @@ async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
225222
_headers = kwargs.pop("headers", {}) or {}
226223
_params = kwargs.pop("params", {}) or {}
227224

228-
cls: ClsType[_models.ExtendedMetadata] = kwargs.pop("cls", None)
225+
cls: ClsType[_models.Metadata] = kwargs.pop("cls", None)
229226

230227
_request = build_well_known_get_installation_metadata_request(
231228
headers=_headers,
@@ -248,9 +245,7 @@ async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
248245
)
249246
raise HttpResponseError(response=response)
250247

251-
deserialized = self._deserialize(
252-
"ExtendedMetadata", pipeline_response.http_response
253-
)
248+
deserialized = self._deserialize("Metadata", pipeline_response.http_response)
254249

255250
if cls:
256251
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -1175,7 +1170,7 @@ async def register_new_pilots_to_db(
11751170
Endpoint where a you can create pilots with their references.
11761171
It will return the pilot secrets as well as an expiration date.
11771172
1178-
If a pilot reference already exists, it will block the insertion.
1173+
If a pilot stamp already exists, it will block the insertion.
11791174
11801175
:param body: Required.
11811176
:type body: ~_generated.models.BodyAuthRegisterNewPilotsToDb
@@ -1196,7 +1191,7 @@ async def register_new_pilots_to_db(
11961191
Endpoint where a you can create pilots with their references.
11971192
It will return the pilot secrets as well as an expiration date.
11981193
1199-
If a pilot reference already exists, it will block the insertion.
1194+
If a pilot stamp already exists, it will block the insertion.
12001195
12011196
:param body: Required.
12021197
:type body: IO[bytes]
@@ -1219,7 +1214,7 @@ async def register_new_pilots_to_db(
12191214
Endpoint where a you can create pilots with their references.
12201215
It will return the pilot secrets as well as an expiration date.
12211216
1222-
If a pilot reference already exists, it will block the insertion.
1217+
If a pilot stamp already exists, it will block the insertion.
12231218
12241219
:param body: Is either a BodyAuthRegisterNewPilotsToDb type or a IO[bytes] type. Required.
12251220
:type body: ~_generated.models.BodyAuthRegisterNewPilotsToDb or IO[bytes]
@@ -2746,187 +2741,3 @@ async def submit_jdl_jobs(
27462741
return cls(pipeline_response, deserialized, {}) # type: ignore
27472742

27482743
return deserialized # type: ignore
2749-
2750-
2751-
class LollygagOperations:
2752-
"""
2753-
.. warning::
2754-
**DO NOT** instantiate this class directly.
2755-
2756-
Instead, you should access the following operations through
2757-
:class:`~_generated.aio.Dirac`'s
2758-
:attr:`lollygag` attribute.
2759-
"""
2760-
2761-
models = _models
2762-
2763-
def __init__(self, *args, **kwargs) -> None:
2764-
input_args = list(args)
2765-
self._client: AsyncPipelineClient = (
2766-
input_args.pop(0) if input_args else kwargs.pop("client")
2767-
)
2768-
self._config: DiracConfiguration = (
2769-
input_args.pop(0) if input_args else kwargs.pop("config")
2770-
)
2771-
self._serialize: Serializer = (
2772-
input_args.pop(0) if input_args else kwargs.pop("serializer")
2773-
)
2774-
self._deserialize: Deserializer = (
2775-
input_args.pop(0) if input_args else kwargs.pop("deserializer")
2776-
)
2777-
2778-
@distributed_trace_async
2779-
async def insert_owner_object(self, owner_name: str, **kwargs: Any) -> Any:
2780-
"""Insert Owner Object.
2781-
2782-
Insert Owner Object.
2783-
2784-
:param owner_name: Required.
2785-
:type owner_name: str
2786-
:return: any
2787-
:rtype: any
2788-
:raises ~azure.core.exceptions.HttpResponseError:
2789-
"""
2790-
error_map: MutableMapping = {
2791-
401: ClientAuthenticationError,
2792-
404: ResourceNotFoundError,
2793-
409: ResourceExistsError,
2794-
304: ResourceNotModifiedError,
2795-
}
2796-
error_map.update(kwargs.pop("error_map", {}) or {})
2797-
2798-
_headers = kwargs.pop("headers", {}) or {}
2799-
_params = kwargs.pop("params", {}) or {}
2800-
2801-
cls: ClsType[Any] = kwargs.pop("cls", None)
2802-
2803-
_request = build_lollygag_insert_owner_object_request(
2804-
owner_name=owner_name,
2805-
headers=_headers,
2806-
params=_params,
2807-
)
2808-
_request.url = self._client.format_url(_request.url)
2809-
2810-
_stream = False
2811-
pipeline_response: PipelineResponse = (
2812-
await self._client._pipeline.run( # pylint: disable=protected-access
2813-
_request, stream=_stream, **kwargs
2814-
)
2815-
)
2816-
2817-
response = pipeline_response.http_response
2818-
2819-
if response.status_code not in [200]:
2820-
map_error(
2821-
status_code=response.status_code, response=response, error_map=error_map
2822-
)
2823-
raise HttpResponseError(response=response)
2824-
2825-
deserialized = self._deserialize("object", pipeline_response.http_response)
2826-
2827-
if cls:
2828-
return cls(pipeline_response, deserialized, {}) # type: ignore
2829-
2830-
return deserialized # type: ignore
2831-
2832-
@distributed_trace_async
2833-
async def get_owner_object(self, **kwargs: Any) -> Any:
2834-
"""Get Owner Object.
2835-
2836-
Get Owner Object.
2837-
2838-
:return: any
2839-
:rtype: any
2840-
:raises ~azure.core.exceptions.HttpResponseError:
2841-
"""
2842-
error_map: MutableMapping = {
2843-
401: ClientAuthenticationError,
2844-
404: ResourceNotFoundError,
2845-
409: ResourceExistsError,
2846-
304: ResourceNotModifiedError,
2847-
}
2848-
error_map.update(kwargs.pop("error_map", {}) or {})
2849-
2850-
_headers = kwargs.pop("headers", {}) or {}
2851-
_params = kwargs.pop("params", {}) or {}
2852-
2853-
cls: ClsType[Any] = kwargs.pop("cls", None)
2854-
2855-
_request = build_lollygag_get_owner_object_request(
2856-
headers=_headers,
2857-
params=_params,
2858-
)
2859-
_request.url = self._client.format_url(_request.url)
2860-
2861-
_stream = False
2862-
pipeline_response: PipelineResponse = (
2863-
await self._client._pipeline.run( # pylint: disable=protected-access
2864-
_request, stream=_stream, **kwargs
2865-
)
2866-
)
2867-
2868-
response = pipeline_response.http_response
2869-
2870-
if response.status_code not in [200]:
2871-
map_error(
2872-
status_code=response.status_code, response=response, error_map=error_map
2873-
)
2874-
raise HttpResponseError(response=response)
2875-
2876-
deserialized = self._deserialize("object", pipeline_response.http_response)
2877-
2878-
if cls:
2879-
return cls(pipeline_response, deserialized, {}) # type: ignore
2880-
2881-
return deserialized # type: ignore
2882-
2883-
@distributed_trace_async
2884-
async def get_gubbins_secrets(self, **kwargs: Any) -> Any:
2885-
"""Get Gubbins Secrets.
2886-
2887-
Does nothing but expects a GUBBINS_SENSEI permission.
2888-
2889-
:return: any
2890-
:rtype: any
2891-
:raises ~azure.core.exceptions.HttpResponseError:
2892-
"""
2893-
error_map: MutableMapping = {
2894-
401: ClientAuthenticationError,
2895-
404: ResourceNotFoundError,
2896-
409: ResourceExistsError,
2897-
304: ResourceNotModifiedError,
2898-
}
2899-
error_map.update(kwargs.pop("error_map", {}) or {})
2900-
2901-
_headers = kwargs.pop("headers", {}) or {}
2902-
_params = kwargs.pop("params", {}) or {}
2903-
2904-
cls: ClsType[Any] = kwargs.pop("cls", None)
2905-
2906-
_request = build_lollygag_get_gubbins_secrets_request(
2907-
headers=_headers,
2908-
params=_params,
2909-
)
2910-
_request.url = self._client.format_url(_request.url)
2911-
2912-
_stream = False
2913-
pipeline_response: PipelineResponse = (
2914-
await self._client._pipeline.run( # pylint: disable=protected-access
2915-
_request, stream=_stream, **kwargs
2916-
)
2917-
)
2918-
2919-
response = pipeline_response.http_response
2920-
2921-
if response.status_code not in [200]:
2922-
map_error(
2923-
status_code=response.status_code, response=response, error_map=error_map
2924-
)
2925-
raise HttpResponseError(response=response)
2926-
2927-
deserialized = self._deserialize("object", pipeline_response.http_response)
2928-
2929-
if cls:
2930-
return cls(pipeline_response, deserialized, {}) # type: ignore
2931-
2932-
return deserialized # type: ignore

diracx-client/src/diracx/client/_generated/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
BodyAuthPilotLogin,
1818
BodyAuthRefreshPilotTokens,
1919
BodyAuthRegisterNewPilotsToDb,
20-
ExtendedMetadata,
2120
GroupInfo,
2221
HTTPValidationError,
2322
HeartbeatData,
@@ -29,6 +28,7 @@
2928
JobStatusUpdate,
3029
JobSummaryParams,
3130
JobSummaryParamsSearchItem,
31+
Metadata,
3232
OpenIDConfiguration,
3333
PilotCredentialsInfo,
3434
PilotCredentialsResponse,
@@ -69,7 +69,6 @@
6969
"BodyAuthPilotLogin",
7070
"BodyAuthRefreshPilotTokens",
7171
"BodyAuthRegisterNewPilotsToDb",
72-
"ExtendedMetadata",
7372
"GroupInfo",
7473
"HTTPValidationError",
7574
"HeartbeatData",
@@ -81,6 +80,7 @@
8180
"JobStatusUpdate",
8281
"JobSummaryParams",
8382
"JobSummaryParamsSearchItem",
83+
"Metadata",
8484
"OpenIDConfiguration",
8585
"PilotCredentialsInfo",
8686
"PilotCredentialsResponse",

0 commit comments

Comments
 (0)