@@ -865,25 +865,16 @@ async def complete_authorization_flow(self, *, code: str, state: str, **kwargs:
865
865
866
866
@overload
867
867
async def perform_secret_exchange (
868
- << << << < HEAD
869
868
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
- > >> >> >> 4507 b79 (refactor : Splitted endpoints into / pilots and / pilots / internal WITH auth in both )
873
869
) -> _models .TokenResponse :
874
870
"""Perform Secret Exchange.
875
871
876
872
This endpoint is used by the pilot to exchange a secret for a token.
877
873
878
- <<<<<<< HEAD
879
874
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
880
875
881
876
:param body: Required.
882
877
: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)
887
878
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
888
879
Default value is "application/json".
889
880
:paramtype content_type: str
@@ -900,11 +891,8 @@ async def perform_secret_exchange(
900
891
901
892
This endpoint is used by the pilot to exchange a secret for a token.
902
893
903
- <<<<<<< HEAD
904
894
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
905
895
906
- =======
907
- >>>>>>> 4507b79 (refactor: Splitted endpoints into /pilots and /pilots/internal WITH auth in both)
908
896
:param body: Required.
909
897
:type body: IO[bytes]
910
898
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
@@ -917,25 +905,16 @@ async def perform_secret_exchange(
917
905
918
906
@distributed_trace_async
919
907
async def perform_secret_exchange (
920
- << << << < HEAD
921
908
self , body : Union [_models .PilotCredentials , IO [bytes ]], ** kwargs : Any
922
- == == == =
923
- self , body : Union [_models .BodyAuthPerformSecretExchange , IO [bytes ]], ** kwargs : Any
924
- >> > >> >> 4507 b79 (refactor : Splitted endpoints into / pilots and / pilots / internal WITH auth in both )
925
909
) -> _models .TokenResponse :
926
910
"""Perform Secret Exchange.
927
911
928
912
This endpoint is used by the pilot to exchange a secret for a token.
929
913
930
- <<<<<<< HEAD
931
914
This endpoint also acts as DIRAC's ``dirac-admin-add-pilot``.
932
915
933
916
:param body: Is either a PilotCredentials type or a IO[bytes] type. Required.
934
917
: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)
939
918
:return: TokenResponse
940
919
:rtype: ~_generated.models.TokenResponse
941
920
:raises ~azure.core.exceptions.HttpResponseError:
@@ -960,11 +939,7 @@ async def perform_secret_exchange(
960
939
if isinstance (body , (IOBase , bytes )):
961
940
_content = body
962
941
else :
963
- << << << < HEAD
964
942
_json = self ._serialize .body (body , "PilotCredentials" )
965
- == == == =
966
- _json = self ._serialize .body (body , "BodyAuthPerformSecretExchange" )
967
- >> >> >> > 4507 b79 (refactor : Splitted endpoints into / pilots and / pilots / internal WITH auth in both )
968
943
969
944
_request = build_auth_perform_secret_exchange_request (
970
945
content_type = content_type ,
@@ -2798,216 +2773,6 @@ async def update_secrets_constraints(
2798
2773
if cls :
2799
2774
return cls (pipeline_response , None , {}) # type: ignore
2800
2775
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
-
3011
2776
@overload
3012
2777
async def update_pilot_fields (
3013
2778
self , body : _models .BodyPilotsUpdatePilotFields , * , content_type : str = "application/json" , ** kwargs : Any
0 commit comments