diff --git a/sdk/quantum/azure-mgmt-quantum/CHANGELOG.md b/sdk/quantum/azure-mgmt-quantum/CHANGELOG.md index ae9b105d26c3..5eb36e0f1df5 100644 --- a/sdk/quantum/azure-mgmt-quantum/CHANGELOG.md +++ b/sdk/quantum/azure-mgmt-quantum/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +## 1.0.0b2 (2021-08-04) + +**Features** + + - Model SkuDescription has a new parameter version + - Model SkuDescription has a new parameter restricted_access_uri + - Model QuantumWorkspace has a new parameter system_data + - Added operation group WorkspaceOperations + ## 1.0.0b1 (2021-01-28) * Initial Release diff --git a/sdk/quantum/azure-mgmt-quantum/MANIFEST.in b/sdk/quantum/azure-mgmt-quantum/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/quantum/azure-mgmt-quantum/MANIFEST.in +++ b/sdk/quantum/azure-mgmt-quantum/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/quantum/azure-mgmt-quantum/_meta.json b/sdk/quantum/azure-mgmt-quantum/_meta.json new file mode 100644 index 000000000000..08d9d2f8324a --- /dev/null +++ b/sdk/quantum/azure-mgmt-quantum/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.0", + "@autorest/modelerfour@4.19.2" + ], + "commit": "5e076b3d3a0d6b5c9f083a0fddf0e3082137b0c6", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/quantum/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/quantum/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_azure_quantum_management_client.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_azure_quantum_management_client.py index b21ae2bc5432..e74caffd2e08 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_azure_quantum_management_client.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_azure_quantum_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import AzureQuantumManagementClientConfiguration from .operations import WorkspacesOperations @@ -56,6 +57,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.workspaces = WorkspacesOperations( @@ -65,6 +67,24 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_metadata.json b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_metadata.json index 504f92265452..6136cbdae779 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_metadata.json +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureQuantumManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureQuantumManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Azure subscription ID.", "docstring_type": "str", "required": true @@ -42,22 +44,62 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "workspaces": "WorkspacesOperations", "offerings": "OfferingsOperations", "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_version.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_version.py index e5754a47ce68..dfa6ee022f15 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_version.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_azure_quantum_management_client.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_azure_quantum_management_client.py index 9bf183a96b59..3ecd7df9d3a2 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_azure_quantum_management_client.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/_azure_quantum_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -53,6 +54,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.workspaces = WorkspacesOperations( @@ -62,6 +64,23 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_offerings_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_offerings_operations.py index 5c35e84f52fb..f0a358e93a60 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_offerings_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_offerings_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, location_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OfferingsListResult"]: """Returns the list of all provider offerings available for the given location. @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_operations.py index 186b25d86f33..cee85b21cc0d 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationsList"]: """Returns list of operations. @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_workspaces_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_workspaces_operations.py index 5518dc84bb9e..7164002c7e56 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_workspaces_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/aio/operations/_workspaces_operations.py @@ -47,7 +47,7 @@ async def get( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> "_models.QuantumWorkspace": """Returns the Workspace resource associated with the given name. @@ -91,7 +91,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuantumWorkspace', pipeline_response) @@ -107,7 +107,7 @@ async def _create_or_update_initial( resource_group_name: str, workspace_name: str, quantum_workspace: "_models.QuantumWorkspace", - **kwargs + **kwargs: Any ) -> "_models.QuantumWorkspace": cls = kwargs.pop('cls', None) # type: ClsType["_models.QuantumWorkspace"] error_map = { @@ -145,7 +145,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -165,7 +165,7 @@ async def begin_create_or_update( resource_group_name: str, workspace_name: str, quantum_workspace: "_models.QuantumWorkspace", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.QuantumWorkspace"]: """Creates or updates a workspace resource. @@ -177,8 +177,8 @@ async def begin_create_or_update( :type quantum_workspace: ~azure.mgmt.quantum.models.QuantumWorkspace :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either QuantumWorkspace or the result of cls(response) @@ -236,7 +236,7 @@ async def update_tags( resource_group_name: str, workspace_name: str, workspace_tags: "_models.TagsObject", - **kwargs + **kwargs: Any ) -> "_models.QuantumWorkspace": """Updates an existing workspace's tags. @@ -287,7 +287,7 @@ async def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuantumWorkspace', pipeline_response) @@ -302,7 +302,7 @@ async def _delete_initial( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -335,7 +335,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -347,7 +347,7 @@ async def begin_delete( self, resource_group_name: str, workspace_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Workspace resource. @@ -357,8 +357,8 @@ async def begin_delete( :type workspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -409,7 +409,7 @@ def get_long_running_output(pipeline_response): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkspaceListResult"]: """Gets the list of Workspaces within a Subscription. @@ -463,7 +463,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -477,7 +477,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkspaceListResult"]: """Gets the list of Workspaces within a resource group. @@ -534,7 +534,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models.py index 71c3bc82a792..a71b94e8e1b4 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models.py @@ -18,7 +18,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models_py3.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models_py3.py index 2089259c3ddf..f84895b188cf 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models_py3.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/models/_models_py3.py @@ -22,7 +22,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_offerings_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_offerings_operations.py index 9a0e323773c4..4f947bcc9c85 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_offerings_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_offerings_operations.py @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_operations.py index c8bea18553b3..e1c5ea4d3114 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_operations.py @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_workspaces_operations.py b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_workspaces_operations.py index 5e624f657ecf..e0a88dfb1969 100644 --- a/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_workspaces_operations.py +++ b/sdk/quantum/azure-mgmt-quantum/azure/mgmt/quantum/operations/_workspaces_operations.py @@ -96,7 +96,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuantumWorkspace', pipeline_response) @@ -151,7 +151,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -184,8 +184,8 @@ def begin_create_or_update( :type quantum_workspace: ~azure.mgmt.quantum.models.QuantumWorkspace :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either QuantumWorkspace or the result of cls(response) @@ -295,7 +295,7 @@ def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuantumWorkspace', pipeline_response) @@ -344,7 +344,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -367,8 +367,8 @@ def begin_delete( :type workspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -474,7 +474,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -546,7 +546,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/quantum/azure-mgmt-quantum/setup.py b/sdk/quantum/azure-mgmt-quantum/setup.py index 74a055488d25..0e119208e705 100644 --- a/sdk/quantum/azure-mgmt-quantum/setup.py +++ b/sdk/quantum/azure-mgmt-quantum/setup.py @@ -81,7 +81,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-common~=1.1', 'azure-mgmt-core>=1.2.0,<2.0.0', ], diff --git a/shared_requirements.txt b/shared_requirements.txt index 36eb733326fd..ef7f95a7716d 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -318,6 +318,7 @@ opentelemetry-sdk<2.0.0,>=1.0.0 #override azure-mgmt-cognitiveservices msrest>=0.6.21 #override azure-mgmt-hdinsight msrest>=0.6.21 #override azure-mgmt-batchai msrest>=0.6.21 +#override azure-mgmt-quantum msrest>=0.6.21 #override azure-mgmt-costmanagement msrest>=0.6.21 #override azure-mgmt-testbase msrest>=0.6.21 #override azure-mgmt-agrifood msrest>=0.6.21