From 73fd19d53b965284963d15fbf6dd1b2a4e73bef8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 4 Feb 2021 02:17:18 +0000 Subject: [PATCH] CodeGen from PR 12388 in Azure/azure-rest-api-specs [NetAppFiles] Anf 9085 update swagger rest api to 2020 11 01 (#12388) --- .../azure/mgmt/netapp/_configuration.py | 2 +- .../azure/mgmt/netapp/_metadata.json | 71 +++++++ .../mgmt/netapp/_net_app_management_client.py | 1 - .../azure/mgmt/netapp/_version.py | 3 +- .../azure/mgmt/netapp/aio/_configuration.py | 2 +- .../netapp/aio/_net_app_management_client.py | 1 - .../operations/_account_backups_operations.py | 6 +- .../aio/operations/_accounts_operations.py | 32 ++- .../operations/_backup_policies_operations.py | 18 +- .../aio/operations/_backups_operations.py | 10 +- .../_net_app_resource_operations.py | 6 +- .../mgmt/netapp/aio/operations/_operations.py | 2 +- .../aio/operations/_pools_operations.py | 21 +- .../_snapshot_policies_operations.py | 121 ++++++++--- .../aio/operations/_snapshots_operations.py | 10 +- .../aio/operations/_vaults_operations.py | 2 +- .../aio/operations/_volumes_operations.py | 30 +-- .../azure/mgmt/netapp/models/__init__.py | 13 ++ .../azure/mgmt/netapp/models/_models.py | 174 ++++++++++++++- .../azure/mgmt/netapp/models/_models_py3.py | 198 ++++++++++++++++-- .../_net_app_management_client_enums.py | 17 +- .../operations/_account_backups_operations.py | 6 +- .../netapp/operations/_accounts_operations.py | 32 ++- .../operations/_backup_policies_operations.py | 18 +- .../netapp/operations/_backups_operations.py | 10 +- .../_net_app_resource_operations.py | 6 +- .../mgmt/netapp/operations/_operations.py | 2 +- .../netapp/operations/_pools_operations.py | 21 +- .../_snapshot_policies_operations.py | 122 ++++++++--- .../operations/_snapshots_operations.py | 10 +- .../netapp/operations/_vaults_operations.py | 2 +- .../netapp/operations/_volumes_operations.py | 30 +-- 32 files changed, 777 insertions(+), 222 deletions(-) create mode 100644 sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py index e64c91c5d796..8c1ecc699a9f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-08-01" + self.api_version = "2020-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json new file mode 100644 index 000000000000..7dc68ab50c13 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json @@ -0,0 +1,71 @@ +{ + "chosen_version": "2020-11-01", + "total_api_version_list": ["2020-11-01"], + "client": { + "name": "NetAppManagementClient", + "filename": "_net_app_management_client", + "description": "Microsoft NetApp Azure Resource Provider specification.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": true + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential, # type: \"AsyncTokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id" + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null + }, + "operation_groups": { + "operations": "Operations", + "net_app_resource": "NetAppResourceOperations", + "accounts": "AccountsOperations", + "pools": "PoolsOperations", + "volumes": "VolumesOperations", + "snapshots": "SnapshotsOperations", + "snapshot_policies": "SnapshotPoliciesOperations", + "account_backups": "AccountBackupsOperations", + "backups": "BackupsOperations", + "backup_policies": "BackupPoliciesOperations", + "vaults": "VaultsOperations" + }, + "operation_mixins": { + }, + "sync_imports": "None", + "async_imports": "None" +} \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py index f71d24e917d5..30f8ab1da59b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py @@ -80,7 +80,6 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py index 515f51c112dd..c47f66669f1b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,5 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" - +VERSION = "1.0.0" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py index 7eca6271941f..b90414d4f71d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-08-01" + self.api_version = "2020-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py index a28a39a32278..0bd52eb924a2 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py @@ -77,7 +77,6 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.operations = Operations( diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py index 0319336c69c0..55be8b3517bb 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py @@ -66,7 +66,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -129,7 +129,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -178,7 +178,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py index 139750a67ab5..9f323376d725 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -96,7 +96,7 @@ async def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -139,7 +139,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -181,13 +181,13 @@ async def _create_or_update_initial( account_name: str, body: "_models.NetAppAccount", **kwargs - ) -> Optional["_models.NetAppAccount"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]] + ) -> "_models.NetAppAccount": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -216,11 +216,10 @@ async def _create_or_update_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('NetAppAccount', pipeline_response) @@ -292,7 +291,7 @@ def get_long_running_output(pipeline_response): 'accountName': self._serialize.url("account_name", account_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -317,7 +316,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -420,13 +419,13 @@ async def _update_initial( account_name: str, body: "_models.NetAppAccountPatch", **kwargs - ) -> Optional["_models.NetAppAccount"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]] + ) -> "_models.NetAppAccount": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -455,15 +454,14 @@ async def _update_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('NetAppAccount', pipeline_response) - if response.status_code == 201: + if response.status_code == 202: deserialized = self._deserialize('NetAppAccount', pipeline_response) if cls: @@ -531,7 +529,7 @@ def get_long_running_output(pipeline_response): 'accountName': self._serialize.url("account_name", account_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py index 48ba4d70725f..9bc0ee150eb5 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -351,7 +351,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -381,11 +381,15 @@ async def update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupPolicy', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('BackupPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackupPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -405,7 +409,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py index 72825c1ae975..1ad7845de346 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -160,7 +160,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -387,7 +387,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -448,7 +448,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py index c48431892652..d9c64d34828b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py @@ -72,7 +72,7 @@ async def check_name_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -144,7 +144,7 @@ async def check_file_path_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -216,7 +216,7 @@ async def check_quota_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py index a5daceed6315..367b60b17873 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py index faba0738cefb..0cd2da58cfd2 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -100,7 +100,7 @@ async def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -190,13 +190,13 @@ async def _create_or_update_initial( pool_name: str, body: "_models.CapacityPool", **kwargs - ) -> Optional["_models.CapacityPool"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CapacityPool"]] + ) -> "_models.CapacityPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapacityPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -226,11 +226,10 @@ async def _create_or_update_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('CapacityPool', pipeline_response) @@ -307,7 +306,7 @@ def get_long_running_output(pipeline_response): '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}$'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -334,7 +333,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -468,7 +467,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py index c01fd87f4af0..f4846099b122 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -253,7 +253,7 @@ async def create( return deserialized create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore - async def update( + async def _update_initial( self, resource_group_name: str, account_name: str, @@ -261,32 +261,17 @@ async def update( body: "_models.SnapshotPolicyPatch", **kwargs ) -> "_models.SnapshotPolicy": - """Patch a snapshot policy. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param account_name: The name of the NetApp account. - :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy target. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SnapshotPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -311,17 +296,97 @@ async def update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + account_name: str, + snapshot_policy_name: str, + body: "_models.SnapshotPolicyPatch", + **kwargs + ) -> AsyncLROPoller["_models.SnapshotPolicy"]: + """Patch a snapshot policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy target. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SnapshotPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + snapshot_policy_name=snapshot_policy_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'snapshotPolicyName': self._serialize.url("snapshot_policy_name", snapshot_policy_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore async def _delete_initial( self, @@ -335,7 +400,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -443,7 +508,7 @@ async def list_volumes( snapshot_policy_name: str, **kwargs ) -> "_models.SnapshotPolicyVolumeList": - """Get volumes associated with snapshot policy. + """Get volumes for snapshot policy. Get volumes associated with snapshot policy. @@ -463,7 +528,7 @@ async def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -498,4 +563,4 @@ async def list_volumes( return cls(pipeline_response, deserialized, {}) return deserialized - list_volumes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/listVolumes'} # type: ignore + list_volumes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes'} # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py index cbc050715584..caa38d3fe96f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -160,7 +160,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -363,7 +363,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -511,7 +511,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py index 26d09b4375db..b3b711ae96fb 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py index fffe1c07c094..b7511221f797 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -104,7 +104,7 @@ async def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -153,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -205,7 +205,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -350,7 +350,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -491,7 +491,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -614,7 +614,7 @@ async def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -746,7 +746,7 @@ async def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -897,7 +897,7 @@ async def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -948,7 +948,7 @@ async def _resync_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -992,7 +992,7 @@ async def begin_resync_replication( """Resync volume replication. Resync the connection on the destination volume. If the operation is ran on the source volume - it will reverse-resync the connection and sync from source to destination. + it will reverse-resync the connection and sync from destination to source. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -1071,7 +1071,7 @@ async def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1195,7 +1195,7 @@ async def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1326,7 +1326,7 @@ async def _re_initialize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1449,7 +1449,7 @@ async def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py index 14f23befeb82..7ac1f198fd31 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/__init__.py @@ -7,6 +7,7 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AccountEncryption from ._models_py3 import ActiveDirectory from ._models_py3 import AuthorizeRequest from ._models_py3 import Backup @@ -21,6 +22,7 @@ from ._models_py3 import CapacityPoolList from ._models_py3 import CapacityPoolPatch from ._models_py3 import CheckAvailabilityResponse + from ._models_py3 import CloudErrorBody from ._models_py3 import DailySchedule from ._models_py3 import Dimension from ._models_py3 import ExportPolicyRule @@ -48,6 +50,7 @@ from ._models_py3 import SnapshotPolicyPatch from ._models_py3 import SnapshotPolicyVolumeList from ._models_py3 import SnapshotsList + from ._models_py3 import SystemData from ._models_py3 import Vault from ._models_py3 import VaultList from ._models_py3 import Volume @@ -63,6 +66,7 @@ from ._models_py3 import VolumeSnapshotProperties from ._models_py3 import WeeklySchedule except (SyntaxError, ImportError): + from ._models import AccountEncryption # type: ignore from ._models import ActiveDirectory # type: ignore from ._models import AuthorizeRequest # type: ignore from ._models import Backup # type: ignore @@ -77,6 +81,7 @@ from ._models import CapacityPoolList # type: ignore from ._models import CapacityPoolPatch # type: ignore from ._models import CheckAvailabilityResponse # type: ignore + from ._models import CloudErrorBody # type: ignore from ._models import DailySchedule # type: ignore from ._models import Dimension # type: ignore from ._models import ExportPolicyRule # type: ignore @@ -104,6 +109,7 @@ from ._models import SnapshotPolicyPatch # type: ignore from ._models import SnapshotPolicyVolumeList # type: ignore from ._models import SnapshotsList # type: ignore + from ._models import SystemData # type: ignore from ._models import Vault # type: ignore from ._models import VaultList # type: ignore from ._models import Volume # type: ignore @@ -123,8 +129,10 @@ ActiveDirectoryStatus, CheckNameResourceTypes, CheckQuotaNameResourceTypes, + CreatedByType, EndpointType, InAvailabilityReasonType, + KeySource, MirrorState, QosType, RelationshipStatus, @@ -134,6 +142,7 @@ ) __all__ = [ + 'AccountEncryption', 'ActiveDirectory', 'AuthorizeRequest', 'Backup', @@ -148,6 +157,7 @@ 'CapacityPoolList', 'CapacityPoolPatch', 'CheckAvailabilityResponse', + 'CloudErrorBody', 'DailySchedule', 'Dimension', 'ExportPolicyRule', @@ -175,6 +185,7 @@ 'SnapshotPolicyPatch', 'SnapshotPolicyVolumeList', 'SnapshotsList', + 'SystemData', 'Vault', 'VaultList', 'Volume', @@ -192,8 +203,10 @@ 'ActiveDirectoryStatus', 'CheckNameResourceTypes', 'CheckQuotaNameResourceTypes', + 'CreatedByType', 'EndpointType', 'InAvailabilityReasonType', + 'KeySource', 'MirrorState', 'QosType', 'RelationshipStatus', diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py index b54b962f0dff..b76a8fd31918 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models.py @@ -9,6 +9,26 @@ import msrest.serialization +class AccountEncryption(msrest.serialization.Model): + """Encryption settings. + + :param key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. Possible + values include: "Microsoft.NetApp". + :type key_source: str or ~azure.mgmt.netapp.models.KeySource + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountEncryption, self).__init__(**kwargs) + self.key_source = kwargs.get('key_source', None) + + class ActiveDirectory(msrest.serialization.Model): """Active Directory. @@ -56,6 +76,12 @@ class ActiveDirectory(msrest.serialization.Model): :type aes_encryption: bool :param ldap_signing: Specifies whether or not the LDAP traffic needs to be signed. :type ldap_signing: bool + :param security_operators: Domain Users in the Active directory to be given SeSecurityPrivilege + privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames + without domain specifier. + :type security_operators: list[str] + :param ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. + :type ldap_over_tls: bool """ _validation = { @@ -84,6 +110,8 @@ class ActiveDirectory(msrest.serialization.Model): 'server_root_ca_certificate': {'key': 'serverRootCACertificate', 'type': 'str'}, 'aes_encryption': {'key': 'aesEncryption', 'type': 'bool'}, 'ldap_signing': {'key': 'ldapSigning', 'type': 'bool'}, + 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, + 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, } def __init__( @@ -99,7 +127,7 @@ def __init__( self.status = None self.status_details = None self.smb_server_name = kwargs.get('smb_server_name', None) - self.organizational_unit = kwargs.get('organizational_unit', None) + self.organizational_unit = kwargs.get('organizational_unit', "CN=Computers") self.site = kwargs.get('site', None) self.backup_operators = kwargs.get('backup_operators', None) self.kdc_ip = kwargs.get('kdc_ip', None) @@ -107,6 +135,8 @@ def __init__( self.server_root_ca_certificate = kwargs.get('server_root_ca_certificate', None) self.aes_encryption = kwargs.get('aes_encryption', None) self.ldap_signing = kwargs.get('ldap_signing', None) + self.security_operators = kwargs.get('security_operators', None) + self.ldap_over_tls = kwargs.get('ldap_over_tls', None) class AuthorizeRequest(msrest.serialization.Model): @@ -155,6 +185,8 @@ class Backup(msrest.serialization.Model): :type label: str :ivar backup_type: Type of backup adhoc or scheduled. :vartype backup_type: str + :ivar failure_reason: Failure reason. + :vartype failure_reason: str """ _validation = { @@ -167,6 +199,7 @@ class Backup(msrest.serialization.Model): 'provisioning_state': {'readonly': True}, 'size': {'readonly': True}, 'backup_type': {'readonly': True}, + 'failure_reason': {'readonly': True}, } _attribute_map = { @@ -180,6 +213,7 @@ class Backup(msrest.serialization.Model): 'size': {'key': 'properties.size', 'type': 'long'}, 'label': {'key': 'properties.label', 'type': 'str'}, 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, } def __init__( @@ -197,6 +231,7 @@ def __init__( self.size = None self.label = kwargs.get('label', None) self.backup_type = None + self.failure_reason = None class BackupPatch(msrest.serialization.Model): @@ -218,6 +253,8 @@ class BackupPatch(msrest.serialization.Model): :type label: str :ivar backup_type: Type of backup adhoc or scheduled. :vartype backup_type: str + :ivar failure_reason: Failure reason. + :vartype failure_reason: str """ _validation = { @@ -226,6 +263,7 @@ class BackupPatch(msrest.serialization.Model): 'provisioning_state': {'readonly': True}, 'size': {'readonly': True}, 'backup_type': {'readonly': True}, + 'failure_reason': {'readonly': True}, } _attribute_map = { @@ -236,6 +274,7 @@ class BackupPatch(msrest.serialization.Model): 'size': {'key': 'properties.size', 'type': 'long'}, 'label': {'key': 'properties.label', 'type': 'str'}, 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, } def __init__( @@ -250,6 +289,7 @@ def __init__( self.size = None self.label = kwargs.get('label', None) self.backup_type = None + self.failure_reason = None class BackupPoliciesList(msrest.serialization.Model): @@ -643,10 +683,13 @@ class CapacityPoolList(msrest.serialization.Model): :param value: List of Capacity pools. :type value: list[~azure.mgmt.netapp.models.CapacityPool] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[CapacityPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( @@ -655,6 +698,7 @@ def __init__( ): super(CapacityPoolList, self).__init__(**kwargs) self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) class CapacityPoolPatch(msrest.serialization.Model): @@ -744,6 +788,31 @@ def __init__( self.message = kwargs.get('message', None) +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + class DailySchedule(msrest.serialization.Model): """Daily Schedule properties. @@ -1113,10 +1182,14 @@ class NetAppAccount(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str :param active_directories: Active Directories. :type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] + :param encryption: Encryption settings. + :type encryption: ~azure.mgmt.netapp.models.AccountEncryption """ _validation = { @@ -1124,6 +1197,7 @@ class NetAppAccount(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1133,8 +1207,10 @@ class NetAppAccount(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, } def __init__( @@ -1147,8 +1223,10 @@ def __init__( self.name = None self.type = None self.tags = kwargs.get('tags', None) + self.system_data = None self.provisioning_state = None self.active_directories = kwargs.get('active_directories', None) + self.encryption = kwargs.get('encryption', None) class NetAppAccountList(msrest.serialization.Model): @@ -1156,10 +1234,13 @@ class NetAppAccountList(msrest.serialization.Model): :param value: Multiple NetApp accounts. :type value: list[~azure.mgmt.netapp.models.NetAppAccount] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[NetAppAccount]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( @@ -1168,6 +1249,7 @@ def __init__( ): super(NetAppAccountList, self).__init__(**kwargs) self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) class NetAppAccountPatch(msrest.serialization.Model): @@ -1189,6 +1271,8 @@ class NetAppAccountPatch(msrest.serialization.Model): :vartype provisioning_state: str :param active_directories: Active Directories. :type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] + :param encryption: Encryption settings. + :type encryption: ~azure.mgmt.netapp.models.AccountEncryption """ _validation = { @@ -1206,6 +1290,7 @@ class NetAppAccountPatch(msrest.serialization.Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, } def __init__( @@ -1220,6 +1305,7 @@ def __init__( self.tags = kwargs.get('tags', None) self.provisioning_state = None self.active_directories = kwargs.get('active_directories', None) + self.encryption = kwargs.get('encryption', None) class Operation(msrest.serialization.Model): @@ -1840,6 +1926,47 @@ def __init__( self.value = kwargs.get('value', None) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.netapp.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.netapp.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + class Vault(msrest.serialization.Model): """Vault information. @@ -1924,6 +2051,8 @@ class Volume(msrest.serialization.Model): :type tags: dict[str, str] :ivar file_system_id: Unique FileSystem Identifier. :vartype file_system_id: str + :ivar name_properties_name: Resource name. + :vartype name_properties_name: str :param creation_token: Required. A unique file path for the volume. Used when creating mount targets. :type creation_token: str @@ -1936,7 +2065,7 @@ class Volume(msrest.serialization.Model): :type usage_threshold: long :param export_policy: Set of export policy rules. :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy - :param protocol_types: Set of protocol types. + :param protocol_types: Set of protocol types, default NFSv3, CIFS fro SMB protocol. :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str @@ -1949,8 +2078,8 @@ class Volume(msrest.serialization.Model): :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. :type subnet_id: str - :param mount_targets: List of mount targets. - :type mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] + :ivar mount_targets: List of mount targets. + :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :param volume_type: What type of volume is this. :type volume_type: str :param data_protection: DataProtection type volumes include an object containing details of the @@ -1959,15 +2088,24 @@ class Volume(msrest.serialization.Model): :param is_restoring: Restoring. :type is_restoring: bool :param snapshot_directory_visible: If enabled (true) the volume will contain a read-only - .snapshot directory which provides access to each of the volume's snapshots (default to true). + snapshot directory which provides access to each of the volume's snapshots (default to true). :type snapshot_directory_visible: bool :param kerberos_enabled: Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. :type kerberos_enabled: bool - :param security_style: The security style of volume. Possible values include: "ntfs", "unix". + :param security_style: The security style of volume, default unix, defaults to ntfs for dual + protocol or CIFS protocol. Possible values include: "ntfs", "unix". Default value: "unix". :type security_style: str or ~azure.mgmt.netapp.models.SecurityStyle + :param smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + :type smb_encryption: bool + :param smb_continuously_available: Enables continuously available share property for smb + volume. Only applicable for SMB volume. + :type smb_continuously_available: bool :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. :type throughput_mibps: float + :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + :type encryption_key_source: str """ _validation = { @@ -1976,6 +2114,7 @@ class Volume(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'file_system_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'name_properties_name': {'readonly': True}, 'creation_token': {'required': True, 'max_length': 80, 'min_length': 1, 'pattern': r'^[a-zA-Z][a-zA-Z0-9\-]{0,79}$'}, 'usage_threshold': {'required': True, 'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, @@ -1983,7 +2122,8 @@ class Volume(msrest.serialization.Model): 'backup_id': {'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'}, 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1, 'multiple': 0.001}, + 'mount_targets': {'readonly': True}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 0, 'multiple': 0.001}, } _attribute_map = { @@ -1993,6 +2133,7 @@ class Volume(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, @@ -2010,7 +2151,10 @@ class Volume(msrest.serialization.Model): 'snapshot_directory_visible': {'key': 'properties.snapshotDirectoryVisible', 'type': 'bool'}, 'kerberos_enabled': {'key': 'properties.kerberosEnabled', 'type': 'bool'}, 'security_style': {'key': 'properties.securityStyle', 'type': 'str'}, + 'smb_encryption': {'key': 'properties.smbEncryption', 'type': 'bool'}, + 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, + 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, } def __init__( @@ -2024,6 +2168,7 @@ def __init__( self.type = None self.tags = kwargs.get('tags', None) self.file_system_id = None + self.name_properties_name = None self.creation_token = kwargs['creation_token'] self.service_level = kwargs.get('service_level', None) self.usage_threshold = kwargs.get('usage_threshold', 107374182400) @@ -2034,14 +2179,17 @@ def __init__( self.backup_id = kwargs.get('backup_id', None) self.baremetal_tenant_id = None self.subnet_id = kwargs['subnet_id'] - self.mount_targets = kwargs.get('mount_targets', None) + self.mount_targets = None self.volume_type = kwargs.get('volume_type', None) self.data_protection = kwargs.get('data_protection', None) self.is_restoring = kwargs.get('is_restoring', None) - self.snapshot_directory_visible = kwargs.get('snapshot_directory_visible', None) + self.snapshot_directory_visible = kwargs.get('snapshot_directory_visible', True) self.kerberos_enabled = kwargs.get('kerberos_enabled', False) - self.security_style = kwargs.get('security_style', None) - self.throughput_mibps = kwargs.get('throughput_mibps', None) + self.security_style = kwargs.get('security_style', "unix") + self.smb_encryption = kwargs.get('smb_encryption', False) + self.smb_continuously_available = kwargs.get('smb_continuously_available', False) + self.throughput_mibps = kwargs.get('throughput_mibps', 0) + self.encryption_key_source = kwargs.get('encryption_key_source', None) class VolumeBackupProperties(msrest.serialization.Model): @@ -2107,10 +2255,13 @@ class VolumeList(msrest.serialization.Model): :param value: List of volumes. :type value: list[~azure.mgmt.netapp.models.Volume] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[Volume]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( @@ -2119,6 +2270,7 @@ def __init__( ): super(VolumeList, self).__init__(**kwargs) self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) class VolumePatch(msrest.serialization.Model): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py index 754b2df12585..cda4b6637e67 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_models_py3.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import datetime from typing import Dict, List, Optional, Union import msrest.serialization @@ -13,6 +14,28 @@ from ._net_app_management_client_enums import * +class AccountEncryption(msrest.serialization.Model): + """Encryption settings. + + :param key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. Possible + values include: "Microsoft.NetApp". + :type key_source: str or ~azure.mgmt.netapp.models.KeySource + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + } + + def __init__( + self, + *, + key_source: Optional[Union[str, "KeySource"]] = None, + **kwargs + ): + super(AccountEncryption, self).__init__(**kwargs) + self.key_source = key_source + + class ActiveDirectory(msrest.serialization.Model): """Active Directory. @@ -60,6 +83,12 @@ class ActiveDirectory(msrest.serialization.Model): :type aes_encryption: bool :param ldap_signing: Specifies whether or not the LDAP traffic needs to be signed. :type ldap_signing: bool + :param security_operators: Domain Users in the Active directory to be given SeSecurityPrivilege + privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames + without domain specifier. + :type security_operators: list[str] + :param ldap_over_tls: Specifies whether or not the LDAP traffic needs to be secured via TLS. + :type ldap_over_tls: bool """ _validation = { @@ -88,6 +117,8 @@ class ActiveDirectory(msrest.serialization.Model): 'server_root_ca_certificate': {'key': 'serverRootCACertificate', 'type': 'str'}, 'aes_encryption': {'key': 'aesEncryption', 'type': 'bool'}, 'ldap_signing': {'key': 'ldapSigning', 'type': 'bool'}, + 'security_operators': {'key': 'securityOperators', 'type': '[str]'}, + 'ldap_over_tls': {'key': 'ldapOverTLS', 'type': 'bool'}, } def __init__( @@ -99,7 +130,7 @@ def __init__( domain: Optional[str] = None, dns: Optional[str] = None, smb_server_name: Optional[str] = None, - organizational_unit: Optional[str] = None, + organizational_unit: Optional[str] = "CN=Computers", site: Optional[str] = None, backup_operators: Optional[List[str]] = None, kdc_ip: Optional[str] = None, @@ -107,6 +138,8 @@ def __init__( server_root_ca_certificate: Optional[str] = None, aes_encryption: Optional[bool] = None, ldap_signing: Optional[bool] = None, + security_operators: Optional[List[str]] = None, + ldap_over_tls: Optional[bool] = None, **kwargs ): super(ActiveDirectory, self).__init__(**kwargs) @@ -126,6 +159,8 @@ def __init__( self.server_root_ca_certificate = server_root_ca_certificate self.aes_encryption = aes_encryption self.ldap_signing = ldap_signing + self.security_operators = security_operators + self.ldap_over_tls = ldap_over_tls class AuthorizeRequest(msrest.serialization.Model): @@ -176,6 +211,8 @@ class Backup(msrest.serialization.Model): :type label: str :ivar backup_type: Type of backup adhoc or scheduled. :vartype backup_type: str + :ivar failure_reason: Failure reason. + :vartype failure_reason: str """ _validation = { @@ -188,6 +225,7 @@ class Backup(msrest.serialization.Model): 'provisioning_state': {'readonly': True}, 'size': {'readonly': True}, 'backup_type': {'readonly': True}, + 'failure_reason': {'readonly': True}, } _attribute_map = { @@ -201,6 +239,7 @@ class Backup(msrest.serialization.Model): 'size': {'key': 'properties.size', 'type': 'long'}, 'label': {'key': 'properties.label', 'type': 'str'}, 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, } def __init__( @@ -221,6 +260,7 @@ def __init__( self.size = None self.label = label self.backup_type = None + self.failure_reason = None class BackupPatch(msrest.serialization.Model): @@ -242,6 +282,8 @@ class BackupPatch(msrest.serialization.Model): :type label: str :ivar backup_type: Type of backup adhoc or scheduled. :vartype backup_type: str + :ivar failure_reason: Failure reason. + :vartype failure_reason: str """ _validation = { @@ -250,6 +292,7 @@ class BackupPatch(msrest.serialization.Model): 'provisioning_state': {'readonly': True}, 'size': {'readonly': True}, 'backup_type': {'readonly': True}, + 'failure_reason': {'readonly': True}, } _attribute_map = { @@ -260,6 +303,7 @@ class BackupPatch(msrest.serialization.Model): 'size': {'key': 'properties.size', 'type': 'long'}, 'label': {'key': 'properties.label', 'type': 'str'}, 'backup_type': {'key': 'properties.backupType', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, } def __init__( @@ -277,6 +321,7 @@ def __init__( self.size = None self.label = label self.backup_type = None + self.failure_reason = None class BackupPoliciesList(msrest.serialization.Model): @@ -712,20 +757,25 @@ class CapacityPoolList(msrest.serialization.Model): :param value: List of Capacity pools. :type value: list[~azure.mgmt.netapp.models.CapacityPool] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[CapacityPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["CapacityPool"]] = None, + next_link: Optional[str] = None, **kwargs ): super(CapacityPoolList, self).__init__(**kwargs) self.value = value + self.next_link = next_link class CapacityPoolPatch(msrest.serialization.Model): @@ -824,6 +874,34 @@ def __init__( self.message = message +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + + class DailySchedule(msrest.serialization.Model): """Daily Schedule properties. @@ -1244,10 +1322,14 @@ class NetAppAccount(msrest.serialization.Model): :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.netapp.models.SystemData :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str :param active_directories: Active Directories. :type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] + :param encryption: Encryption settings. + :type encryption: ~azure.mgmt.netapp.models.AccountEncryption """ _validation = { @@ -1255,6 +1337,7 @@ class NetAppAccount(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -1264,8 +1347,10 @@ class NetAppAccount(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, } def __init__( @@ -1274,6 +1359,7 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, active_directories: Optional[List["ActiveDirectory"]] = None, + encryption: Optional["AccountEncryption"] = None, **kwargs ): super(NetAppAccount, self).__init__(**kwargs) @@ -1282,8 +1368,10 @@ def __init__( self.name = None self.type = None self.tags = tags + self.system_data = None self.provisioning_state = None self.active_directories = active_directories + self.encryption = encryption class NetAppAccountList(msrest.serialization.Model): @@ -1291,20 +1379,25 @@ class NetAppAccountList(msrest.serialization.Model): :param value: Multiple NetApp accounts. :type value: list[~azure.mgmt.netapp.models.NetAppAccount] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[NetAppAccount]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["NetAppAccount"]] = None, + next_link: Optional[str] = None, **kwargs ): super(NetAppAccountList, self).__init__(**kwargs) self.value = value + self.next_link = next_link class NetAppAccountPatch(msrest.serialization.Model): @@ -1326,6 +1419,8 @@ class NetAppAccountPatch(msrest.serialization.Model): :vartype provisioning_state: str :param active_directories: Active Directories. :type active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] + :param encryption: Encryption settings. + :type encryption: ~azure.mgmt.netapp.models.AccountEncryption """ _validation = { @@ -1343,6 +1438,7 @@ class NetAppAccountPatch(msrest.serialization.Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'active_directories': {'key': 'properties.activeDirectories', 'type': '[ActiveDirectory]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, } def __init__( @@ -1351,6 +1447,7 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, active_directories: Optional[List["ActiveDirectory"]] = None, + encryption: Optional["AccountEncryption"] = None, **kwargs ): super(NetAppAccountPatch, self).__init__(**kwargs) @@ -1361,6 +1458,7 @@ def __init__( self.tags = tags self.provisioning_state = None self.active_directories = active_directories + self.encryption = encryption class Operation(msrest.serialization.Model): @@ -2049,6 +2147,54 @@ def __init__( self.value = value +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.netapp.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.netapp.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + class Vault(msrest.serialization.Model): """Vault information. @@ -2138,6 +2284,8 @@ class Volume(msrest.serialization.Model): :type tags: dict[str, str] :ivar file_system_id: Unique FileSystem Identifier. :vartype file_system_id: str + :ivar name_properties_name: Resource name. + :vartype name_properties_name: str :param creation_token: Required. A unique file path for the volume. Used when creating mount targets. :type creation_token: str @@ -2150,7 +2298,7 @@ class Volume(msrest.serialization.Model): :type usage_threshold: long :param export_policy: Set of export policy rules. :type export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy - :param protocol_types: Set of protocol types. + :param protocol_types: Set of protocol types, default NFSv3, CIFS fro SMB protocol. :type protocol_types: list[str] :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str @@ -2163,8 +2311,8 @@ class Volume(msrest.serialization.Model): :param subnet_id: Required. The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. :type subnet_id: str - :param mount_targets: List of mount targets. - :type mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] + :ivar mount_targets: List of mount targets. + :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :param volume_type: What type of volume is this. :type volume_type: str :param data_protection: DataProtection type volumes include an object containing details of the @@ -2173,15 +2321,24 @@ class Volume(msrest.serialization.Model): :param is_restoring: Restoring. :type is_restoring: bool :param snapshot_directory_visible: If enabled (true) the volume will contain a read-only - .snapshot directory which provides access to each of the volume's snapshots (default to true). + snapshot directory which provides access to each of the volume's snapshots (default to true). :type snapshot_directory_visible: bool :param kerberos_enabled: Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. :type kerberos_enabled: bool - :param security_style: The security style of volume. Possible values include: "ntfs", "unix". + :param security_style: The security style of volume, default unix, defaults to ntfs for dual + protocol or CIFS protocol. Possible values include: "ntfs", "unix". Default value: "unix". :type security_style: str or ~azure.mgmt.netapp.models.SecurityStyle + :param smb_encryption: Enables encryption for in-flight smb3 data. Only applicable for + SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + :type smb_encryption: bool + :param smb_continuously_available: Enables continuously available share property for smb + volume. Only applicable for SMB volume. + :type smb_continuously_available: bool :param throughput_mibps: Maximum throughput in Mibps that can be achieved by this volume. :type throughput_mibps: float + :param encryption_key_source: Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + :type encryption_key_source: str """ _validation = { @@ -2190,6 +2347,7 @@ class Volume(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'file_system_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'name_properties_name': {'readonly': True}, 'creation_token': {'required': True, 'max_length': 80, 'min_length': 1, 'pattern': r'^[a-zA-Z][a-zA-Z0-9\-]{0,79}$'}, 'usage_threshold': {'required': True, 'maximum': 109951162777600, 'minimum': 107374182400}, 'provisioning_state': {'readonly': True}, @@ -2197,7 +2355,8 @@ class Volume(msrest.serialization.Model): 'backup_id': {'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'}, 'baremetal_tenant_id': {'readonly': True}, 'subnet_id': {'required': True}, - 'throughput_mibps': {'maximum': 4500, 'minimum': 1, 'multiple': 0.001}, + 'mount_targets': {'readonly': True}, + 'throughput_mibps': {'maximum': 4500, 'minimum': 0, 'multiple': 0.001}, } _attribute_map = { @@ -2207,6 +2366,7 @@ class Volume(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'file_system_id': {'key': 'properties.fileSystemId', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'creation_token': {'key': 'properties.creationToken', 'type': 'str'}, 'service_level': {'key': 'properties.serviceLevel', 'type': 'str'}, 'usage_threshold': {'key': 'properties.usageThreshold', 'type': 'long'}, @@ -2224,7 +2384,10 @@ class Volume(msrest.serialization.Model): 'snapshot_directory_visible': {'key': 'properties.snapshotDirectoryVisible', 'type': 'bool'}, 'kerberos_enabled': {'key': 'properties.kerberosEnabled', 'type': 'bool'}, 'security_style': {'key': 'properties.securityStyle', 'type': 'str'}, + 'smb_encryption': {'key': 'properties.smbEncryption', 'type': 'bool'}, + 'smb_continuously_available': {'key': 'properties.smbContinuouslyAvailable', 'type': 'bool'}, 'throughput_mibps': {'key': 'properties.throughputMibps', 'type': 'float'}, + 'encryption_key_source': {'key': 'properties.encryptionKeySource', 'type': 'str'}, } def __init__( @@ -2240,14 +2403,16 @@ def __init__( protocol_types: Optional[List[str]] = None, snapshot_id: Optional[str] = None, backup_id: Optional[str] = None, - mount_targets: Optional[List["MountTargetProperties"]] = None, volume_type: Optional[str] = None, data_protection: Optional["VolumePropertiesDataProtection"] = None, is_restoring: Optional[bool] = None, - snapshot_directory_visible: Optional[bool] = None, + snapshot_directory_visible: Optional[bool] = True, kerberos_enabled: Optional[bool] = False, - security_style: Optional[Union[str, "SecurityStyle"]] = None, - throughput_mibps: Optional[float] = None, + security_style: Optional[Union[str, "SecurityStyle"]] = "unix", + smb_encryption: Optional[bool] = False, + smb_continuously_available: Optional[bool] = False, + throughput_mibps: Optional[float] = 0, + encryption_key_source: Optional[str] = None, **kwargs ): super(Volume, self).__init__(**kwargs) @@ -2257,6 +2422,7 @@ def __init__( self.type = None self.tags = tags self.file_system_id = None + self.name_properties_name = None self.creation_token = creation_token self.service_level = service_level self.usage_threshold = usage_threshold @@ -2267,14 +2433,17 @@ def __init__( self.backup_id = backup_id self.baremetal_tenant_id = None self.subnet_id = subnet_id - self.mount_targets = mount_targets + self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection self.is_restoring = is_restoring self.snapshot_directory_visible = snapshot_directory_visible self.kerberos_enabled = kerberos_enabled self.security_style = security_style + self.smb_encryption = smb_encryption + self.smb_continuously_available = smb_continuously_available self.throughput_mibps = throughput_mibps + self.encryption_key_source = encryption_key_source class VolumeBackupProperties(msrest.serialization.Model): @@ -2349,20 +2518,25 @@ class VolumeList(msrest.serialization.Model): :param value: List of volumes. :type value: list[~azure.mgmt.netapp.models.Volume] + :param next_link: URL to get the next set of results. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[Volume]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["Volume"]] = None, + next_link: Optional[str] = None, **kwargs ): super(VolumeList, self).__init__(**kwargs) self.value = value + self.next_link = next_link class VolumePatch(msrest.serialization.Model): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py index 41b21e36628c..80474e2a1716 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/models/_net_app_management_client_enums.py @@ -54,6 +54,15 @@ class CheckQuotaNameResourceTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes" MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots" +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + class EndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates whether the local volume is the source or destination for the Volume Replication """ @@ -70,6 +79,12 @@ class InAvailabilityReasonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu INVALID = "Invalid" ALREADY_EXISTS = "AlreadyExists" +class KeySource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Encryption Key Source. Possible values are: 'Microsoft.NetApp'. + """ + + MICROSOFT_NET_APP = "Microsoft.NetApp" #: The service manages the keys. + class MirrorState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The status of the replication """ @@ -101,7 +116,7 @@ class ReplicationSchedule(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DAILY = "daily" class SecurityStyle(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The security style of volume + """The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol """ NTFS = "ntfs" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py index 6a97828369d7..38f8b34b72ba 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -135,7 +135,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -185,7 +185,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py index 87839a8de639..a5a61c3fd34d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -101,7 +101,7 @@ def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -145,7 +145,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -188,13 +188,13 @@ def _create_or_update_initial( body, # type: "_models.NetAppAccount" **kwargs # type: Any ): - # type: (...) -> Optional["_models.NetAppAccount"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]] + # type: (...) -> "_models.NetAppAccount" + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -223,11 +223,10 @@ def _create_or_update_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('NetAppAccount', pipeline_response) @@ -300,7 +299,7 @@ def get_long_running_output(pipeline_response): 'accountName': self._serialize.url("account_name", account_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -326,7 +325,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -431,13 +430,13 @@ def _update_initial( body, # type: "_models.NetAppAccountPatch" **kwargs # type: Any ): - # type: (...) -> Optional["_models.NetAppAccount"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]] + # type: (...) -> "_models.NetAppAccount" + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -466,15 +465,14 @@ def _update_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('NetAppAccount', pipeline_response) - if response.status_code == 201: + if response.status_code == 202: deserialized = self._deserialize('NetAppAccount', pipeline_response) if cls: @@ -543,7 +541,7 @@ def get_long_running_output(pipeline_response): 'accountName': self._serialize.url("account_name", account_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py index 384cc10607b4..f783b03d0c2c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -360,7 +360,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -390,11 +390,15 @@ def update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupPolicy', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('BackupPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackupPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -415,7 +419,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py index 545abdd36d1a..49e891d252be 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -166,7 +166,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -221,7 +221,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -396,7 +396,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -458,7 +458,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py index 1e6fc278cb6d..c41bc5f859b5 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py @@ -77,7 +77,7 @@ def check_name_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -150,7 +150,7 @@ def check_file_path_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.ResourceNameAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -223,7 +223,7 @@ def check_quota_availability( error_map.update(kwargs.pop('error_map', {})) _body = _models.QuotaAvailabilityRequest(name=name, type=type, resource_group=resource_group) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index 4b26eb2a43aa..6965d005f903 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py index 13b9e3d2032c..e3a5f229d44b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -105,7 +105,7 @@ def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -197,13 +197,13 @@ def _create_or_update_initial( body, # type: "_models.CapacityPool" **kwargs # type: Any ): - # type: (...) -> Optional["_models.CapacityPool"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CapacityPool"]] + # type: (...) -> "_models.CapacityPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapacityPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -233,11 +233,10 @@ def _create_or_update_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('CapacityPool', pipeline_response) @@ -315,7 +314,7 @@ def get_long_running_output(pipeline_response): '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}$'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -343,7 +342,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -479,7 +478,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py index 8c5ac921398b..71b83af539fa 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -214,7 +214,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -260,7 +260,7 @@ def create( return deserialized create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore - def update( + def _update_initial( self, resource_group_name, # type: str account_name, # type: str @@ -269,32 +269,17 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.SnapshotPolicy" - """Patch a snapshot policy. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param account_name: The name of the NetApp account. - :type account_name: str - :param snapshot_policy_name: The name of the snapshot policy target. - :type snapshot_policy_name: str - :param body: Snapshot policy object supplied in the body of the operation. - :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SnapshotPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.netapp.models.SnapshotPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -319,17 +304,98 @@ def update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + account_name, # type: str + snapshot_policy_name, # type: str + body, # type: "_models.SnapshotPolicyPatch" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.SnapshotPolicy"] + """Patch a snapshot policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param account_name: The name of the NetApp account. + :type account_name: str + :param snapshot_policy_name: The name of the snapshot policy target. + :type snapshot_policy_name: str + :param body: Snapshot policy object supplied in the body of the operation. + :type body: ~azure.mgmt.netapp.models.SnapshotPolicyPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either SnapshotPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.SnapshotPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + snapshot_policy_name=snapshot_policy_name, + body=body, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('SnapshotPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'snapshotPolicyName': self._serialize.url("snapshot_policy_name", snapshot_policy_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'} # type: ignore def _delete_initial( self, @@ -344,7 +410,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -454,7 +520,7 @@ def list_volumes( **kwargs # type: Any ): # type: (...) -> "_models.SnapshotPolicyVolumeList" - """Get volumes associated with snapshot policy. + """Get volumes for snapshot policy. Get volumes associated with snapshot policy. @@ -474,7 +540,7 @@ def list_volumes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -509,4 +575,4 @@ def list_volumes( return cls(pipeline_response, deserialized, {}) return deserialized - list_volumes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/listVolumes'} # type: ignore + list_volumes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes'} # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py index b7eed4954269..6d819557b477 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -166,7 +166,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -221,7 +221,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -372,7 +372,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -522,7 +522,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py index 4bcbcff32cd5..ad203cb4f08b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py index cab4eca82f95..1c3f3eaad60a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +109,7 @@ def extract_data(pipeline_response): list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -159,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -359,7 +359,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -502,7 +502,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -627,7 +627,7 @@ def _revert_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -761,7 +761,7 @@ def _break_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -914,7 +914,7 @@ def replication_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" accept = "application/json" # Construct URL @@ -966,7 +966,7 @@ def _resync_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._resync_replication_initial.metadata['url'] # type: ignore @@ -1011,7 +1011,7 @@ def begin_resync_replication( """Resync volume replication. Resync the connection on the destination volume. If the operation is ran on the source volume - it will reverse-resync the connection and sync from source to destination. + it will reverse-resync the connection and sync from destination to source. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -1091,7 +1091,7 @@ def _delete_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._delete_replication_initial.metadata['url'] # type: ignore @@ -1217,7 +1217,7 @@ def _authorize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1350,7 +1350,7 @@ def _re_initialize_replication_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" # Construct URL url = self._re_initialize_replication_initial.metadata['url'] # type: ignore @@ -1475,7 +1475,7 @@ def _pool_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-01" + api_version = "2020-11-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL