Skip to content

Commit 3e82773

Browse files
author
Robin VAN DE MERGHEL
committed
fix: Regenerate client and fix some rebase errors
1 parent 59ca6c7 commit 3e82773

File tree

9 files changed

+2
-1061
lines changed

9 files changed

+2
-1061
lines changed

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

Lines changed: 0 additions & 235 deletions
Original file line numberDiff line numberDiff line change
@@ -865,25 +865,16 @@ async def complete_authorization_flow(self, *, code: str, state: str, **kwargs:
865865

866866
@overload
867867
async def perform_secret_exchange(
868-
<<<<<<< HEAD
869868
self, body: _models.PilotCredentials, *, content_type: str = "application/json", **kwargs: Any
870-
=======
871-
self, body: _models.BodyAuthPerformSecretExchange, *, content_type: str = "application/json", **kwargs: Any
872-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
873869
) -> _models.TokenResponse:
874870
"""Perform Secret Exchange.
875871
876872
This endpoint is used by the pilot to exchange a secret for a token.
877873
878-
<<<<<<< HEAD
879874
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
880875
881876
:param body: Required.
882877
:type body: ~_generated.models.PilotCredentials
883-
=======
884-
:param body: Required.
885-
:type body: ~_generated.models.BodyAuthPerformSecretExchange
886-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
887878
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
888879
Default value is "application/json".
889880
:paramtype content_type: str
@@ -900,11 +891,8 @@ async def perform_secret_exchange(
900891
901892
This endpoint is used by the pilot to exchange a secret for a token.
902893
903-
<<<<<<< HEAD
904894
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
905895
906-
=======
907-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
908896
:param body: Required.
909897
:type body: IO[bytes]
910898
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
@@ -917,25 +905,16 @@ async def perform_secret_exchange(
917905

918906
@distributed_trace_async
919907
async def perform_secret_exchange(
920-
<<<<<<< HEAD
921908
self, body: Union[_models.PilotCredentials, IO[bytes]], **kwargs: Any
922-
=======
923-
self, body: Union[_models.BodyAuthPerformSecretExchange, IO[bytes]], **kwargs: Any
924-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
925909
) -> _models.TokenResponse:
926910
"""Perform Secret Exchange.
927911
928912
This endpoint is used by the pilot to exchange a secret for a token.
929913
930-
<<<<<<< HEAD
931914
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
932915
933916
:param body: Is either a PilotCredentials type or a IO[bytes] type. Required.
934917
:type body: ~_generated.models.PilotCredentials or IO[bytes]
935-
=======
936-
:param body: Is either a BodyAuthPerformSecretExchange type or a IO[bytes] type. Required.
937-
:type body: ~_generated.models.BodyAuthPerformSecretExchange or IO[bytes]
938-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
939918
:return: TokenResponse
940919
:rtype: ~_generated.models.TokenResponse
941920
:raises ~azure.core.exceptions.HttpResponseError:
@@ -960,11 +939,7 @@ async def perform_secret_exchange(
960939
if isinstance(body, (IOBase, bytes)):
961940
_content = body
962941
else:
963-
<<<<<<< HEAD
964942
_json = self._serialize.body(body, "PilotCredentials")
965-
=======
966-
_json = self._serialize.body(body, "BodyAuthPerformSecretExchange")
967-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
968943

969944
_request = build_auth_perform_secret_exchange_request(
970945
content_type=content_type,
@@ -2798,216 +2773,6 @@ async def update_secrets_constraints(
27982773
if cls:
27992774
return cls(pipeline_response, None, {}) # type: ignore
28002775

2801-
@overload
2802-
async def update_pilot_fields(
2803-
self, body: _models.BodyPilotsUpdatePilotFields, *, content_type: str = "application/json", **kwargs: Any
2804-
) -> None:
2805-
"""Update Pilot Fields.
2806-
2807-
Modify a field of a pilot.
2808-
2809-
Note: Only the fields in PilotFieldsMapping are mutable, except for the PilotStamp.
2810-
2811-
:param body: Required.
2812-
:type body: ~_generated.models.BodyPilotsUpdatePilotFields
2813-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2814-
Default value is "application/json".
2815-
:paramtype content_type: str
2816-
:return: None
2817-
:rtype: None
2818-
async def create_pilot_secrets(
2819-
self, body: _models.BodyPilotsCreatePilotSecrets, *, content_type: str = "application/json", **kwargs: Any
2820-
) -> List[_models.PilotSecretsInfo]:
2821-
"""Create Pilot Secrets.
2822-
2823-
Endpoint to create secrets.
2824-
2825-
:param body: Required.
2826-
:type body: ~_generated.models.BodyPilotsCreatePilotSecrets
2827-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2828-
Default value is "application/json".
2829-
:paramtype content_type: str
2830-
:return: list of PilotSecretsInfo
2831-
:rtype: list[~_generated.models.PilotSecretsInfo]
2832-
:raises ~azure.core.exceptions.HttpResponseError:
2833-
"""
2834-
2835-
@overload
2836-
async def create_pilot_secrets(
2837-
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2838-
) -> List[_models.PilotSecretsInfo]:
2839-
"""Create Pilot Secrets.
2840-
2841-
Endpoint to create secrets.
2842-
2843-
:param body: Required.
2844-
:type body: IO[bytes]
2845-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2846-
Default value is "application/json".
2847-
:paramtype content_type: str
2848-
:return: list of PilotSecretsInfo
2849-
:rtype: list[~_generated.models.PilotSecretsInfo]
2850-
:raises ~azure.core.exceptions.HttpResponseError:
2851-
"""
2852-
2853-
@distributed_trace_async
2854-
async def create_pilot_secrets(
2855-
self, body: Union[_models.BodyPilotsCreatePilotSecrets, IO[bytes]], **kwargs: Any
2856-
) -> List[_models.PilotSecretsInfo]:
2857-
"""Create Pilot Secrets.
2858-
2859-
Endpoint to create secrets.
2860-
2861-
:param body: Is either a BodyPilotsCreatePilotSecrets type or a IO[bytes] type. Required.
2862-
:type body: ~_generated.models.BodyPilotsCreatePilotSecrets or IO[bytes]
2863-
:return: list of PilotSecretsInfo
2864-
:rtype: list[~_generated.models.PilotSecretsInfo]
2865-
:raises ~azure.core.exceptions.HttpResponseError:
2866-
"""
2867-
error_map: MutableMapping = {
2868-
401: ClientAuthenticationError,
2869-
404: ResourceNotFoundError,
2870-
409: ResourceExistsError,
2871-
304: ResourceNotModifiedError,
2872-
}
2873-
error_map.update(kwargs.pop("error_map", {}) or {})
2874-
2875-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2876-
_params = kwargs.pop("params", {}) or {}
2877-
2878-
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
2879-
cls: ClsType[List[_models.PilotSecretsInfo]] = kwargs.pop("cls", None)
2880-
2881-
content_type = content_type or "application/json"
2882-
_json = None
2883-
_content = None
2884-
if isinstance(body, (IOBase, bytes)):
2885-
_content = body
2886-
else:
2887-
_json = self._serialize.body(body, "BodyPilotsCreatePilotSecrets")
2888-
2889-
_request = build_pilots_create_pilot_secrets_request(
2890-
content_type=content_type,
2891-
json=_json,
2892-
content=_content,
2893-
headers=_headers,
2894-
params=_params,
2895-
)
2896-
_request.url = self._client.format_url(_request.url)
2897-
2898-
_stream = False
2899-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2900-
_request, stream=_stream, **kwargs
2901-
)
2902-
2903-
response = pipeline_response.http_response
2904-
2905-
if response.status_code not in [200]:
2906-
map_error(status_code=response.status_code, response=response, error_map=error_map)
2907-
raise HttpResponseError(response=response)
2908-
2909-
deserialized = self._deserialize("[PilotSecretsInfo]", pipeline_response.http_response)
2910-
2911-
if cls:
2912-
return cls(pipeline_response, deserialized, {}) # type: ignore
2913-
2914-
return deserialized # type: ignore
2915-
2916-
@overload
2917-
async def update_secrets_constraints(
2918-
self, body: Dict[str, _models.PilotSecretConstraints], *, content_type: str = "application/json", **kwargs: Any
2919-
) -> None:
2920-
"""Update Secrets Constraints.
2921-
2922-
Endpoint to associate pilots with secrets.
2923-
2924-
:param body: Required.
2925-
:type body: dict[str, ~_generated.models.PilotSecretConstraints]
2926-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
2927-
Default value is "application/json".
2928-
:paramtype content_type: str
2929-
:return: None
2930-
:rtype: None
2931-
:raises ~azure.core.exceptions.HttpResponseError:
2932-
"""
2933-
2934-
@overload
2935-
async def update_secrets_constraints(
2936-
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
2937-
) -> None:
2938-
"""Update Secrets Constraints.
2939-
2940-
Endpoint to associate pilots with secrets.
2941-
2942-
:param body: Required.
2943-
:type body: IO[bytes]
2944-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
2945-
Default value is "application/json".
2946-
:paramtype content_type: str
2947-
:return: None
2948-
:rtype: None
2949-
:raises ~azure.core.exceptions.HttpResponseError:
2950-
"""
2951-
2952-
@distributed_trace_async
2953-
async def update_secrets_constraints(
2954-
self, body: Union[Dict[str, _models.PilotSecretConstraints], IO[bytes]], **kwargs: Any
2955-
) -> None:
2956-
"""Update Secrets Constraints.
2957-
2958-
Endpoint to associate pilots with secrets.
2959-
2960-
:param body: Is either a {str: PilotSecretConstraints} type or a IO[bytes] type. Required.
2961-
:type body: dict[str, ~_generated.models.PilotSecretConstraints] or IO[bytes]
2962-
:return: None
2963-
:rtype: None
2964-
:raises ~azure.core.exceptions.HttpResponseError:
2965-
"""
2966-
error_map: MutableMapping = {
2967-
401: ClientAuthenticationError,
2968-
404: ResourceNotFoundError,
2969-
409: ResourceExistsError,
2970-
304: ResourceNotModifiedError,
2971-
}
2972-
error_map.update(kwargs.pop("error_map", {}) or {})
2973-
2974-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
2975-
_params = kwargs.pop("params", {}) or {}
2976-
2977-
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
2978-
cls: ClsType[None] = kwargs.pop("cls", None)
2979-
2980-
content_type = content_type or "application/json"
2981-
_json = None
2982-
_content = None
2983-
if isinstance(body, (IOBase, bytes)):
2984-
_content = body
2985-
else:
2986-
_json = self._serialize.body(body, "{PilotSecretConstraints}")
2987-
2988-
_request = build_pilots_update_secrets_constraints_request(
2989-
content_type=content_type,
2990-
json=_json,
2991-
content=_content,
2992-
headers=_headers,
2993-
params=_params,
2994-
)
2995-
_request.url = self._client.format_url(_request.url)
2996-
2997-
_stream = False
2998-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2999-
_request, stream=_stream, **kwargs
3000-
)
3001-
3002-
response = pipeline_response.http_response
3003-
3004-
if response.status_code not in [204]:
3005-
map_error(status_code=response.status_code, response=response, error_map=error_map)
3006-
raise HttpResponseError(response=response)
3007-
3008-
if cls:
3009-
return cls(pipeline_response, None, {}) # type: ignore
3010-
30112776
@overload
30122777
async def update_pilot_fields(
30132778
self, body: _models.BodyPilotsUpdatePilotFields, *, content_type: str = "application/json", **kwargs: Any

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
from ._models import ( # type: ignore
1515
BodyAuthGetOidcToken,
1616
BodyAuthGetOidcTokenGrantType,
17-
<<<<<<< HEAD
18-
=======
19-
BodyAuthPerformSecretExchange,
20-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
2117
BodyAuthRefreshPilotTokens,
2218
BodyPilotsAddJobsToPilot,
2319
BodyPilotsAddPilotStamps,
@@ -81,10 +77,6 @@
8177
__all__ = [
8278
"BodyAuthGetOidcToken",
8379
"BodyAuthGetOidcTokenGrantType",
84-
<<<<<<< HEAD
85-
=======
86-
"BodyAuthPerformSecretExchange",
87-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
8880
"BodyAuthRefreshPilotTokens",
8981
"BodyPilotsAddJobsToPilot",
9082
"BodyPilotsAddPilotStamps",

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -94,42 +94,6 @@ class BodyAuthGetOidcTokenGrantType(_serialization.Model):
9494
"""OAuth2 Grant type."""
9595

9696

97-
<<<<<<< HEAD
98-
=======
99-
class BodyAuthPerformSecretExchange(_serialization.Model):
100-
"""Body_auth_perform_secret_exchange.
101-
102-
All required parameters must be populated in order to send to server.
103-
104-
:ivar pilot_stamp: Stamp used by a pilot to login. Required.
105-
:vartype pilot_stamp: str
106-
:ivar pilot_secret: Pilot secret given by Dirac/DiracX. Required.
107-
:vartype pilot_secret: str
108-
"""
109-
110-
_validation = {
111-
"pilot_stamp": {"required": True},
112-
"pilot_secret": {"required": True},
113-
}
114-
115-
_attribute_map = {
116-
"pilot_stamp": {"key": "pilot_stamp", "type": "str"},
117-
"pilot_secret": {"key": "pilot_secret", "type": "str"},
118-
}
119-
120-
def __init__(self, *, pilot_stamp: str, pilot_secret: str, **kwargs: Any) -> None:
121-
"""
122-
:keyword pilot_stamp: Stamp used by a pilot to login. Required.
123-
:paramtype pilot_stamp: str
124-
:keyword pilot_secret: Pilot secret given by Dirac/DiracX. Required.
125-
:paramtype pilot_secret: str
126-
"""
127-
super().__init__(**kwargs)
128-
self.pilot_stamp = pilot_stamp
129-
self.pilot_secret = pilot_secret
130-
131-
132-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
13397
class BodyAuthRefreshPilotTokens(_serialization.Model):
13498
"""Body_auth_refresh_pilot_tokens.
13599
@@ -332,10 +296,7 @@ def __init__(
332296
self.n = n
333297
self.expiration_minutes = expiration_minutes
334298
self.pilot_secret_use_count_max = pilot_secret_use_count_max
335-
<<<<<<< HEAD
336299
self.vo = vo
337-
=======
338-
>>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
339300

340301

341302
class BodyPilotsInternalSendMessage(_serialization.Model):

0 commit comments

Comments
 (0)