From 4c0346d6bab455df7235b9b0d26c0dee6260919a Mon Sep 17 00:00:00 2001 From: Ryunosuke O'Neil Date: Mon, 16 Dec 2024 15:51:08 +0100 Subject: [PATCH] Regenerate diracx client --- .../src/diracx/client/generated/_client.py | 6 - .../diracx/client/generated/aio/_client.py | 6 - .../generated/aio/operations/__init__.py | 2 - .../generated/aio/operations/_operations.py | 217 ++------------ .../client/generated/models/__init__.py | 6 +- .../diracx/client/generated/models/_models.py | 143 ++++++---- .../client/generated/operations/__init__.py | 2 - .../generated/operations/_operations.py | 265 ++---------------- 8 files changed, 121 insertions(+), 526 deletions(-) diff --git a/diracx-client/src/diracx/client/generated/_client.py b/diracx-client/src/diracx/client/generated/_client.py index cc90b044..298dafa1 100644 --- a/diracx-client/src/diracx/client/generated/_client.py +++ b/diracx-client/src/diracx/client/generated/_client.py @@ -19,7 +19,6 @@ AuthOperations, ConfigOperations, JobsOperations, - LollygagOperations, WellKnownOperations, ) @@ -35,8 +34,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword :vartype config: generated.operations.ConfigOperations :ivar jobs: JobsOperations operations :vartype jobs: generated.operations.JobsOperations - :ivar lollygag: LollygagOperations operations - :vartype lollygag: generated.operations.LollygagOperations :keyword endpoint: Service URL. Required. Default value is "". :paramtype endpoint: str """ @@ -88,9 +85,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self.jobs = JobsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.lollygag = LollygagOperations( - self._client, self._config, self._serialize, self._deserialize - ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/diracx-client/src/diracx/client/generated/aio/_client.py b/diracx-client/src/diracx/client/generated/aio/_client.py index f08808cf..068e7f2c 100644 --- a/diracx-client/src/diracx/client/generated/aio/_client.py +++ b/diracx-client/src/diracx/client/generated/aio/_client.py @@ -19,7 +19,6 @@ AuthOperations, ConfigOperations, JobsOperations, - LollygagOperations, WellKnownOperations, ) @@ -35,8 +34,6 @@ class Dirac: # pylint: disable=client-accepts-api-version-keyword :vartype config: generated.aio.operations.ConfigOperations :ivar jobs: JobsOperations operations :vartype jobs: generated.aio.operations.JobsOperations - :ivar lollygag: LollygagOperations operations - :vartype lollygag: generated.aio.operations.LollygagOperations :keyword endpoint: Service URL. Required. Default value is "". :paramtype endpoint: str """ @@ -88,9 +85,6 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self.jobs = JobsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.lollygag = LollygagOperations( - self._client, self._config, self._serialize, self._deserialize - ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/diracx-client/src/diracx/client/generated/aio/operations/__init__.py b/diracx-client/src/diracx/client/generated/aio/operations/__init__.py index 056c8158..6980035f 100644 --- a/diracx-client/src/diracx/client/generated/aio/operations/__init__.py +++ b/diracx-client/src/diracx/client/generated/aio/operations/__init__.py @@ -14,7 +14,6 @@ from ._operations import AuthOperations # type: ignore from ._operations import ConfigOperations # type: ignore from ._operations import JobsOperations # type: ignore -from ._operations import LollygagOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -25,7 +24,6 @@ "AuthOperations", "ConfigOperations", "JobsOperations", - "LollygagOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/diracx-client/src/diracx/client/generated/aio/operations/_operations.py b/diracx-client/src/diracx/client/generated/aio/operations/_operations.py index 451caecf..8af2a168 100644 --- a/diracx-client/src/diracx/client/generated/aio/operations/_operations.py +++ b/diracx-client/src/diracx/client/generated/aio/operations/_operations.py @@ -48,9 +48,6 @@ build_jobs_summary_request, build_jobs_unassign_bulk_jobs_sandboxes_request, build_jobs_unassign_job_sandboxes_request, - build_lollygag_get_gubbins_secrets_request, - build_lollygag_get_owner_object_request, - build_lollygag_insert_owner_object_request, build_well_known_installation_metadata_request, build_well_known_openid_configuration_request, ) @@ -140,13 +137,13 @@ async def openid_configuration(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace_async - async def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata: + async def installation_metadata(self, **kwargs: Any) -> _models.Metadata: """Installation Metadata. - Installation Metadata. + Get metadata about the dirac installation. - :return: ExtendedMetadata - :rtype: ~generated.models.ExtendedMetadata + :return: Metadata + :rtype: ~generated.models.Metadata :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -160,7 +157,7 @@ async def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ExtendedMetadata] = kwargs.pop("cls", None) + cls: ClsType[_models.Metadata] = kwargs.pop("cls", None) _request = build_well_known_installation_metadata_request( headers=_headers, @@ -183,9 +180,7 @@ async def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata ) raise HttpResponseError(response=response) - deserialized = self._deserialize( - "ExtendedMetadata", pipeline_response.http_response - ) + deserialized = self._deserialize("Metadata", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -1481,7 +1476,7 @@ async def set_job_statuses( force: bool = False, content_type: str = "application/json", **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -1493,8 +1488,8 @@ async def set_job_statuses( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1506,7 +1501,7 @@ async def set_job_statuses( force: bool = False, content_type: str = "application/json", **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -1518,8 +1513,8 @@ async def set_job_statuses( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1530,7 +1525,7 @@ async def set_job_statuses( *, force: bool = False, **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -1539,8 +1534,8 @@ async def set_job_statuses( :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes] :keyword force: Default value is False. :paramtype force: bool - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1557,7 +1552,7 @@ async def set_job_statuses( content_type: Optional[str] = kwargs.pop( "content_type", _headers.pop("Content-Type", None) ) - cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None) + cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -1593,7 +1588,7 @@ async def set_job_statuses( raise HttpResponseError(response=response) deserialized = self._deserialize( - "{SetJobStatusReturn}", pipeline_response.http_response + "SetJobStatusReturn", pipeline_response.http_response ) if cls: @@ -2026,181 +2021,3 @@ async def submit_bulk_jdl_jobs( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - - -class LollygagOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~generated.aio.Dirac`'s - :attr:`lollygag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = ( - input_args.pop(0) if input_args else kwargs.pop("deserializer") - ) - - @distributed_trace_async - async def insert_owner_object(self, owner_name: str, **kwargs: Any) -> Any: - """Insert Owner Object. - - Insert Owner Object. - - :param owner_name: Required. - :type owner_name: str - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_insert_owner_object_request( - owner_name=owner_name, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_owner_object(self, **kwargs: Any) -> Any: - """Get Owner Object. - - Get Owner Object. - - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_get_owner_object_request( - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_gubbins_secrets(self, **kwargs: Any) -> Any: - """Get Gubbins Secrets. - - Does nothing but expects a GUBBINS_SENSEI permission. - - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_get_gubbins_secrets_request( - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore diff --git a/diracx-client/src/diracx/client/generated/models/__init__.py b/diracx-client/src/diracx/client/generated/models/__init__.py index e7a74c6e..87cdf0b1 100644 --- a/diracx-client/src/diracx/client/generated/models/__init__.py +++ b/diracx-client/src/diracx/client/generated/models/__init__.py @@ -15,7 +15,6 @@ BodyAuthToken, BodyAuthTokenGrantType, DevelopmentSettings, - ExtendedMetadata, GroupInfo, HTTPValidationError, InitiateDeviceFlowResponse, @@ -25,12 +24,14 @@ JobStatusUpdate, JobSummaryParams, JobSummaryParamsSearchItem, + Metadata, SandboxDownloadResponse, SandboxInfo, SandboxUploadResponse, ScalarSearchSpec, ScalarSearchSpecValue, SetJobStatusReturn, + SetJobStatusReturnSuccess, SortSpec, SupportInfo, TokenResponse, @@ -59,7 +60,6 @@ "BodyAuthToken", "BodyAuthTokenGrantType", "DevelopmentSettings", - "ExtendedMetadata", "GroupInfo", "HTTPValidationError", "InitiateDeviceFlowResponse", @@ -69,12 +69,14 @@ "JobStatusUpdate", "JobSummaryParams", "JobSummaryParamsSearchItem", + "Metadata", "SandboxDownloadResponse", "SandboxInfo", "SandboxUploadResponse", "ScalarSearchSpec", "ScalarSearchSpecValue", "SetJobStatusReturn", + "SetJobStatusReturnSuccess", "SortSpec", "SupportInfo", "TokenResponse", diff --git a/diracx-client/src/diracx/client/generated/models/_models.py b/diracx-client/src/diracx/client/generated/models/_models.py index 99a5a945..0ec3bb04 100644 --- a/diracx-client/src/diracx/client/generated/models/_models.py +++ b/diracx-client/src/diracx/client/generated/models/_models.py @@ -126,66 +126,6 @@ def __init__( self.crash_on_missed_access_policy = crash_on_missed_access_policy -class ExtendedMetadata(_serialization.Model): - """ExtendedMetadata. - - All required parameters must be populated in order to send to server. - - :ivar virtual_organizations: Virtual Organizations. Required. - :vartype virtual_organizations: dict[str, ~generated.models.VOInfo] - :ivar development_settings: Settings for the Development Configuration that can influence run - time. Required. - :vartype development_settings: ~generated.models.DevelopmentSettings - :ivar gubbins_secrets: Gubbins Secrets. Required. - :vartype gubbins_secrets: str - :ivar gubbins_user_info: Gubbins User Info. Required. - :vartype gubbins_user_info: dict[str, list[str]] - """ - - _validation = { - "virtual_organizations": {"required": True}, - "development_settings": {"required": True}, - "gubbins_secrets": {"required": True}, - "gubbins_user_info": {"required": True}, - } - - _attribute_map = { - "virtual_organizations": {"key": "virtual_organizations", "type": "{VOInfo}"}, - "development_settings": { - "key": "development_settings", - "type": "DevelopmentSettings", - }, - "gubbins_secrets": {"key": "gubbins_secrets", "type": "str"}, - "gubbins_user_info": {"key": "gubbins_user_info", "type": "{[str]}"}, - } - - def __init__( - self, - *, - virtual_organizations: Dict[str, "_models.VOInfo"], - development_settings: "_models.DevelopmentSettings", - gubbins_secrets: str, - gubbins_user_info: Dict[str, List[str]], - **kwargs: Any, - ) -> None: - """ - :keyword virtual_organizations: Virtual Organizations. Required. - :paramtype virtual_organizations: dict[str, ~generated.models.VOInfo] - :keyword development_settings: Settings for the Development Configuration that can influence - run time. Required. - :paramtype development_settings: ~generated.models.DevelopmentSettings - :keyword gubbins_secrets: Gubbins Secrets. Required. - :paramtype gubbins_secrets: str - :keyword gubbins_user_info: Gubbins User Info. Required. - :paramtype gubbins_user_info: dict[str, list[str]] - """ - super().__init__(**kwargs) - self.virtual_organizations = virtual_organizations - self.development_settings = development_settings - self.gubbins_secrets = gubbins_secrets - self.gubbins_user_info = gubbins_user_info - - class GroupInfo(_serialization.Model): """GroupInfo. @@ -497,6 +437,50 @@ class JobSummaryParamsSearchItem(_serialization.Model): """JobSummaryParamsSearchItem.""" +class Metadata(_serialization.Model): + """Metadata. + + All required parameters must be populated in order to send to server. + + :ivar virtual_organizations: Virtual Organizations. Required. + :vartype virtual_organizations: dict[str, ~generated.models.VOInfo] + :ivar development_settings: Settings for the Development Configuration that can influence run + time. Required. + :vartype development_settings: ~generated.models.DevelopmentSettings + """ + + _validation = { + "virtual_organizations": {"required": True}, + "development_settings": {"required": True}, + } + + _attribute_map = { + "virtual_organizations": {"key": "virtual_organizations", "type": "{VOInfo}"}, + "development_settings": { + "key": "development_settings", + "type": "DevelopmentSettings", + }, + } + + def __init__( + self, + *, + virtual_organizations: Dict[str, "_models.VOInfo"], + development_settings: "_models.DevelopmentSettings", + **kwargs: Any, + ) -> None: + """ + :keyword virtual_organizations: Virtual Organizations. Required. + :paramtype virtual_organizations: dict[str, ~generated.models.VOInfo] + :keyword development_settings: Settings for the Development Configuration that can influence + run time. Required. + :paramtype development_settings: ~generated.models.DevelopmentSettings + """ + super().__init__(**kwargs) + self.virtual_organizations = virtual_organizations + self.development_settings = development_settings + + class SandboxDownloadResponse(_serialization.Model): """SandboxDownloadResponse. @@ -686,6 +670,45 @@ class ScalarSearchSpecValue(_serialization.Model): class SetJobStatusReturn(_serialization.Model): """SetJobStatusReturn. + All required parameters must be populated in order to send to server. + + :ivar success: Success. Required. + :vartype success: dict[str, ~generated.models.SetJobStatusReturnSuccess] + :ivar failed: Failed. Required. + :vartype failed: dict[str, dict[str, str]] + """ + + _validation = { + "success": {"required": True}, + "failed": {"required": True}, + } + + _attribute_map = { + "success": {"key": "success", "type": "{SetJobStatusReturnSuccess}"}, + "failed": {"key": "failed", "type": "{{str}}"}, + } + + def __init__( + self, + *, + success: Dict[str, "_models.SetJobStatusReturnSuccess"], + failed: Dict[str, Dict[str, str]], + **kwargs: Any, + ) -> None: + """ + :keyword success: Success. Required. + :paramtype success: dict[str, ~generated.models.SetJobStatusReturnSuccess] + :keyword failed: Failed. Required. + :paramtype failed: dict[str, dict[str, str]] + """ + super().__init__(**kwargs) + self.success = success + self.failed = failed + + +class SetJobStatusReturnSuccess(_serialization.Model): + """Successful new status change. + :ivar status: JobStatus. Known values are: "Submitting", "Received", "Checking", "Staging", "Waiting", "Matched", "Running", "Stalled", "Completing", "Done", "Completed", "Failed", "Deleted", "Killed", and "Rescheduled". diff --git a/diracx-client/src/diracx/client/generated/operations/__init__.py b/diracx-client/src/diracx/client/generated/operations/__init__.py index 056c8158..6980035f 100644 --- a/diracx-client/src/diracx/client/generated/operations/__init__.py +++ b/diracx-client/src/diracx/client/generated/operations/__init__.py @@ -14,7 +14,6 @@ from ._operations import AuthOperations # type: ignore from ._operations import ConfigOperations # type: ignore from ._operations import JobsOperations # type: ignore -from ._operations import LollygagOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -25,7 +24,6 @@ "AuthOperations", "ConfigOperations", "JobsOperations", - "LollygagOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/diracx-client/src/diracx/client/generated/operations/_operations.py b/diracx-client/src/diracx/client/generated/operations/_operations.py index f8a8c2eb..8c9092bb 100644 --- a/diracx-client/src/diracx/client/generated/operations/_operations.py +++ b/diracx-client/src/diracx/client/generated/operations/_operations.py @@ -608,57 +608,6 @@ def build_jobs_submit_bulk_jdl_jobs_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_lollygag_insert_owner_object_request( # pylint: disable=name-too-long - owner_name: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/api/lollygag/insert_owner/{owner_name}" - path_format_arguments = { - "owner_name": _SERIALIZER.url("owner_name", owner_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) - - -def build_lollygag_get_owner_object_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/api/lollygag/get_owners" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_lollygag_get_gubbins_secrets_request( - **kwargs: Any, -) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/api/lollygag/gubbins_sensei" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - class WellKnownOperations: """ .. warning:: @@ -732,13 +681,13 @@ def openid_configuration(self, **kwargs: Any) -> Any: return deserialized # type: ignore @distributed_trace - def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata: + def installation_metadata(self, **kwargs: Any) -> _models.Metadata: """Installation Metadata. - Installation Metadata. + Get metadata about the dirac installation. - :return: ExtendedMetadata - :rtype: ~generated.models.ExtendedMetadata + :return: Metadata + :rtype: ~generated.models.Metadata :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -752,7 +701,7 @@ def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata: _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ExtendedMetadata] = kwargs.pop("cls", None) + cls: ClsType[_models.Metadata] = kwargs.pop("cls", None) _request = build_well_known_installation_metadata_request( headers=_headers, @@ -775,9 +724,7 @@ def installation_metadata(self, **kwargs: Any) -> _models.ExtendedMetadata: ) raise HttpResponseError(response=response) - deserialized = self._deserialize( - "ExtendedMetadata", pipeline_response.http_response - ) + deserialized = self._deserialize("Metadata", pipeline_response.http_response) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -2071,7 +2018,7 @@ def set_job_statuses( force: bool = False, content_type: str = "application/json", **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -2083,8 +2030,8 @@ def set_job_statuses( :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2096,7 +2043,7 @@ def set_job_statuses( force: bool = False, content_type: str = "application/json", **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -2108,8 +2055,8 @@ def set_job_statuses( :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2120,7 +2067,7 @@ def set_job_statuses( *, force: bool = False, **kwargs: Any, - ) -> Dict[str, _models.SetJobStatusReturn]: + ) -> _models.SetJobStatusReturn: """Set Job Statuses. Set Job Statuses. @@ -2129,8 +2076,8 @@ def set_job_statuses( :type body: dict[str, dict[str, ~generated.models.JobStatusUpdate]] or IO[bytes] :keyword force: Default value is False. :paramtype force: bool - :return: dict mapping str to SetJobStatusReturn - :rtype: dict[str, ~generated.models.SetJobStatusReturn] + :return: SetJobStatusReturn + :rtype: ~generated.models.SetJobStatusReturn :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2147,7 +2094,7 @@ def set_job_statuses( content_type: Optional[str] = kwargs.pop( "content_type", _headers.pop("Content-Type", None) ) - cls: ClsType[Dict[str, _models.SetJobStatusReturn]] = kwargs.pop("cls", None) + cls: ClsType[_models.SetJobStatusReturn] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None @@ -2183,7 +2130,7 @@ def set_job_statuses( raise HttpResponseError(response=response) deserialized = self._deserialize( - "{SetJobStatusReturn}", pipeline_response.http_response + "SetJobStatusReturn", pipeline_response.http_response ) if cls: @@ -2616,181 +2563,3 @@ def submit_bulk_jdl_jobs( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - - -class LollygagOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~generated.Dirac`'s - :attr:`lollygag` attribute. - """ - - models = _models - - def __init__(self, *args, **kwargs): - input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = ( - input_args.pop(0) if input_args else kwargs.pop("deserializer") - ) - - @distributed_trace - def insert_owner_object(self, owner_name: str, **kwargs: Any) -> Any: - """Insert Owner Object. - - Insert Owner Object. - - :param owner_name: Required. - :type owner_name: str - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_insert_owner_object_request( - owner_name=owner_name, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_owner_object(self, **kwargs: Any) -> Any: - """Get Owner Object. - - Get Owner Object. - - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_get_owner_object_request( - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_gubbins_secrets(self, **kwargs: Any) -> Any: - """Get Gubbins Secrets. - - Does nothing but expects a GUBBINS_SENSEI permission. - - :return: any - :rtype: any - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Any] = kwargs.pop("cls", None) - - _request = build_lollygag_get_gubbins_secrets_request( - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = ( - self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error( - status_code=response.status_code, response=response, error_map=error_map - ) - raise HttpResponseError(response=response) - - deserialized = self._deserialize("object", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore