Skip to content

Commit 5e317aa

Browse files
committed
Generated from 2acb8c0da57c70757b583407d1b86ac9ff36e30f
Merge pull request #8 from leonardbf/netapp-api-update-public NFSAAS-1644 remove mt get and add put status code
1 parent e1ca0d2 commit 5e317aa

File tree

7 files changed

+10
-76
lines changed

7 files changed

+10
-76
lines changed

azure-mgmt-netapp/azure/mgmt/netapp/models/dimension.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class Dimension(Model):
16-
"""Dimension of blobs, possibly be blob type or access tier.
16+
"""Dimension of blobs, possiblly be blob type or access tier.
1717
1818
:param name: Display name of dimension.
1919
:type name: str

azure-mgmt-netapp/azure/mgmt/netapp/models/dimension_py3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class Dimension(Model):
16-
"""Dimension of blobs, possibly be blob type or access tier.
16+
"""Dimension of blobs, possiblly be blob type or access tier.
1717
1818
:param name: Display name of dimension.
1919
:type name: str

azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MountTarget(Model):
3434
:param file_system_id: Required. fileSystemId. UUID v4 used to identify
3535
the MountTarget
3636
:type file_system_id: str
37-
:ivar ip_address: ipAddress. The mount target's IPv4 address
37+
:ivar ip_address: ipAddress. The mount targets's IPv4 address
3838
:vartype ip_address: str
3939
:param vlan_id: vlanid. Vlan Id
4040
:type vlan_id: int

azure-mgmt-netapp/azure/mgmt/netapp/models/mount_target_py3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MountTarget(Model):
3434
:param file_system_id: Required. fileSystemId. UUID v4 used to identify
3535
the MountTarget
3636
:type file_system_id: str
37-
:ivar ip_address: ipAddress. The mount target's IPv4 address
37+
:ivar ip_address: ipAddress. The mount targets's IPv4 address
3838
:vartype ip_address: str
3939
:param vlan_id: vlanid. Vlan Id
4040
:type vlan_id: int

azure-mgmt-netapp/azure/mgmt/netapp/operations/mount_targets_operations.py

-70
Original file line numberDiff line numberDiff line change
@@ -110,73 +110,3 @@ def internal_paging(next_link=None, raw=False):
110110

111111
return deserialized
112112
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets'}
113-
114-
def get(
115-
self, resource_group, account_name, pool_name, volume_name, mount_target_name, custom_headers=None, raw=False, **operation_config):
116-
"""Get a mount target.
117-
118-
:param resource_group: The name of the resource group.
119-
:type resource_group: str
120-
:param account_name: The name of the NetApp account
121-
:type account_name: str
122-
:param pool_name: The name of the capacity pool
123-
:type pool_name: str
124-
:param volume_name: The name of the volume
125-
:type volume_name: str
126-
:param mount_target_name: The name of the mount target
127-
:type mount_target_name: str
128-
:param dict custom_headers: headers that will be added to the request
129-
:param bool raw: returns the direct response alongside the
130-
deserialized response
131-
:param operation_config: :ref:`Operation configuration
132-
overrides<msrest:optionsforoperations>`.
133-
:return: MountTarget or ClientRawResponse if raw=true
134-
:rtype: ~azure.mgmt.netapp.models.MountTarget or
135-
~msrest.pipeline.ClientRawResponse
136-
:raises:
137-
:class:`ErrorException<azure.mgmt.netapp.models.ErrorException>`
138-
"""
139-
# Construct URL
140-
url = self.get.metadata['url']
141-
path_format_arguments = {
142-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
143-
'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'),
144-
'accountName': self._serialize.url("account_name", account_name, 'str'),
145-
'poolName': self._serialize.url("pool_name", pool_name, 'str'),
146-
'volumeName': self._serialize.url("volume_name", volume_name, 'str'),
147-
'mountTargetName': self._serialize.url("mount_target_name", mount_target_name, 'str')
148-
}
149-
url = self._client.format_url(url, **path_format_arguments)
150-
151-
# Construct parameters
152-
query_parameters = {}
153-
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
154-
155-
# Construct headers
156-
header_parameters = {}
157-
header_parameters['Accept'] = 'application/json'
158-
if self.config.generate_client_request_id:
159-
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
160-
if custom_headers:
161-
header_parameters.update(custom_headers)
162-
if self.config.accept_language is not None:
163-
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
164-
165-
# Construct and send request
166-
request = self._client.get(url, query_parameters, header_parameters)
167-
response = self._client.send(request, stream=False, **operation_config)
168-
169-
if response.status_code not in [200]:
170-
raise models.ErrorException(self._deserialize, response)
171-
172-
deserialized = None
173-
174-
if response.status_code == 200:
175-
deserialized = self._deserialize('MountTarget', response)
176-
177-
if raw:
178-
client_raw_response = ClientRawResponse(deserialized, response)
179-
return client_raw_response
180-
181-
return deserialized
182-
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets/{mountTargetName}'}

azure-mgmt-netapp/azure/mgmt/netapp/operations/pools_operations.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,13 @@ def _create_or_update_initial(
206206
request = self._client.put(url, query_parameters, header_parameters, body_content)
207207
response = self._client.send(request, stream=False, **operation_config)
208208

209-
if response.status_code not in [201, 202]:
209+
if response.status_code not in [200, 201, 202]:
210210
raise models.ErrorException(self._deserialize, response)
211211

212212
deserialized = None
213213

214+
if response.status_code == 200:
215+
deserialized = self._deserialize('CapacityPool', response)
214216
if response.status_code == 201:
215217
deserialized = self._deserialize('CapacityPool', response)
216218

azure-mgmt-netapp/azure/mgmt/netapp/operations/volumes_operations.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ def _create_or_update_initial(
213213
request = self._client.put(url, query_parameters, header_parameters, body_content)
214214
response = self._client.send(request, stream=False, **operation_config)
215215

216-
if response.status_code not in [201, 202]:
216+
if response.status_code not in [200, 201, 202]:
217217
raise models.ErrorException(self._deserialize, response)
218218

219219
deserialized = None
220220

221+
if response.status_code == 200:
222+
deserialized = self._deserialize('Volume', response)
221223
if response.status_code == 201:
222224
deserialized = self._deserialize('Volume', response)
223225

0 commit comments

Comments
 (0)