Skip to content

Commit a8e06d8

Browse files
fix: Fixed client
1 parent 93b83b4 commit a8e06d8

File tree

8 files changed

+505
-42
lines changed

8 files changed

+505
-42
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
AuthOperations,
2020
ConfigOperations,
2121
JobsOperations,
22+
LollygagOperations,
2223
PilotsOperations,
2324
WellKnownOperations,
2425
)
@@ -35,6 +36,8 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3536
:vartype config: _generated.operations.ConfigOperations
3637
:ivar jobs: JobsOperations operations
3738
:vartype jobs: _generated.operations.JobsOperations
39+
:ivar lollygag: LollygagOperations operations
40+
:vartype lollygag: _generated.operations.LollygagOperations
3841
:ivar pilots: PilotsOperations operations
3942
:vartype pilots: _generated.operations.PilotsOperations
4043
:keyword endpoint: Service URL. Required. Default value is "".
@@ -88,6 +91,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
8891
self.jobs = JobsOperations(
8992
self._client, self._config, self._serialize, self._deserialize
9093
)
94+
self.lollygag = LollygagOperations(
95+
self._client, self._config, self._serialize, self._deserialize
96+
)
9197
self.pilots = PilotsOperations(
9298
self._client, self._config, self._serialize, self._deserialize
9399
)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
AuthOperations,
2020
ConfigOperations,
2121
JobsOperations,
22+
LollygagOperations,
2223
PilotsOperations,
2324
WellKnownOperations,
2425
)
@@ -35,6 +36,8 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3536
:vartype config: _generated.aio.operations.ConfigOperations
3637
:ivar jobs: JobsOperations operations
3738
:vartype jobs: _generated.aio.operations.JobsOperations
39+
:ivar lollygag: LollygagOperations operations
40+
:vartype lollygag: _generated.aio.operations.LollygagOperations
3841
:ivar pilots: PilotsOperations operations
3942
:vartype pilots: _generated.aio.operations.PilotsOperations
4043
:keyword endpoint: Service URL. Required. Default value is "".
@@ -88,6 +91,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
8891
self.jobs = JobsOperations(
8992
self._client, self._config, self._serialize, self._deserialize
9093
)
94+
self.lollygag = LollygagOperations(
95+
self._client, self._config, self._serialize, self._deserialize
96+
)
9197
self.pilots = PilotsOperations(
9298
self._client, self._config, self._serialize, self._deserialize
9399
)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
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
1718
from ._operations import PilotsOperations # type: ignore
1819

1920
from ._patch import __all__ as _patch_all
@@ -25,6 +26,7 @@
2526
"AuthOperations",
2627
"ConfigOperations",
2728
"JobsOperations",
29+
"LollygagOperations",
2830
"PilotsOperations",
2931
]
3032
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

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

