Skip to content

Commit 93b83b4

Browse files
fix: Fixed the tests and autorest
1 parent 0252c98 commit 93b83b4

File tree

9 files changed

+55
-519
lines changed

9 files changed

+55
-519
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
PilotsOperations,
2423
WellKnownOperations,
2524
)
@@ -36,8 +35,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3635
:vartype config: _generated.operations.ConfigOperations
3736
:ivar jobs: JobsOperations operations
3837
:vartype jobs: _generated.operations.JobsOperations
39-
:ivar lollygag: LollygagOperations operations
40-
:vartype lollygag: _generated.operations.LollygagOperations
4138
:ivar pilots: PilotsOperations operations
4239
:vartype pilots: _generated.operations.PilotsOperations
4340
:keyword endpoint: Service URL. Required. Default value is "".
@@ -91,9 +88,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
9188
self.jobs = JobsOperations(
9289
self._client, self._config, self._serialize, self._deserialize
9390
)
94-
self.lollygag = LollygagOperations(
95-
self._client, self._config, self._serialize, self._deserialize
96-
)
9791
self.pilots = PilotsOperations(
9892
self._client, self._config, self._serialize, self._deserialize
9993
)

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
PilotsOperations,
2423
WellKnownOperations,
2524
)
@@ -36,8 +35,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword
3635
:vartype config: _generated.aio.operations.ConfigOperations
3736
:ivar jobs: JobsOperations operations
3837
:vartype jobs: _generated.aio.operations.JobsOperations
39-
:ivar lollygag: LollygagOperations operations
40-
:vartype lollygag: _generated.aio.operations.LollygagOperations
4138
:ivar pilots: PilotsOperations operations
4239
:vartype pilots: _generated.aio.operations.PilotsOperations
4340
:keyword endpoint: Service URL. Required. Default value is "".
@@ -91,9 +88,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
9188
self.jobs = JobsOperations(
9289
self._client, self._config, self._serialize, self._deserialize
9390
)
94-
self.lollygag = LollygagOperations(
95-
self._client, self._config, self._serialize, self._deserialize
96-
)
9791
self.pilots = PilotsOperations(
9892
self._client, self._config, self._serialize, self._deserialize
9993
)

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
from ._operations import PilotsOperations # type: ignore
1918

2019
from ._patch import __all__ as _patch_all
@@ -26,7 +25,6 @@
2625
"AuthOperations",
2726
"ConfigOperations",
2827
"JobsOperations",
29-
"LollygagOperations",
3028
"PilotsOperations",
3129
]
3230
__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: 6 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@
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,
6057
build_pilots_get_pilot_info_request,
6158
build_well_known_get_installation_metadata_request,
6259
build_well_known_get_openid_configuration_request,
@@ -157,15 +154,13 @@ async def get_openid_configuration(
157154
return deserialized # type: ignore
158155

159156
@distributed_trace_async
160-
async def get_installation_metadata(
161-
self, **kwargs: Any
162-
) -> _models.ExtendedMetadata:
157+
async def get_installation_metadata(self, **kwargs: Any) -> _models.Metadata:
163158
"""Get Installation Metadata.
164159
165-
Get Installation Metadata.
160+
Get metadata about the dirac installation.
166161
167-
:return: ExtendedMetadata
168-
:rtype: ~_generated.models.ExtendedMetadata
162+
:return: Metadata
163+
:rtype: ~_generated.models.Metadata
169164
:raises ~azure.core.exceptions.HttpResponseError:
170165
"""
171166
error_map: MutableMapping = {
@@ -179,7 +174,7 @@ async def get_installation_metadata(
179174
_headers = kwargs.pop("headers", {}) or {}
180175
_params = kwargs.pop("params", {}) or {}
181176

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

184179
_request = build_well_known_get_installation_metadata_request(
185180
headers=_headers,
@@ -202,9 +197,7 @@ async def get_installation_metadata(
202197
)
203198
raise HttpResponseError(response=response)
204199

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

209202
if cls:
210203
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -2554,190 +2547,6 @@ async def submit_jdl_jobs(
25542547
return deserialized # type: ignore
25552548

25562549

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-
27412550
class PilotsOperations:
27422551
"""
27432552
.. 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,7 +15,6 @@
1515
BodyAuthGetOidcToken,
1616
BodyAuthGetOidcTokenGrantType,
1717
BodyAuthRegisterNewPilotsToDb,
18-
ExtendedMetadata,
1918
GroupInfo,
2019
HTTPValidationError,
2120
HeartbeatData,
@@ -27,6 +26,7 @@
2726
JobStatusUpdate,
2827
JobSummaryParams,
2928
JobSummaryParamsSearchItem,
29+
Metadata,
3030
OpenIDConfiguration,
3131
SandboxDownloadResponse,
3232
SandboxInfo,
@@ -63,7 +63,6 @@
6363
"BodyAuthGetOidcToken",
6464
"BodyAuthGetOidcTokenGrantType",
6565
"BodyAuthRegisterNewPilotsToDb",
66-
"ExtendedMetadata",
6766
"GroupInfo",
6867
"HTTPValidationError",
6968
"HeartbeatData",
@@ -75,6 +74,7 @@
7574
"JobStatusUpdate",
7675
"JobSummaryParams",
7776
"JobSummaryParamsSearchItem",
77+
"Metadata",
7878
"OpenIDConfiguration",
7979
"SandboxDownloadResponse",
8080
"SandboxInfo",

0 commit comments

Comments
 (0)