Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-netapp-2021-09-22-09782 #20783

Merged
merged 4 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 5.1.0 (2021-09-22)

**Features**

- Model ServiceSpecification has a new parameter log_specifications
- Model MetricSpecification has a new parameter enable_regional_mdm_account
- Model MetricSpecification has a new parameter is_internal
- Model Volume has a new parameter network_sibling_set_id
- Model Volume has a new parameter storage_to_network_proximity
- Model Volume has a new parameter network_features
- Added operation group NetAppResourceQuotaLimitsOperations

## 5.0.0 (2021-08-20)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/netapp/azure-mgmt-netapp/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "1a5e9c6601a9611ac23c58bc9857693dcd9884f3",
"commit": "6b95b0f0fa71e18a350cf0ba152591a29a94bdc0",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/netapp/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"operation_groups": {
"operations": "Operations",
"net_app_resource": "NetAppResourceOperations",
"net_app_resource_quota_limits": "NetAppResourceQuotaLimitsOperations",
"accounts": "AccountsOperations",
"pools": "PoolsOperations",
"volumes": "VolumesOperations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ._configuration import NetAppManagementClientConfiguration
from .operations import Operations
from .operations import NetAppResourceOperations
from .operations import NetAppResourceQuotaLimitsOperations
from .operations import AccountsOperations
from .operations import PoolsOperations
from .operations import VolumesOperations
Expand All @@ -40,6 +41,8 @@ class NetAppManagementClient(object):
:vartype operations: azure.mgmt.netapp.operations.Operations
:ivar net_app_resource: NetAppResourceOperations operations
:vartype net_app_resource: azure.mgmt.netapp.operations.NetAppResourceOperations
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
:vartype net_app_resource_quota_limits: azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations
:ivar accounts: AccountsOperations operations
:vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
:ivar pools: PoolsOperations operations
Expand Down Expand Up @@ -88,6 +91,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.net_app_resource = NetAppResourceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.accounts = AccountsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pools = PoolsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "5.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ._configuration import NetAppManagementClientConfiguration
from .operations import Operations
from .operations import NetAppResourceOperations
from .operations import NetAppResourceQuotaLimitsOperations
from .operations import AccountsOperations
from .operations import PoolsOperations
from .operations import VolumesOperations
Expand All @@ -38,6 +39,8 @@ class NetAppManagementClient(object):
:vartype operations: azure.mgmt.netapp.aio.operations.Operations
:ivar net_app_resource: NetAppResourceOperations operations
:vartype net_app_resource: azure.mgmt.netapp.aio.operations.NetAppResourceOperations
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
:vartype net_app_resource_quota_limits: azure.mgmt.netapp.aio.operations.NetAppResourceQuotaLimitsOperations
:ivar accounts: AccountsOperations operations
:vartype accounts: azure.mgmt.netapp.aio.operations.AccountsOperations
:ivar pools: PoolsOperations operations
Expand Down Expand Up @@ -85,6 +88,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.net_app_resource = NetAppResourceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.accounts = AccountsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pools = PoolsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from ._operations import Operations
from ._net_app_resource_operations import NetAppResourceOperations
from ._net_app_resource_quota_limits_operations import NetAppResourceQuotaLimitsOperations
from ._accounts_operations import AccountsOperations
from ._pools_operations import PoolsOperations
from ._volumes_operations import VolumesOperations
Expand All @@ -21,6 +22,7 @@
__all__ = [
'Operations',
'NetAppResourceOperations',
'NetAppResourceQuotaLimitsOperations',
'AccountsOperations',
'PoolsOperations',
'VolumesOperations',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

class NetAppResourceQuotaLimitsOperations:
"""NetAppResourceQuotaLimitsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.netapp.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""

models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config

def list(
self,
location: str,
**kwargs: Any
) -> AsyncIterable["_models.SubscriptionQuotaItemList"]:
"""Get quota limits.

Get the default and current limits for quotas.

:param location: The location.
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either SubscriptionQuotaItemList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.netapp.models.SubscriptionQuotaItemList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItemList"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-06-01"
accept = "application/json"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'location': self._serialize.url("location", location, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
deserialized = self._deserialize('SubscriptionQuotaItemList', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return None, AsyncList(list_of_elem)

async def get_next(next_link=None):
request = prepare_request(next_link)

pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

return pipeline_response

return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits'} # type: ignore

async def get(
self,
location: str,
quota_limit_name: str,
**kwargs: Any
) -> "_models.SubscriptionQuotaItem":
"""Get quota limits.

Get the default and current subscription quota limit.

:param location: The location.
:type location: str
:param quota_limit_name: The name of the Quota Limit.
:type quota_limit_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: SubscriptionQuotaItem, or the result of cls(response)
:rtype: ~azure.mgmt.netapp.models.SubscriptionQuotaItem
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionQuotaItem"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-06-01"
accept = "application/json"

# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'location': self._serialize.url("location", location, 'str'),
'quotaLimitName': self._serialize.url("quota_limit_name", quota_limit_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize('SubscriptionQuotaItem', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/quotaLimits/{quotaLimitName}'} # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from ._models_py3 import ExportPolicyRule
from ._models_py3 import FilePathAvailabilityRequest
from ._models_py3 import HourlySchedule
from ._models_py3 import LogSpecification
from ._models_py3 import MetricSpecification
from ._models_py3 import MonthlySchedule
from ._models_py3 import MountTarget
Expand All @@ -40,9 +41,11 @@
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationListResult
from ._models_py3 import PoolChangeRequest
from ._models_py3 import ProxyResource
from ._models_py3 import QuotaAvailabilityRequest
from ._models_py3 import ReplicationObject
from ._models_py3 import ReplicationStatus
from ._models_py3 import Resource
from ._models_py3 import ResourceIdentity
from ._models_py3 import ResourceNameAvailabilityRequest
from ._models_py3 import RestoreStatus
Expand All @@ -54,6 +57,8 @@
from ._models_py3 import SnapshotPolicyPatch
from ._models_py3 import SnapshotPolicyVolumeList
from ._models_py3 import SnapshotsList
from ._models_py3 import SubscriptionQuotaItem
from ._models_py3 import SubscriptionQuotaItemList
from ._models_py3 import SystemData
from ._models_py3 import Vault
from ._models_py3 import VaultList
Expand Down Expand Up @@ -92,6 +97,7 @@
from ._models import ExportPolicyRule # type: ignore
from ._models import FilePathAvailabilityRequest # type: ignore
from ._models import HourlySchedule # type: ignore
from ._models import LogSpecification # type: ignore
from ._models import MetricSpecification # type: ignore
from ._models import MonthlySchedule # type: ignore
from ._models import MountTarget # type: ignore
Expand All @@ -103,9 +109,11 @@
from ._models import OperationDisplay # type: ignore
from ._models import OperationListResult # type: ignore
from ._models import PoolChangeRequest # type: ignore
from ._models import ProxyResource # type: ignore
from ._models import QuotaAvailabilityRequest # type: ignore
from ._models import ReplicationObject # type: ignore
from ._models import ReplicationStatus # type: ignore
from ._models import Resource # type: ignore
from ._models import ResourceIdentity # type: ignore
from ._models import ResourceNameAvailabilityRequest # type: ignore
from ._models import RestoreStatus # type: ignore
Expand All @@ -117,6 +125,8 @@
from ._models import SnapshotPolicyPatch # type: ignore
from ._models import SnapshotPolicyVolumeList # type: ignore
from ._models import SnapshotsList # type: ignore
from ._models import SubscriptionQuotaItem # type: ignore
from ._models import SubscriptionQuotaItemList # type: ignore
from ._models import SystemData # type: ignore
from ._models import Vault # type: ignore
from ._models import VaultList # type: ignore
Expand Down Expand Up @@ -146,11 +156,13 @@
InAvailabilityReasonType,
MetricAggregationType,
MirrorState,
NetworkFeatures,
QosType,
RelationshipStatus,
ReplicationSchedule,
SecurityStyle,
ServiceLevel,
VolumeStorageToNetworkProximity,
)

__all__ = [
Expand All @@ -176,6 +188,7 @@
'ExportPolicyRule',
'FilePathAvailabilityRequest',
'HourlySchedule',
'LogSpecification',
'MetricSpecification',
'MonthlySchedule',
'MountTarget',
Expand All @@ -187,9 +200,11 @@
'OperationDisplay',
'OperationListResult',
'PoolChangeRequest',
'ProxyResource',
'QuotaAvailabilityRequest',
'ReplicationObject',
'ReplicationStatus',
'Resource',
'ResourceIdentity',
'ResourceNameAvailabilityRequest',
'RestoreStatus',
Expand All @@ -201,6 +216,8 @@
'SnapshotPolicyPatch',
'SnapshotPolicyVolumeList',
'SnapshotsList',
'SubscriptionQuotaItem',
'SubscriptionQuotaItemList',
'SystemData',
'Vault',
'VaultList',
Expand Down Expand Up @@ -228,9 +245,11 @@
'InAvailabilityReasonType',
'MetricAggregationType',
'MirrorState',
'NetworkFeatures',
'QosType',
'RelationshipStatus',
'ReplicationSchedule',
'SecurityStyle',
'ServiceLevel',
'VolumeStorageToNetworkProximity',
]
Loading