Lines changed: 197 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
build_jobs_summary_request,
5555
build_jobs_unassign_bulk_jobs_sandboxes_request,
5656
build_jobs_unassign_job_sandboxes_request,
57+
build_lollygag_get_gubbins_secrets_request,
58+
build_lollygag_get_owner_object_request,
59+
build_lollygag_insert_owner_object_request,
5760
build_pilots_get_pilot_info_request,
5861
build_well_known_get_installation_metadata_request,
5962
build_well_known_get_openid_configuration_request,
@@ -154,13 +157,15 @@ async def get_openid_configuration(
154157
return deserialized # type: ignore
155158

156159
@distributed_trace_async
157-
async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
160+
async def get_installation_metadata(
161+
self, **kwargs: Any
162+
) -> _models.ExtendedMetadata:
158163
"""Get Installation Metadata.
159164
160-
Get metadata about the dirac installation.
165+
Get Installation Metadata.
161166
162-
:return: Metadata
163-
:rtype: ~_generated.models.Metadata
167+
:return: ExtendedMetadata
168+
:rtype: ~_generated.models.ExtendedMetadata
164169
:raises ~azure.core.exceptions.HttpResponseError:
165170
"""
166171
error_map: MutableMapping = {
@@ -174,7 +179,7 @@ async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
174179
_headers = kwargs.pop("headers", {}) or {}
175180
_params = kwargs.pop("params", {}) or {}
176181

177-
cls: ClsType[_models.Metadata] = kwargs.pop("cls", None)
182+
cls: ClsType[_models.ExtendedMetadata] = kwargs.pop("cls", None)
178183

179184
_request = build_well_known_get_installation_metadata_request(
180185
headers=_headers,
@@ -197,7 +202,9 @@ async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
197202
)
198203
raise HttpResponseError(response=response)
199204

200-
deserialized = self._deserialize("Metadata", pipeline_response.http_response)
205+
deserialized = self._deserialize(
206+
"ExtendedMetadata", pipeline_response.http_response
207+
)
201208

202209
if cls:
203210
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2547,6 +2554,190 @@ async def submit_jdl_jobs(
25472554
return deserialized # type: ignore
25482555

25492556

2557+
class LollygagOperations:
2558+
"""
2559+
.. warning::
2560+
**DO NOT** instantiate this class directly.
2561+
2562+
Instead, you should access the following operations through
2563+
:class:`~_generated.aio.Dirac`'s
2564+
:attr:`lollygag` attribute.
2565+
"""
2566+
2567+
models = _models
2568+
2569+
def __init__(self, *args, **kwargs) -> None:
2570+
input_args = list(args)
2571+
self._client: AsyncPipelineClient = (
2572+
input_args.pop(0) if input_args else kwargs.pop("client")
2573+
)
2574+
self._config: DiracConfiguration = (
2575+
input_args.pop(0) if input_args else kwargs.pop("config")
2576+
)
2577+
self._serialize: Serializer = (
2578+
input_args.pop(0) if input_args else kwargs.pop("serializer")
2579+
)
2580+
self._deserialize: Deserializer = (
2581+
input_args.pop(0) if input_args else kwargs.pop("deserializer")
2582+
)
2583+
2584+
@distributed_trace_async
2585+
async def insert_owner_object(self, owner_name: str, **kwargs: Any) -> Any:
2586+
"""Insert Owner Object.
2587+
2588+
Insert Owner Object.
2589+
2590+
:param owner_name: Required.
2591+
:type owner_name: str
2592+
:return: any
2593+
:rtype: any
2594+
:raises ~azure.core.exceptions.HttpResponseError:
2595+
"""
2596+
error_map: MutableMapping = {
2597+
401: ClientAuthenticationError,
2598+
404: ResourceNotFoundError,
2599+
409: ResourceExistsError,
2600+
304: ResourceNotModifiedError,
2601+
}
2602+
error_map.update(kwargs.pop("error_map", {}) or {})
2603+
2604+
_headers = kwargs.pop("headers", {}) or {}
2605+
_params = kwargs.pop("params", {}) or {}
2606+
2607+
cls: ClsType[Any] = kwargs.pop("cls", None)
2608+
2609+
_request = build_lollygag_insert_owner_object_request(
2610+
owner_name=owner_name,
2611+
headers=_headers,
2612+
params=_params,
2613+
)
2614+
_request.url = self._client.format_url(_request.url)
2615+
2616+
_stream = False
2617+
pipeline_response: PipelineResponse = (
2618+
await self._client._pipeline.run( # pylint: disable=protected-access
2619+
_request, stream=_stream, **kwargs
2620+
)
2621+
)
2622+
2623+
response = pipeline_response.http_response
2624+
2625+
if response.status_code not in [200]:
2626+
map_error(
2627+
status_code=response.status_code, response=response, error_map=error_map
2628+
)
2629+
raise HttpResponseError(response=response)
2630+
2631+
deserialized = self._deserialize("object", pipeline_response.http_response)
2632+
2633+
if cls:
2634+
return cls(pipeline_response, deserialized, {}) # type: ignore
2635+
2636+
return deserialized # type: ignore
2637+
2638+
@distributed_trace_async
2639+
async def get_owner_object(self, **kwargs: Any) -> Any:
2640+
"""Get Owner Object.
2641+
2642+
Get Owner Object.
2643+
2644+
:return: any
2645+
:rtype: any
2646+
:raises ~azure.core.exceptions.HttpResponseError:
2647+
"""
2648+
error_map: MutableMapping = {
2649+
401: ClientAuthenticationError,
2650+
404: ResourceNotFoundError,
2651+
409: ResourceExistsError,
2652+
304: ResourceNotModifiedError,
2653+
}
2654+
error_map.update(kwargs.pop("error_map", {}) or {})
2655+
2656+
_headers = kwargs.pop("headers", {}) or {}
2657+
_params = kwargs.pop("params", {}) or {}
2658+
2659+
cls: ClsType[Any] = kwargs.pop("cls", None)
2660+
2661+
_request = build_lollygag_get_owner_object_request(
2662+
headers=_headers,
2663+
params=_params,
2664+
)
2665+
_request.url = self._client.format_url(_request.url)
2666+
2667+
_stream = False
2668+
pipeline_response: PipelineResponse = (
2669+
await self._client._pipeline.run( # pylint: disable=protected-access
2670+
_request, stream=_stream, **kwargs
2671+
)
2672+
)
2673+
2674+
response = pipeline_response.http_response
2675+
2676+
if response.status_code not in [200]:
2677+
map_error(
2678+
status_code=response.status_code, response=response, error_map=error_map
2679+
)
2680+
raise HttpResponseError(response=response)
2681+
2682+
deserialized = self._deserialize("object", pipeline_response.http_response)
2683+
2684+
if cls:
2685+
return cls(pipeline_response, deserialized, {}) # type: ignore
2686+
2687+
return deserialized # type: ignore
2688+
2689+
@distributed_trace_async
2690+
async def get_gubbins_secrets(self, **kwargs: Any) -> Any:
2691+
"""Get Gubbins Secrets.
2692+
2693+
Does nothing but expects a GUBBINS_SENSEI permission.
2694+
2695+
:return: any
2696+
:rtype: any
2697+
:raises ~azure.core.exceptions.HttpResponseError:
2698+
"""
2699+
error_map: MutableMapping = {
2700+
401: ClientAuthenticationError,
2701+
404: ResourceNotFoundError,
2702+
409: ResourceExistsError,
2703+
304: ResourceNotModifiedError,
2704+
}
2705+
error_map.update(kwargs.pop("error_map", {}) or {})
2706+
2707+
_headers = kwargs.pop("headers", {}) or {}
2708+
_params = kwargs.pop("params", {}) or {}
2709+
2710+
cls: ClsType[Any] = kwargs.pop("cls", None)
2711+
2712+
_request = build_lollygag_get_gubbins_secrets_request(
2713+
headers=_headers,
2714+
params=_params,
2715+
)
2716+
_request.url = self._client.format_url(_request.url)
2717+
2718+
_stream = False
2719+
pipeline_response: PipelineResponse = (
2720+
await self._client._pipeline.run( # pylint: disable=protected-access
2721+
_request, stream=_stream, **kwargs
2722+
)
2723+
)
2724+
2725+
response = pipeline_response.http_response
2726+
2727+
if response.status_code not in [200]:
2728+
map_error(
2729+
status_code=response.status_code, response=response, error_map=error_map
2730+
)
2731+
raise HttpResponseError(response=response)
2732+
2733+
deserialized = self._deserialize("object", pipeline_response.http_response)
2734+
2735+
if cls:
2736+
return cls(pipeline_response, deserialized, {}) # type: ignore
2737+
2738+
return deserialized # type: ignore
2739+
2740+
25502741
class PilotsOperations:
25512742
"""
25522743
.. warning::

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
BodyAuthGetOidcToken,
1616
BodyAuthGetOidcTokenGrantType,
1717
BodyAuthRegisterNewPilotsToDb,
18+
ExtendedMetadata,
1819
GroupInfo,
1920
HTTPValidationError,
2021
HeartbeatData,
@@ -26,7 +27,6 @@
2627
JobStatusUpdate,
2728
JobSummaryParams,
2829
JobSummaryParamsSearchItem,
29-
Metadata,
3030
OpenIDConfiguration,
3131
SandboxDownloadResponse,
3232
SandboxInfo,
@@ -63,6 +63,7 @@
6363
"BodyAuthGetOidcToken",
6464
"BodyAuthGetOidcTokenGrantType",
6565
"BodyAuthRegisterNewPilotsToDb",
66+
"ExtendedMetadata",
6667
"GroupInfo",
6768
"HTTPValidationError",
6869
"HeartbeatData",
@@ -74,7 +75,6 @@
7475
"JobStatusUpdate",
7576
"JobSummaryParams",
7677
"JobSummaryParamsSearchItem",
77-
"Metadata",
7878
"OpenIDConfiguration",
7979
"SandboxDownloadResponse",
8080
"SandboxInfo",

0 commit comments

Comments
 (0)