Skip to content

Commit 1a03ad3

Browse files
author
SDKAuto
committed
CodeGen from PR 15850 in Azure/azure-rest-api-specs
Merge 92d4fb03b8c76f4769cf89c488f6d9ac22248f4e into a2ff0f7
1 parent 7373db2 commit 1a03ad3

13 files changed

+823
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "1a5e9c6601a9611ac23c58bc9857693dcd9884f3",
7+
"commit": "0d58dabcc5439f8e7261cf0361f55b0bcfac0adf",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
99
"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] --version=3.4.5",
1010
"readme": "specification/netapp/resource-manager/readme.md"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"operation_groups": {
101101
"operations": "Operations",
102102
"net_app_resource": "NetAppResourceOperations",
103+
"net_app_resource_quota_limits": "NetAppResourceQuotaLimitsOperations",
103104
"accounts": "AccountsOperations",
104105
"pools": "PoolsOperations",
105106
"volumes": "VolumesOperations",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ._configuration import NetAppManagementClientConfiguration
2222
from .operations import Operations
2323
from .operations import NetAppResourceOperations
24+
from .operations import NetAppResourceQuotaLimitsOperations
2425
from .operations import AccountsOperations
2526
from .operations import PoolsOperations
2627
from .operations import VolumesOperations
@@ -40,6 +41,8 @@ class NetAppManagementClient(object):
4041
:vartype operations: azure.mgmt.netapp.operations.Operations
4142
:ivar net_app_resource: NetAppResourceOperations operations
4243
:vartype net_app_resource: azure.mgmt.netapp.operations.NetAppResourceOperations
44+
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
45+
:vartype net_app_resource_quota_limits: azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations
4346
:ivar accounts: AccountsOperations operations
4447
:vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
4548
:ivar pools: PoolsOperations operations
@@ -88,6 +91,8 @@ def __init__(
8891
self._client, self._config, self._serialize, self._deserialize)
8992
self.net_app_resource = NetAppResourceOperations(
9093
self._client, self._config, self._serialize, self._deserialize)
94+
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
95+
self._client, self._config, self._serialize, self._deserialize)
9196
self.accounts = AccountsOperations(
9297
self._client, self._config, self._serialize, self._deserialize)
9398
self.pools = PoolsOperations(

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 = "5.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from ._configuration import NetAppManagementClientConfiguration
2020
from .operations import Operations
2121
from .operations import NetAppResourceOperations
22+
from .operations import NetAppResourceQuotaLimitsOperations
2223
from .operations import AccountsOperations
2324
from .operations import PoolsOperations
2425
from .operations import VolumesOperations
@@ -38,6 +39,8 @@ class NetAppManagementClient(object):
3839
:vartype operations: azure.mgmt.netapp.aio.operations.Operations
3940
:ivar net_app_resource: NetAppResourceOperations operations
4041
:vartype net_app_resource: azure.mgmt.netapp.aio.operations.NetAppResourceOperations
42+
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
43+
:vartype net_app_resource_quota_limits: azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations
4144
:ivar accounts: AccountsOperations operations
4245
:vartype accounts: azure.mgmt.netapp.aio.operations.AccountsOperations
4346
:ivar pools: PoolsOperations operations
@@ -85,6 +88,8 @@ def __init__(
8588
self._client, self._config, self._serialize, self._deserialize)
8689
self.net_app_resource = NetAppResourceOperations(
8790
self._client, self._config, self._serialize, self._deserialize)
91+
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
92+
self._client, self._config, self._serialize, self._deserialize)
8893
self.accounts = AccountsOperations(
8994
self._client, self._config, self._serialize, self._deserialize)
9095
self.pools = PoolsOperations(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from ._operations import Operations
1010
from ._net_app_resource_operations import NetAppResourceOperations
11+
from ._net_app_resource_quota_limits_operations import NetAppResourceQuotaLimitsOperations
1112
from ._accounts_operations import AccountsOperations
1213
from ._pools_operations import PoolsOperations
1314
from ._volumes_operations import VolumesOperations
@@ -21,6 +22,7 @@
2122
__all__ = [
2223
'Operations',
2324
'NetAppResourceOperations',
25+
'NetAppResourceQuotaLimitsOperations',
2426
'AccountsOperations',
2527
'PoolsOperations',
2628
'VolumesOperations',
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
9+
import warnings
10+
11+
from azure.core.async_paging import AsyncItemPaged, AsyncList
12+
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
13+
from azure.core.pipeline import PipelineResponse
14+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
15+
from azure.mgmt.core.exceptions import ARMErrorFormat
16+
17+
from ... import models as _models
18+
19+
T = TypeVar('T')
20+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
21+
22+
class NetAppResourceQuotaLimitsOperations:
23+
"""NetAppResourceQuotaLimitsOperations async operations.
24+
25+
You should not instantiate this class directly. Instead, you should create a Client instance that
26+
instantiates it for you and attaches it as an attribute.
27+
28+
:ivar models: Alias to model classes used in this operation group.
29+
:type models: ~azure.mgmt.netapp.models
30+
:param client: Client for service requests.
31+
:param config: Configuration of service client.
32+
:param serializer: An object model serializer.
33+
:param deserializer: An object model deserializer.
34+
"""
35+
36+
models = _models
37+
38+
def __init__(self, client, config, serializer, deserializer) -> None:
39+
self._client = client
40+
self._serialize = serializer
41+
self._deserialize = deserializer
42+
self._config = config
43+
44+
def list(
45+
self,
46+
location: str,
47+
**kwargs: Any
48+
) -> AsyncIterable["_models.SubscriptionQuotaItemList"]:
49+
"""Get quota limits.
50+
51+
Get the default and current limits for quotas.
52+
53+
:param location: The location.
54+
:type location: str
55+
:keyword callable cls: A custom type or function that will be passed the direct response
56+
:return: An iterator like instance of either SubscriptionQuotaItemList or the result of cls(response)
57+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.SubscriptionQuotaItemList]
58+
:raises: ~azure.core.exceptions.HttpResponseError
59+
"""
60+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItemList"]
61+
error_map = {
62+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
63+
}
64+
error_map.update(kwargs.pop('error_map', {}))
65+
api_version = "2021-06-01"
66+
accept = "application/json"
67+
68+
def prepare_request(next_link=None):
69+
# Construct headers
70+
header_parameters = {} # type: Dict[str, Any]
71+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
72+
73+
if not next_link:
74+
# Construct URL
75+
url = self.list.metadata['url'] # type: ignore
76+
path_format_arguments = {
77+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
78+
'location': self._serialize.url("location", location, 'str'),
79+
}
80+
url = self._client.format_url(url, **path_format_arguments)
81+
# Construct parameters
82+
query_parameters = {} # type: Dict[str, Any]
83+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
84+
85+
request = self._client.get(url, query_parameters, header_parameters)
86+
else:
87+
url = next_link
88+
query_parameters = {} # type: Dict[str, Any]
89+
request = self._client.get(url, query_parameters, header_parameters)
90+
return request
91+
92+
async def extract_data(pipeline_response):
93+
deserialized = self._deserialize('SubscriptionQuotaItemList', pipeline_response)
94+
list_of_elem = deserialized.value
95+
if cls:
96+
list_of_elem = cls(list_of_elem)
97+
return None, AsyncList(list_of_elem)
98+
99+
async def get_next(next_link=None):
100+
request = prepare_request(next_link)
101+
102+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
103+
response = pipeline_response.http_response
104+
105+
if response.status_code not in [200]:
106+
map_error(status_code=response.status_code, response=response, error_map=error_map)
107+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
108+
109+
return pipeline_response
110+
111+
return AsyncItemPaged(
112+
get_next, extract_data
113+
)
114+
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits'} # type: ignore
115+
116+
async def get(
117+
self,
118+
location: str,
119+
quota_limit_name: str,
120+
**kwargs: Any
121+
) -> "_models.SubscriptionQuotaItem":
122+
"""Get quota limits.
123+
124+
Get the default and current subscription quota limit.
125+
126+
:param location: The location.
127+
:type location: str
128+
:param quota_limit_name: The name of the Quota Limit.
129+
:type quota_limit_name: str
130+
:keyword callable cls: A custom type or function that will be passed the direct response
131+
:return: SubscriptionQuotaItem, or the result of cls(response)
132+
:rtype: ~azure.mgmt.netapp.models.SubscriptionQuotaItem
133+
:raises: ~azure.core.exceptions.HttpResponseError
134+
"""
135+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItem"]
136+
error_map = {
137+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
138+
}
139+
error_map.update(kwargs.pop('error_map', {}))
140+
api_version = "2021-06-01"
141+
accept = "application/json"
142+
143+
# Construct URL
144+
url = self.get.metadata['url'] # type: ignore
145+
path_format_arguments = {
146+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
147+
'location': self._serialize.url("location", location, 'str'),
148+
'quotaLimitName': self._serialize.url("quota_limit_name", quota_limit_name, 'str'),
149+
}
150+
url = self._client.format_url(url, **path_format_arguments)
151+
152+
# Construct parameters
153+
query_parameters = {} # type: Dict[str, Any]
154+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
155+
156+
# Construct headers
157+
header_parameters = {} # type: Dict[str, Any]
158+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
159+
160+
request = self._client.get(url, query_parameters, header_parameters)
161+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
162+
response = pipeline_response.http_response
163+
164+
if response.status_code not in [200]:
165+
map_error(status_code=response.status_code, response=response, error_map=error_map)
166+
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
167+
168+
deserialized = self._deserialize('SubscriptionQuotaItem', pipeline_response)
169+
170+
if cls:
171+
return cls(pipeline_response, deserialized, {})
172+
173+
return deserialized
174+
get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}'} # type: ignore

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from ._models_py3 import ExportPolicyRule
3030
from ._models_py3 import FilePathAvailabilityRequest
3131
from ._models_py3 import HourlySchedule
32+
from ._models_py3 import LogSpecification
3233
from ._models_py3 import MetricSpecification
3334
from ._models_py3 import MonthlySchedule
3435
from ._models_py3 import MountTarget
@@ -40,9 +41,11 @@
4041
from ._models_py3 import OperationDisplay
4142
from ._models_py3 import OperationListResult
4243
from ._models_py3 import PoolChangeRequest
44+
from ._models_py3 import ProxyResource
4345
from ._models_py3 import QuotaAvailabilityRequest
4446
from ._models_py3 import ReplicationObject
4547
from ._models_py3 import ReplicationStatus
48+
from ._models_py3 import Resource
4649
from ._models_py3 import ResourceIdentity
4750
from ._models_py3 import ResourceNameAvailabilityRequest
4851
from ._models_py3 import RestoreStatus
@@ -54,6 +57,8 @@
5457
from ._models_py3 import SnapshotPolicyPatch
5558
from ._models_py3 import SnapshotPolicyVolumeList
5659
from ._models_py3 import SnapshotsList
60+
from ._models_py3 import SubscriptionQuotaItem
61+
from ._models_py3 import SubscriptionQuotaItemList
5762
from ._models_py3 import SystemData
5863
from ._models_py3 import Vault
5964
from ._models_py3 import VaultList
@@ -92,6 +97,7 @@
9297
from ._models import ExportPolicyRule # type: ignore
9398
from ._models import FilePathAvailabilityRequest # type: ignore
9499
from ._models import HourlySchedule # type: ignore
100+
from ._models import LogSpecification # type: ignore
95101
from ._models import MetricSpecification # type: ignore
96102
from ._models import MonthlySchedule # type: ignore
97103
from ._models import MountTarget # type: ignore
@@ -103,9 +109,11 @@
103109
from ._models import OperationDisplay # type: ignore
104110
from ._models import OperationListResult # type: ignore
105111
from ._models import PoolChangeRequest # type: ignore
112+
from ._models import ProxyResource # type: ignore
106113
from ._models import QuotaAvailabilityRequest # type: ignore
107114
from ._models import ReplicationObject # type: ignore
108115
from ._models import ReplicationStatus # type: ignore
116+
from ._models import Resource # type: ignore
109117
from ._models import ResourceIdentity # type: ignore
110118
from ._models import ResourceNameAvailabilityRequest # type: ignore
111119
from ._models import RestoreStatus # type: ignore
@@ -117,6 +125,8 @@
117125
from ._models import SnapshotPolicyPatch # type: ignore
118126
from ._models import SnapshotPolicyVolumeList # type: ignore
119127
from ._models import SnapshotsList # type: ignore
128+
from ._models import SubscriptionQuotaItem # type: ignore
129+
from ._models import SubscriptionQuotaItemList # type: ignore
120130
from ._models import SystemData # type: ignore
121131
from ._models import Vault # type: ignore
122132
from ._models import VaultList # type: ignore
@@ -146,11 +156,13 @@
146156
InAvailabilityReasonType,
147157
MetricAggregationType,
148158
MirrorState,
159+
NetworkFeatures,
149160
QosType,
150161
RelationshipStatus,
151162
ReplicationSchedule,
152163
SecurityStyle,
153164
ServiceLevel,
165+
VolumeStorageToNetworkProximity,
154166
)
155167

