Skip to content

Commit ff778a6

Browse files
author
hildurhodd
authored
update netappfiles (Azure#19327)
1 parent fae3605 commit ff778a6

File tree

78 files changed

+8090
-10154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+8090
-10154
lines changed

sdk/netapp/azure-mgmt-netapp/CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Release History
22

3+
## 4.0.0 (2021-06-11)
4+
5+
**Features**
6+
7+
- Model ExportPolicyRule has a new parameter chown_mode
8+
- Model BackupStatus has a new parameter last_transfer_size
9+
- Model BackupStatus has a new parameter total_transfer_bytes
10+
- Model BackupStatus has a new parameter last_transfer_type
11+
- Model Volume has a new parameter cool_access
12+
- Model Volume has a new parameter unix_permissions
13+
- Model Volume has a new parameter coolness_period
14+
- Model CapacityPool has a new parameter cool_access
15+
- Model ActiveDirectory has a new parameter administrators
16+
- Added operation BackupsOperations.get_volume_restore_status
17+
18+
**Breaking changes**
19+
20+
- Operation NetAppResourceOperations.check_file_path_availability has a new signature
21+
322
## 3.0.0 (2021-05-21)
423

524
**Features**

sdk/netapp/azure-mgmt-netapp/_meta.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"autorest": "3.4.2",
33
"use": [
44
"@autorest/[email protected]",
5-
"@autorest/[email protected].1"
5+
"@autorest/[email protected].2"
66
],
7-
"commit": "20b168918d11ebeee6f00c71c0c41b93aae0ce0d",
7+
"commit": "2359ae379dcf396ef2eb389b050ac4972595fa6c",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/netapp/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/[email protected] --use=@autorest/[email protected].1 --version=3.4.2",
9+
"autorest_command": "autorest specification/netapp/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/[email protected] --use=@autorest/[email protected].2 --version=3.4.2",
1010
"readme": "specification/netapp/resource-manager/readme.md"
1111
}

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2021-02-01"
51+
self.api_version = "2021-04-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2021-02-01",
3-
"total_api_version_list": ["2021-02-01"],
2+
"chosen_version": "2021-04-01",
3+
"total_api_version_list": ["2021-04-01"],
44
"client": {
55
"name": "NetAppManagementClient",
66
"filename": "_net_app_management_client",

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "3.0.0"
9+
VERSION = "4.0.0"

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2021-02-01"
48+
self.api_version = "2021-04-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def list(
6767
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6868
}
6969
error_map.update(kwargs.pop('error_map', {}))
70-
api_version = "2021-02-01"
70+
api_version = "2021-04-01"
7171
accept = "application/json"
7272

7373
def prepare_request(next_link=None):
@@ -146,7 +146,7 @@ async def get(
146146
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
147147
}
148148
error_map.update(kwargs.pop('error_map', {}))
149-
api_version = "2021-02-01"
149+
api_version = "2021-04-01"
150150
accept = "application/json"
151151

152152
# Construct URL
@@ -195,7 +195,7 @@ async def _delete_initial(
195195
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
196196
}
197197
error_map.update(kwargs.pop('error_map', {}))
198-
api_version = "2021-02-01"
198+
api_version = "2021-04-01"
199199

200200
# Construct URL
201201
url = self._delete_initial.metadata['url'] # type: ignore

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def list(
6464
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6565
}
6666
error_map.update(kwargs.pop('error_map', {}))
67-
api_version = "2021-02-01"
67+
api_version = "2021-04-01"
6868
accept = "application/json"
6969

7070
def prepare_request(next_link=None):
@@ -139,7 +139,7 @@ async def get(
139139
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
140140
}
141141
error_map.update(kwargs.pop('error_map', {}))
142-
api_version = "2021-02-01"
142+
api_version = "2021-04-01"
143143
accept = "application/json"
144144

145145
# Construct URL
@@ -187,7 +187,7 @@ async def _create_or_update_initial(
187187
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
188188
}
189189
error_map.update(kwargs.pop('error_map', {}))
190-
api_version = "2021-02-01"
190+
api_version = "2021-04-01"
191191
content_type = kwargs.pop("content_type", "application/json")
192192
accept = "application/json"
193193

@@ -316,7 +316,7 @@ async def _delete_initial(
316316
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
317317
}
318318
error_map.update(kwargs.pop('error_map', {}))
319-
api_version = "2021-02-01"
319+
api_version = "2021-04-01"
320320

321321
# Construct URL
322322
url = self._delete_initial.metadata['url'] # type: ignore
@@ -425,7 +425,7 @@ async def _update_initial(
425425
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
426426
}
427427
error_map.update(kwargs.pop('error_map', {}))
428-
api_version = "2021-02-01"
428+
api_version = "2021-04-01"
429429
content_type = kwargs.pop("content_type", "application/json")
430430
accept = "application/json"
431431

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def list(
6767
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6868
}
6969
error_map.update(kwargs.pop('error_map', {}))
70-
api_version = "2021-02-01"
70+
api_version = "2021-04-01"
7171
accept = "application/json"
7272

7373
def prepare_request(next_link=None):
@@ -146,7 +146,7 @@ async def get(
146146
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
147147
}
148148
error_map.update(kwargs.pop('error_map', {}))
149-
api_version = "2021-02-01"
149+
api_version = "2021-04-01"
150150
accept = "application/json"
151151

152152
# Construct URL
@@ -196,7 +196,7 @@ async def _create_initial(
196196
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
197197
}
198198
error_map.update(kwargs.pop('error_map', {}))
199-
api_version = "2021-02-01"
199+
api_version = "2021-04-01"
200200
content_type = kwargs.pop("content_type", "application/json")
201201
accept = "application/json"
202202

@@ -334,7 +334,7 @@ async def _update_initial(
334334
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
335335
}
336336
error_map.update(kwargs.pop('error_map', {}))
337-
api_version = "2021-02-01"
337+
api_version = "2021-04-01"
338338
content_type = kwargs.pop("content_type", "application/json")
339339
accept = "application/json"
340340

@@ -470,7 +470,7 @@ async def _delete_initial(
470470
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
471471
}
472472
error_map.update(kwargs.pop('error_map', {}))
473-
api_version = "2021-02-01"
473+
api_version = "2021-04-01"
474474

475475
# Construct URL
476476
url = self._delete_initial.metadata['url'] # type: ignore

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py

+74-6
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def get_status(
7373
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7474
}
7575
error_map.update(kwargs.pop('error_map', {}))
76-
api_version = "2021-02-01"
76+
api_version = "2021-04-01"
7777
accept = "application/json"
7878

