Skip to content

Commit 08e2d40

Browse files
author
SDKAuto
committed
CodeGen from PR 15691 in Azure/azure-rest-api-specs
Merge e10698d11f5ff0794acba3fd968297119929ad82 into 30d1537
1 parent 599ef47 commit 08e2d40

31 files changed

+592
-218
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].0",
4+
"@autorest/[email protected].4",
55
"@autorest/[email protected]"
66
],
7-
"commit": "2359ae379dcf396ef2eb389b050ac4972595fa6c",
7+
"commit": "90c5621bd61d1fbb71c4264631cbc934c475424d",
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].0 --use=@autorest/[email protected] --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].4 --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/netapp/resource-manager/readme.md"
1111
}

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

Lines changed: 1 addition & 1 deletion
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-04-01"
51+
self.api_version = "2021-06-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

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

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

Lines changed: 1 addition & 1 deletion
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 = "4.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 1 addition & 1 deletion
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-04-01"
48+
self.api_version = "2021-06-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

Lines changed: 3 additions & 3 deletions
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-04-01"
70+
api_version = "2021-06-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-04-01"
149+
api_version = "2021-06-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-04-01"
198+
api_version = "2021-06-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

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,74 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343
self._deserialize = deserializer
4444
self._config = config
4545

46+
def list_by_subscription(
47+
self,
48+
**kwargs: Any
49+
) -> AsyncIterable["_models.NetAppAccountList"]:
50+
"""Describe all NetApp Accounts in a subscription.
51+
52+
List and describe all NetApp accounts in the subscription.
53+
54+
:keyword callable cls: A custom type or function that will be passed the direct response
55+
:return: An iterator like instance of either NetAppAccountList or the result of cls(response)
56+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.NetAppAccountList]
57+
:raises: ~azure.core.exceptions.HttpResponseError
58+
"""
59+
cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccountList"]
60+
error_map = {
61+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
62+
}
63+
error_map.update(kwargs.pop('error_map', {}))
64+
api_version = "2021-06-01"
65+
accept = "application/json"
66+
67+
def prepare_request(next_link=None):
68+
# Construct headers
69+
header_parameters = {} # type: Dict[str, Any]
70+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
71+
72+
if not next_link:
73+
# Construct URL
74+
url = self.list_by_subscription.metadata['url'] # type: ignore
75+
path_format_arguments = {
76+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
77+
}
78+
url = self._client.format_url(url, **path_format_arguments)
79+
# Construct parameters
80+
query_parameters = {} # type: Dict[str, Any]
81+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
82+
83+
request = self._client.get(url, query_parameters, header_parameters)
84+
else:
85+
url = next_link
86+
query_parameters = {} # type: Dict[str, Any]
87+
request = self._client.get(url, query_parameters, header_parameters)
88+
return request
89+
90+
async def extract_data(pipeline_response):
91+
deserialized = self._deserialize('NetAppAccountList', pipeline_response)
92+
list_of_elem = deserialized.value
93+
if cls:
94+
list_of_elem = cls(list_of_elem)
95+
return deserialized.next_link or None, AsyncList(list_of_elem)
96+
97+
async def get_next(next_link=None):
98+
request = prepare_request(next_link)
99+
100+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
101+
response = pipeline_response.http_response
102+
103+
if response.status_code not in [200]:
104+
map_error(status_code=response.status_code, response=response, error_map=error_map)
105+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
106+
107+
return pipeline_response
108+
109+
return AsyncItemPaged(
110+
get_next, extract_data
111+
)
112+
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/netAppAccounts'} # type: ignore
113+
46114
def list(
47115
self,
48116
resource_group_name: str,
@@ -64,7 +132,7 @@ def list(
64132
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
65133
}
66134
error_map.update(kwargs.pop('error_map', {}))
67-
api_version = "2021-04-01"
135+
api_version = "2021-06-01"
68136
accept = "application/json"
69137

70138
def prepare_request(next_link=None):
@@ -139,7 +207,7 @@ async def get(
139207
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
140208
}
141209
error_map.update(kwargs.pop('error_map', {}))
142-
api_version = "2021-04-01"
210+
api_version = "2021-06-01"
143211
accept = "application/json"
144212

145213
# Construct URL
@@ -187,7 +255,7 @@ async def _create_or_update_initial(
187255
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
188256
}
189257
error_map.update(kwargs.pop('error_map', {}))
190-
api_version = "2021-04-01"
258+
api_version = "2021-06-01"
191259
content_type = kwargs.pop("content_type", "application/json")
192260
accept = "application/json"
193261

@@ -316,7 +384,7 @@ async def _delete_initial(
316384
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
317385
}
318386
error_map.update(kwargs.pop('error_map', {}))
319-
api_version = "2021-04-01"
387+
api_version = "2021-06-01"
320388

321389
# Construct URL
322390
url = self._delete_initial.metadata['url'] # type: ignore
@@ -425,7 +493,7 @@ async def _update_initial(
425493
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
426494
}
427495
error_map.update(kwargs.pop('error_map', {}))
428-
api_version = "2021-04-01"
496+
api_version = "2021-06-01"
429497
content_type = kwargs.pop("content_type", "application/json")
430498
accept = "application/json"
431499

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

Lines changed: 5 additions & 5 deletions
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-04-01"
70+
api_version = "2021-06-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-04-01"
149+
api_version = "2021-06-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-04-01"
199+
api_version = "2021-06-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-04-01"
337+
api_version = "2021-06-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-04-01"
473+
api_version = "2021-06-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

Lines changed: 7 additions & 7 deletions
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-04-01"
76+
api_version = "2021-06-01"
7777
accept = "application/json"
7878

7979
# Construct URL
@@ -141,7 +141,7 @@ async def get_volume_restore_status(
141141
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
142142
}
143143
error_map.update(kwargs.pop('error_map', {}))
144-
api_version = "2021-04-01"
144+
api_version = "2021-06-01"
145145
accept = "application/json"
146146

147147
# Construct URL
@@ -209,7 +209,7 @@ def list(
209209
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
210210
}
211211
error_map.update(kwargs.pop('error_map', {}))
212-
api_version = "2021-04-01"
212+
api_version = "2021-06-01"
213213
accept = "application/json"
214214

215215
def prepare_request(next_link=None):
@@ -296,7 +296,7 @@ async def get(
296296
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
297297
}
298298
error_map.update(kwargs.pop('error_map', {}))
299-
api_version = "2021-04-01"
299+
api_version = "2021-06-01"
300300
accept = "application/json"
301301

302302
# Construct URL
@@ -350,7 +350,7 @@ async def _create_initial(
350350
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
351351
}
352352
error_map.update(kwargs.pop('error_map', {}))
353-
api_version = "2021-04-01"
353+
api_version = "2021-06-01"
354354
content_type = kwargs.pop("content_type", "application/json")
355355
accept = "application/json"
356356

@@ -502,7 +502,7 @@ async def _update_initial(
502502
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
503503
}
504504
error_map.update(kwargs.pop('error_map', {}))
505-
api_version = "2021-04-01"
505+
api_version = "2021-06-01"
506506
content_type = kwargs.pop("content_type", "application/json")
507507
accept = "application/json"
508508

@@ -655,7 +655,7 @@ async def _delete_initial(
655655
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
656656
}
657657
error_map.update(kwargs.pop('error_map', {}))
658-
api_version = "2021-04-01"
658+
api_version = "2021-06-01"
659659

660660
# Construct URL
661661
url = self._delete_initial.metadata['url'] # type: ignore

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

Lines changed: 3 additions & 3 deletions
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-04-01"
75+
api_version = "2021-06-01"
7676
content_type = kwargs.pop("content_type", "application/json")
7777
accept = "application/json"
7878

@@ -142,7 +142,7 @@ async def check_file_path_availability(
142142
error_map.update(kwargs.pop('error_map', {}))
143143

144144
_body = _models.FilePathAvailabilityRequest(name=name, subnet_id=subnet_id)
145-
api_version = "2021-04-01"
145+
api_version = "2021-06-01"
146146
content_type = kwargs.pop("content_type", "application/json")
147147
accept = "application/json"
148148

@@ -214,7 +214,7 @@ async def check_quota_availability(
214214
error_map.update(kwargs.pop('error_map', {}))
215215

216216
_body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group)
217-
api_version = "2021-04-01"
217+
api_version = "2021-06-01"
218218
content_type = kwargs.pop("content_type", "application/json")
219219
accept = "application/json"
220220

0 commit comments

Comments
 (0)