diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py index dd751b4718b7..a900436b7de9 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py @@ -110,73 +110,3 @@ def internal_paging(next_link=None, raw=False): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets'} - - def get( - self, resource_group, account_name, pool_name, volume_name, mount_target_name, custom_headers=None, raw=False, **operation_config): - """Get a mount target. - - :param resource_group: The name of the resource group. - :type resource_group: str - :param account_name: The name of the NetApp account - :type account_name: str - :param pool_name: The name of the capacity pool - :type pool_name: str - :param volume_name: The name of the volume - :type volume_name: str - :param mount_target_name: The name of the mount target - :type mount_target_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: MountTarget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.netapp.models.MountTarget or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'accountName': self._serialize.url("account_name", account_name, 'str'), - 'poolName': self._serialize.url("pool_name", pool_name, 'str'), - 'volumeName': self._serialize.url("volume_name", volume_name, 'str'), - 'mountTargetName': self._serialize.url("mount_target_name", mount_target_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MountTarget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets/{mountTargetName}'} diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py index a3d8b3f8556f..5bf900e3c398 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py @@ -206,11 +206,13 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [201, 202]: + if response.status_code not in [200, 201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CapacityPool', response) if response.status_code == 201: deserialized = self._deserialize('CapacityPool', response) diff --git a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py index ef9fffd38c81..c31c39a6abfb 100644 --- a/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py +++ b/azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py @@ -213,11 +213,13 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [201, 202]: + if response.status_code not in [200, 201, 202]: raise models.ErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Volume', response) if response.status_code == 201: deserialized = self._deserialize('Volume', response)