7979
# Construct URL
@@ -111,6 +111,74 @@ async def get_status(
111111
return deserialized
112112
get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backupStatus'} # type: ignore
113113

114+
async def get_volume_restore_status(
115+
self,
116+
resource_group_name: str,
117+
account_name: str,
118+
pool_name: str,
119+
volume_name: str,
120+
**kwargs: Any
121+
) -> "_models.RestoreStatus":
122+
"""Get volume's restore status.
123+
124+
Get the status of the restore for a volume.
125+
126+
:param resource_group_name: The name of the resource group.
127+
:type resource_group_name: str
128+
:param account_name: The name of the NetApp account.
129+
:type account_name: str
130+
:param pool_name: The name of the capacity pool.
131+
:type pool_name: str
132+
:param volume_name: The name of the volume.
133+
:type volume_name: str
134+
:keyword callable cls: A custom type or function that will be passed the direct response
135+
:return: RestoreStatus, or the result of cls(response)
136+
:rtype: ~azure.mgmt.netapp.models.RestoreStatus
137+
:raises: ~azure.core.exceptions.HttpResponseError
138+
"""
139+
cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreStatus"]
140+
error_map = {
141+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
142+
}
143+
error_map.update(kwargs.pop('error_map', {}))
144+
api_version = "2021-04-01"
145+
accept = "application/json"
146+
147+
# Construct URL
148+
url = self.get_volume_restore_status.metadata['url'] # type: ignore
149+
path_format_arguments = {
150+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
151+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
152+
'accountName': self._serialize.url("account_name", account_name, 'str'),
153+
'poolName': self._serialize.url("pool_name", pool_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'),
154+
'volumeName': self._serialize.url("volume_name", volume_name, 'str', max_length=64, min_length=1, pattern=r'^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'),
155+
}
156+
url = self._client.format_url(url, **path_format_arguments)
157+
158+
# Construct parameters
159+
query_parameters = {} # type: Dict[str, Any]
160+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
161+
162+
# Construct headers
163+
header_parameters = {} # type: Dict[str, Any]
164+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
165+
166+
request = self._client.get(url, query_parameters, header_parameters)
167+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
168+
response = pipeline_response.http_response
169+
170+
if response.status_code not in [200]:
171+
map_error(status_code=response.status_code, response=response, error_map=error_map)
172+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
173+
174+
deserialized = self._deserialize('RestoreStatus', pipeline_response)
175+
176+
if cls:
177+
return cls(pipeline_response, deserialized, {})
178+
179+
return deserialized
180+
get_volume_restore_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus'} # type: ignore
181+
114182
def list(
115183
self,
116184
resource_group_name: str,
@@ -141,7 +209,7 @@ def list(
141209
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
142210
}
143211
error_map.update(kwargs.pop('error_map', {}))
144-
api_version = "2021-02-01"
212+
api_version = "2021-04-01"
145213
accept = "application/json"
146214

147215
def prepare_request(next_link=None):
@@ -228,7 +296,7 @@ async def get(
228296
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
229297
}
230298
error_map.update(kwargs.pop('error_map', {}))
231-
api_version = "2021-02-01"
299+
api_version = "2021-04-01"
232300
accept = "application/json"
233301

234302
# Construct URL
@@ -282,7 +350,7 @@ async def _create_initial(
282350
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
283351
}
284352
error_map.update(kwargs.pop('error_map', {}))
285-
api_version = "2021-02-01"
353+
api_version = "2021-04-01"
286354
content_type = kwargs.pop("content_type", "application/json")
287355
accept = "application/json"
288356

@@ -434,7 +502,7 @@ async def _update_initial(
434502
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
435503
}
436504
error_map.update(kwargs.pop('error_map', {}))
437-
api_version = "2021-02-01"
505+
api_version = "2021-04-01"
438506
content_type = kwargs.pop("content_type", "application/json")
439507
accept = "application/json"
440508

@@ -587,7 +655,7 @@ async def _delete_initial(
587655
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
588656
}
589657
error_map.update(kwargs.pop('error_map', {}))
590-
api_version = "2021-02-01"
658+
api_version = "2021-04-01"
591659

592660
# Construct URL
593661
url = self._delete_initial.metadata['url'] # type: ignore

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py

+10-12
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ async def check_name_availability(
7272
error_map.update(kwargs.pop('error_map', {}))
7373

7474
_body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group)
75-
api_version = "2021-02-01"
75+
api_version = "2021-04-01"
7676
content_type = kwargs.pop("content_type", "application/json")
7777
accept = "application/json"
7878

@@ -116,8 +116,7 @@ async def check_file_path_availability(
116116
self,
117117
location: str,
118118
name: str,
119-
type: Union[str, "_models.CheckNameResourceTypes"],
120-
resource_group: str,
119+
subnet_id: str,
121120
**kwargs: Any
122121
) -> "_models.CheckAvailabilityResponse":
123122
"""Check file path availability.
@@ -126,12 +125,11 @@ async def check_file_path_availability(
126125
127126
:param location: The location.
128127
:type location: str
129-
:param name: Resource name to verify.
128+
:param name: File path to verify.
130129
:type name: str
131-
:param type: Resource type used for verification.
132-
:type type: str or ~azure.mgmt.netapp.models.CheckNameResourceTypes
133-
:param resource_group: Resource group name.
134-
:type resource_group: str
130+
:param subnet_id: The Azure Resource URI for a delegated subnet. Must have the delegation
131+
Microsoft.NetApp/volumes.
132+
:type subnet_id: str
135133
:keyword callable cls: A custom type or function that will be passed the direct response
136134
:return: CheckAvailabilityResponse, or the result of cls(response)
137135
:rtype: ~azure.mgmt.netapp.models.CheckAvailabilityResponse
@@ -143,8 +141,8 @@ async def check_file_path_availability(
143141
}
144142
error_map.update(kwargs.pop('error_map', {}))
145143

146-
_body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group)
147-
api_version = "2021-02-01"
144+
_body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id)
145+
api_version = "2021-04-01"
148146
content_type = kwargs.pop("content_type", "application/json")
149147
accept = "application/json"
150148

@@ -166,7 +164,7 @@ async def check_file_path_availability(
166164
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
167165

168166
body_content_kwargs = {} # type: Dict[str, Any]
169-
body_content = self._serialize.body(_body, 'ResourceNameAvailabilityRequest')
167+
body_content = self._serialize.body(_body, 'FilePathAvailabilityRequest')
170168
body_content_kwargs['content'] = body_content
171169
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
172170
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
@@ -216,7 +214,7 @@ async def check_quota_availability(
216214
error_map.update(kwargs.pop('error_map', {}))
217215

218216
_body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group)
219-
api_version = "2021-02-01"
217+
api_version = "2021-04-01"
220218
content_type = kwargs.pop("content_type", "application/json")
221219
accept = "application/json"
222220

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def list(
5959
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6060
}
6161
error_map.update(kwargs.pop('error_map', {}))
62-
api_version = "2021-02-01"
62+
api_version = "2021-04-01"
6363
accept = "application/json"
6464

6565
def prepare_request(next_link=None):

0 commit comments

Comments
 (0)