156168
__all__ = [
@@ -176,6 +188,7 @@
176188
'ExportPolicyRule',
177189
'FilePathAvailabilityRequest',
178190
'HourlySchedule',
191+
'LogSpecification',
179192
'MetricSpecification',
180193
'MonthlySchedule',
181194
'MountTarget',
@@ -187,9 +200,11 @@
187200
'OperationDisplay',
188201
'OperationListResult',
189202
'PoolChangeRequest',
203+
'ProxyResource',
190204
'QuotaAvailabilityRequest',
191205
'ReplicationObject',
192206
'ReplicationStatus',
207+
'Resource',
193208
'ResourceIdentity',
194209
'ResourceNameAvailabilityRequest',
195210
'RestoreStatus',
@@ -201,6 +216,8 @@
201216
'SnapshotPolicyPatch',
202217
'SnapshotPolicyVolumeList',
203218
'SnapshotsList',
219+
'SubscriptionQuotaItem',
220+
'SubscriptionQuotaItemList',
204221
'SystemData',
205222
'Vault',
206223
'VaultList',
@@ -228,9 +245,11 @@
228245
'InAvailabilityReasonType',
229246
'MetricAggregationType',
230247
'MirrorState',
248+
'NetworkFeatures',
231249
'QosType',
232250
'RelationshipStatus',
233251
'ReplicationSchedule',
234252
'SecurityStyle',
235253
'ServiceLevel',
254+
'VolumeStorageToNetworkProximity',
236255
]

0 commit comments

Comments
 (0)