diff --git a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md index fb6be7828bbe..20fd83e19289 100644 --- a/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-mgmt-netapp/CHANGELOG.md @@ -1,5 +1,40 @@ # Release History +## 13.4.0b1 (2024-11-18) + +### Features Added + + - Model `Backup` added property `is_large_volume` + - Model `CapacityPool` added property `custom_throughput_mibps` + - Model `CapacityPoolPatch` added property `custom_throughput_mibps` + - Model `EncryptionIdentity` added property `federated_client_id` + - Model `NetAppAccount` added property `nfs_v4_id_domain` + - Model `NetAppAccount` added property `is_multi_ad_enabled` + - Model `NetAppAccountPatch` added property `nfs_v4_id_domain` + - Model `NetAppAccountPatch` added property `is_multi_ad_enabled` + - Model `ReplicationObject` added property `destination_replications` + - Enum `ServiceLevel` added member `FLEXIBLE` + - Model `Volume` added property `accept_grow_capacity_pool_for_short_term_clone_split` + - Model `Volume` added property `inherited_size_in_bytes` + - Model `Volume` added property `language` + - Model `VolumeGroupVolumeProperties` added property `accept_grow_capacity_pool_for_short_term_clone_split` + - Model `VolumeGroupVolumeProperties` added property `inherited_size_in_bytes` + - Model `VolumeGroupVolumeProperties` added property `language` + - Added enum `AcceptGrowCapacityPoolForShortTermCloneSplit` + - Added model `ChangeKeyVault` + - Added model `DestinationReplication` + - Added model `EncryptionTransitionRequest` + - Added model `KeyVaultPrivateEndpoint` + - Added model `ListQuotaReportResponse` + - Added model `QuotaReport` + - Added enum `ReplicationType` + - Added enum `VolumeLanguage` + - Operation group `AccountsOperations` added method `begin_change_key_vault` + - Operation group `AccountsOperations` added method `begin_get_change_key_vault_information` + - Operation group `AccountsOperations` added method `begin_transition_to_cmk` + - Operation group `VolumesOperations` added method `begin_list_quota_report` + - Operation group `VolumesOperations` added method `begin_split_clone_from_parent` + ## 13.3.0 (2024-10-21) ### Features Added diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json index 32874b8cb138..5136e9793ac0 100644 --- a/sdk/netapp/azure-mgmt-netapp/_meta.json +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -1,11 +1,11 @@ { - "commit": "7a848fa439e779117793063aff964d7082a7f6f8", + "commit": "c4dc3cd6256c8a7525079f2b98285cd5b1c8bee6", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ "@autorest/python@6.19.0", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-preview-2024-07-01-preview --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/netapp/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/assets.json b/sdk/netapp/azure-mgmt-netapp/assets.json index ce01211f7547..e9c170de03b2 100644 --- a/sdk/netapp/azure-mgmt-netapp/assets.json +++ b/sdk/netapp/azure-mgmt-netapp/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "python", "TagPrefix": "python/netapp/azure-mgmt-netapp", - "Tag": "python/netapp/azure-mgmt-netapp_7f4c96bada" + "Tag": "python/netapp/azure-mgmt-netapp_d458e8b242" } 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 1904e9c00312..4a594b650db0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py @@ -28,13 +28,13 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance- :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-07-01") + api_version: str = kwargs.pop("api_version", "2024-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 8873a9d76671..5bb7c457a9c3 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 @@ -92,8 +92,8 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. 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 d0255959d2e5..7dc1645854db 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "13.3.0" +VERSION = "13.4.0b1" 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 fd21b8d0d7e9..e27587969925 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 @@ -28,13 +28,13 @@ class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance- :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2024-07-01") + api_version: str = kwargs.pop("api_version", "2024-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 aac0ee0a2621..3647010bd36c 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 @@ -92,8 +92,8 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. 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 943956bf1a00..35e28eab093c 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 @@ -33,12 +33,15 @@ from ... import models as _models from ...operations._accounts_operations import ( + build_change_key_vault_request, build_create_or_update_request, build_delete_request, + build_get_change_key_vault_information_request, build_get_request, build_list_by_subscription_request, build_list_request, build_renew_credentials_request, + build_transition_to_cmk_request, build_update_request, ) @@ -898,3 +901,527 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- deserialization_callback=get_long_running_output, ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _transition_to_cmk_initial( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "EncryptionTransitionRequest") + else: + _json = None + + _request = build_transition_to_cmk_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[_models.EncryptionTransitionRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Is either a + EncryptionTransitionRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or IO[bytes] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._transition_to_cmk_initial( + resource_group_name=resource_group_name, + account_name=account_name, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _get_change_key_vault_information_initial( # pylint: disable=name-too-long + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_get_change_key_vault_information_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_get_change_key_vault_information( + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Get information about how volumes under NetApp account are encrypted. + + Contains data from encryption.keyVaultProperties as well as information about which private + endpoint is used by each encryption sibling set. Response from this endpoint can be modified + and used as request body for POST request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._get_change_key_vault_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + async def _change_key_vault_initial( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "ChangeKeyVault") + else: + _json = None + + _request = build_change_key_vault_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[_models.ChangeKeyVault] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Is either a + ChangeKeyVault type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or IO[bytes] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._change_key_vault_initial( + resource_group_name=resource_group_name, + account_name=account_name, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore 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 e320d2787159..03b8a7e03871 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 @@ -44,6 +44,7 @@ build_finalize_relocation_request, build_get_request, build_list_get_group_id_list_for_ldap_user_request, + build_list_quota_report_request, build_list_replications_request, build_list_request, build_peer_external_cluster_request, @@ -58,6 +59,7 @@ build_resync_replication_request, build_revert_relocation_request, build_revert_request, + build_split_clone_from_parent_request, build_update_request, ) @@ -1293,6 +1295,127 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _split_clone_from_parent_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_split_clone_from_parent_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_split_clone_from_parent( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Split clone from parent volume. + + Split operation to convert clone volume to an independent volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._split_clone_from_parent_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + async def _break_file_locks_initial( self, resource_group_name: str, @@ -1752,6 +1875,133 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + async def _list_quota_report_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_list_quota_report_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def begin_list_quota_report( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> AsyncLROPoller[_models.ListQuotaReportResponse]: + """Lists Quota Report for the volume. + + Returns report of quotas for the volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of AsyncLROPoller that returns either ListQuotaReportResponse or the + result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ListQuotaReportResponse] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._list_quota_report_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ListQuotaReportResponse", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ListQuotaReportResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ListQuotaReportResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + async def _break_replication_initial( self, resource_group_name: str, 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 109a256f9548..c78f59758d38 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 @@ -26,12 +26,15 @@ from ._models_py3 import CapacityPool from ._models_py3 import CapacityPoolList from ._models_py3 import CapacityPoolPatch +from ._models_py3 import ChangeKeyVault from ._models_py3 import CheckAvailabilityResponse from ._models_py3 import CloudErrorBody from ._models_py3 import ClusterPeerCommandResponse from ._models_py3 import DailySchedule +from ._models_py3 import DestinationReplication from ._models_py3 import Dimension from ._models_py3 import EncryptionIdentity +from ._models_py3 import EncryptionTransitionRequest from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse @@ -40,8 +43,10 @@ from ._models_py3 import GetGroupIdListForLDAPUserRequest from ._models_py3 import GetGroupIdListForLDAPUserResponse from ._models_py3 import HourlySchedule +from ._models_py3 import KeyVaultPrivateEndpoint from ._models_py3 import KeyVaultProperties from ._models_py3 import LdapSearchScopeOpt +from ._models_py3 import ListQuotaReportResponse from ._models_py3 import ListReplications from ._models_py3 import LogSpecification from ._models_py3 import ManagedServiceIdentity @@ -63,6 +68,7 @@ from ._models_py3 import ProxyResource from ._models_py3 import QueryNetworkSiblingSetRequest from ._models_py3 import QuotaAvailabilityRequest +from ._models_py3 import QuotaReport from ._models_py3 import ReestablishReplicationRequest from ._models_py3 import RegionInfo from ._models_py3 import RegionInfoAvailabilityZoneMappingsItem @@ -119,6 +125,7 @@ from ._models_py3 import VolumeSnapshotProperties from ._models_py3 import WeeklySchedule +from ._net_app_management_client_enums import AcceptGrowCapacityPoolForShortTermCloneSplit from ._net_app_management_client_enums import ActiveDirectoryStatus from ._net_app_management_client_enums import ApplicationType from ._net_app_management_client_enums import AvsDataStore @@ -146,11 +153,13 @@ from ._net_app_management_client_enums import RegionStorageToNetworkProximity from ._net_app_management_client_enums import RelationshipStatus from ._net_app_management_client_enums import ReplicationSchedule +from ._net_app_management_client_enums import ReplicationType from ._net_app_management_client_enums import SecurityStyle from ._net_app_management_client_enums import ServiceLevel from ._net_app_management_client_enums import SmbAccessBasedEnumeration from ._net_app_management_client_enums import SmbNonBrowsable from ._net_app_management_client_enums import Type +from ._net_app_management_client_enums import VolumeLanguage from ._net_app_management_client_enums import VolumeStorageToNetworkProximity from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import @@ -177,12 +186,15 @@ "CapacityPool", "CapacityPoolList", "CapacityPoolPatch", + "ChangeKeyVault", "CheckAvailabilityResponse", "CloudErrorBody", "ClusterPeerCommandResponse", "DailySchedule", + "DestinationReplication", "Dimension", "EncryptionIdentity", + "EncryptionTransitionRequest", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", @@ -191,8 +203,10 @@ "GetGroupIdListForLDAPUserRequest", "GetGroupIdListForLDAPUserResponse", "HourlySchedule", + "KeyVaultPrivateEndpoint", "KeyVaultProperties", "LdapSearchScopeOpt", + "ListQuotaReportResponse", "ListReplications", "LogSpecification", "ManagedServiceIdentity", @@ -214,6 +228,7 @@ "ProxyResource", "QueryNetworkSiblingSetRequest", "QuotaAvailabilityRequest", + "QuotaReport", "ReestablishReplicationRequest", "RegionInfo", "RegionInfoAvailabilityZoneMappingsItem", @@ -269,6 +284,7 @@ "VolumeRevert", "VolumeSnapshotProperties", "WeeklySchedule", + "AcceptGrowCapacityPoolForShortTermCloneSplit", "ActiveDirectoryStatus", "ApplicationType", "AvsDataStore", @@ -296,11 +312,13 @@ "RegionStorageToNetworkProximity", "RelationshipStatus", "ReplicationSchedule", + "ReplicationType", "SecurityStyle", "ServiceLevel", "SmbAccessBasedEnumeration", "SmbNonBrowsable", "Type", + "VolumeLanguage", "VolumeStorageToNetworkProximity", ] __all__.extend([p for p in _patch_all if p not in __all__]) 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 28aa3109c596..34278feb3214 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 @@ -141,7 +141,7 @@ class ActiveDirectory(_serialization.Model): # pylint: disable=too-many-instanc "status": {"readonly": True}, "status_details": {"readonly": True}, "kdc_ip": { - "pattern": r"^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$" + "pattern": r"^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" }, "ad_name": {"max_length": 64, "min_length": 1}, "server_root_ca_certificate": {"max_length": 10240, "min_length": 1}, @@ -411,6 +411,8 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes :vartype snapshot_name: str :ivar backup_policy_resource_id: ResourceId used to identify the backup policy. :vartype backup_policy_resource_id: str + :ivar is_large_volume: Specifies if the backup is for a large volume. + :vartype is_large_volume: bool """ _validation = { @@ -431,6 +433,7 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes "failure_reason": {"readonly": True}, "volume_resource_id": {"required": True}, "backup_policy_resource_id": {"readonly": True}, + "is_large_volume": {"readonly": True}, } _attribute_map = { @@ -449,6 +452,7 @@ class Backup(ProxyResource): # pylint: disable=too-many-instance-attributes "use_existing_snapshot": {"key": "properties.useExistingSnapshot", "type": "bool"}, "snapshot_name": {"key": "properties.snapshotName", "type": "str"}, "backup_policy_resource_id": {"key": "properties.backupPolicyResourceId", "type": "str"}, + "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, } def __init__( @@ -483,6 +487,7 @@ def __init__( self.use_existing_snapshot = use_existing_snapshot self.snapshot_name = snapshot_name self.backup_policy_resource_id = None + self.is_large_volume = None class BackupPatch(_serialization.Model): @@ -603,7 +608,7 @@ class BackupPolicy(TrackedResource): # pylint: disable=too-many-instance-attrib :vartype location: str :ivar etag: A unique read-only string that changes whenever the resource is updated. :vartype etag: str - :ivar backup_policy_id: Backup Policy GUID ID. + :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str @@ -704,7 +709,7 @@ class BackupPolicyPatch(_serialization.Model): # pylint: disable=too-many-insta :vartype type: str :ivar tags: Resource tags. :vartype tags: dict[str, str] - :ivar backup_policy_id: Backup Policy GUID ID. + :ivar backup_policy_id: Backup Policy Resource ID. :vartype backup_policy_id: str :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str @@ -1154,7 +1159,7 @@ class CapacityPool(TrackedResource): # pylint: disable=too-many-instance-attrib must be multiple of 1099511627776). :vartype size: int :ivar service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar provisioning_state: Azure lifecycle management. :vartype provisioning_state: str @@ -1162,6 +1167,9 @@ class CapacityPool(TrackedResource): # pylint: disable=too-many-instance-attrib :vartype total_throughput_mibps: float :ivar utilized_throughput_mibps: Utilized throughput of pool in MiB/s. :vartype utilized_throughput_mibps: float + :ivar custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :vartype custom_throughput_mibps: float :ivar qos_type: The qos type of the pool. Known values are: "Auto" and "Manual". :vartype qos_type: str or ~azure.mgmt.netapp.models.QosType :ivar cool_access: If enabled (true) the pool can contain cool Access enabled volumes. @@ -1206,6 +1214,7 @@ class CapacityPool(TrackedResource): # pylint: disable=too-many-instance-attrib "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "total_throughput_mibps": {"key": "properties.totalThroughputMibps", "type": "float"}, "utilized_throughput_mibps": {"key": "properties.utilizedThroughputMibps", "type": "float"}, + "custom_throughput_mibps": {"key": "properties.customThroughputMibps", "type": "float"}, "qos_type": {"key": "properties.qosType", "type": "str"}, "cool_access": {"key": "properties.coolAccess", "type": "bool"}, "encryption_type": {"key": "properties.encryptionType", "type": "str"}, @@ -1218,6 +1227,7 @@ def __init__( size: int = 4398046511104, service_level: Union[str, "_models.ServiceLevel"] = "Premium", tags: Optional[Dict[str, str]] = None, + custom_throughput_mibps: Optional[float] = None, qos_type: Optional[Union[str, "_models.QosType"]] = None, cool_access: bool = False, encryption_type: Union[str, "_models.EncryptionType"] = "Single", @@ -1232,8 +1242,11 @@ def __init__( (value must be multiple of 1099511627776). :paramtype size: int :keyword service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :paramtype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel + :keyword custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :paramtype custom_throughput_mibps: float :keyword qos_type: The qos type of the pool. Known values are: "Auto" and "Manual". :paramtype qos_type: str or ~azure.mgmt.netapp.models.QosType :keyword cool_access: If enabled (true) the pool can contain cool Access enabled volumes. @@ -1251,6 +1264,7 @@ def __init__( self.provisioning_state = None self.total_throughput_mibps = None self.utilized_throughput_mibps = None + self.custom_throughput_mibps = custom_throughput_mibps self.qos_type = qos_type self.cool_access = cool_access self.encryption_type = encryption_type @@ -1306,6 +1320,9 @@ class CapacityPoolPatch(_serialization.Model): :vartype qos_type: str or ~azure.mgmt.netapp.models.QosType :ivar cool_access: If enabled (true) the pool can contain cool Access enabled volumes. :vartype cool_access: bool + :ivar custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :vartype custom_throughput_mibps: float """ _validation = { @@ -1323,6 +1340,7 @@ class CapacityPoolPatch(_serialization.Model): "size": {"key": "properties.size", "type": "int"}, "qos_type": {"key": "properties.qosType", "type": "str"}, "cool_access": {"key": "properties.coolAccess", "type": "bool"}, + "custom_throughput_mibps": {"key": "properties.customThroughputMibps", "type": "float"}, } def __init__( @@ -1333,6 +1351,7 @@ def __init__( size: int = 4398046511104, qos_type: Optional[Union[str, "_models.QosType"]] = None, cool_access: Optional[bool] = None, + custom_throughput_mibps: Optional[float] = None, **kwargs: Any ) -> None: """ @@ -1347,6 +1366,9 @@ def __init__( :paramtype qos_type: str or ~azure.mgmt.netapp.models.QosType :keyword cool_access: If enabled (true) the pool can contain cool Access enabled volumes. :paramtype cool_access: bool + :keyword custom_throughput_mibps: Maximum throughput in MiB/s that can be achieved by this pool + and this will be accepted as input only for manual qosType pool with Flexible service level. + :paramtype custom_throughput_mibps: float """ super().__init__(**kwargs) self.location = location @@ -1357,6 +1379,69 @@ def __init__( self.size = size self.qos_type = qos_type self.cool_access = cool_access + self.custom_throughput_mibps = custom_throughput_mibps + + +class ChangeKeyVault(_serialization.Model): + """Change key vault request. + + All required parameters must be populated in order to send to server. + + :ivar key_vault_uri: The URI of the key vault/managed HSM that should be used for encryption. + Required. + :vartype key_vault_uri: str + :ivar key_name: The name of the key that should be used for encryption. Required. + :vartype key_name: str + :ivar key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be used + for encryption. + :vartype key_vault_resource_id: str + :ivar key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. Every + virtual network that has volumes encrypted with customer-managed keys needs its own key vault + private endpoint. Required. + :vartype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] + """ + + _validation = { + "key_vault_uri": {"required": True}, + "key_name": {"required": True}, + "key_vault_private_endpoints": {"required": True}, + } + + _attribute_map = { + "key_vault_uri": {"key": "keyVaultUri", "type": "str"}, + "key_name": {"key": "keyName", "type": "str"}, + "key_vault_resource_id": {"key": "keyVaultResourceId", "type": "str"}, + "key_vault_private_endpoints": {"key": "keyVaultPrivateEndpoints", "type": "[KeyVaultPrivateEndpoint]"}, + } + + def __init__( + self, + *, + key_vault_uri: str, + key_name: str, + key_vault_private_endpoints: List["_models.KeyVaultPrivateEndpoint"], + key_vault_resource_id: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword key_vault_uri: The URI of the key vault/managed HSM that should be used for + encryption. Required. + :paramtype key_vault_uri: str + :keyword key_name: The name of the key that should be used for encryption. Required. + :paramtype key_name: str + :keyword key_vault_resource_id: Azure resource ID of the key vault/managed HSM that should be + used for encryption. + :paramtype key_vault_resource_id: str + :keyword key_vault_private_endpoints: Pairs of virtual network ID and private endpoint ID. + Every virtual network that has volumes encrypted with customer-managed keys needs its own key + vault private endpoint. Required. + :paramtype key_vault_private_endpoints: list[~azure.mgmt.netapp.models.KeyVaultPrivateEndpoint] + """ + super().__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_name = key_name + self.key_vault_resource_id = key_vault_resource_id + self.key_vault_private_endpoints = key_vault_private_endpoints class CheckAvailabilityResponse(_serialization.Model): @@ -1510,6 +1595,54 @@ def __init__( self.used_bytes = used_bytes +class DestinationReplication(_serialization.Model): + """Destination replication properties. + + :ivar resource_id: The resource ID of the remote volume. + :vartype resource_id: str + :ivar replication_type: Indicates whether the replication is cross zone or cross region. Known + values are: "CrossRegionReplication" and "CrossZoneReplication". + :vartype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType + :ivar region: The remote region for the destination volume. + :vartype region: str + :ivar zone: The remote zone for the destination volume. + :vartype zone: str + """ + + _attribute_map = { + "resource_id": {"key": "resourceId", "type": "str"}, + "replication_type": {"key": "replicationType", "type": "str"}, + "region": {"key": "region", "type": "str"}, + "zone": {"key": "zone", "type": "str"}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + replication_type: Optional[Union[str, "_models.ReplicationType"]] = None, + region: Optional[str] = None, + zone: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword resource_id: The resource ID of the remote volume. + :paramtype resource_id: str + :keyword replication_type: Indicates whether the replication is cross zone or cross region. + Known values are: "CrossRegionReplication" and "CrossZoneReplication". + :paramtype replication_type: str or ~azure.mgmt.netapp.models.ReplicationType + :keyword region: The remote region for the destination volume. + :paramtype region: str + :keyword zone: The remote zone for the destination volume. + :paramtype zone: str + """ + super().__init__(**kwargs) + self.resource_id = resource_id + self.replication_type = replication_type + self.region = region + self.zone = zone + + class Dimension(_serialization.Model): """Dimension of blobs, possibly be blob type or access tier. @@ -1548,6 +1681,9 @@ class EncryptionIdentity(_serialization.Model): authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. :vartype user_assigned_identity: str + :ivar federated_client_id: ClientId of the multi-tenant AAD Application. Used to access + cross-tenant KeyVaults. + :vartype federated_client_id: str """ _validation = { @@ -1557,18 +1693,60 @@ class EncryptionIdentity(_serialization.Model): _attribute_map = { "principal_id": {"key": "principalId", "type": "str"}, "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, + "federated_client_id": {"key": "federatedClientId", "type": "str"}, } - def __init__(self, *, user_assigned_identity: Optional[str] = None, **kwargs: Any) -> None: + def __init__( + self, *, user_assigned_identity: Optional[str] = None, federated_client_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword user_assigned_identity: The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. :paramtype user_assigned_identity: str + :keyword federated_client_id: ClientId of the multi-tenant AAD Application. Used to access + cross-tenant KeyVaults. + :paramtype federated_client_id: str """ super().__init__(**kwargs) self.principal_id = None self.user_assigned_identity = user_assigned_identity + self.federated_client_id = federated_client_id + + +class EncryptionTransitionRequest(_serialization.Model): + """Encryption transition request. + + All required parameters must be populated in order to send to server. + + :ivar virtual_network_id: Identifier for the virtual network. Required. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :vartype private_endpoint_id: str + """ + + _validation = { + "virtual_network_id": {"required": True}, + "private_endpoint_id": {"required": True}, + } + + _attribute_map = { + "virtual_network_id": {"key": "virtualNetworkId", "type": "str"}, + "private_endpoint_id": {"key": "privateEndpointId", "type": "str"}, + } + + def __init__(self, *, virtual_network_id: str, private_endpoint_id: str, **kwargs: Any) -> None: + """ + :keyword virtual_network_id: Identifier for the virtual network. Required. + :paramtype virtual_network_id: str + :keyword private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + Required. + :paramtype private_endpoint_id: str + """ + super().__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.private_endpoint_id = private_endpoint_id class ErrorAdditionalInfo(_serialization.Model): @@ -1935,6 +2113,35 @@ def __init__( self.used_bytes = used_bytes +class KeyVaultPrivateEndpoint(_serialization.Model): + """Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes + encrypted with customer-managed keys needs its own key vault private endpoint. + + :ivar virtual_network_id: Identifier for the virtual network id. + :vartype virtual_network_id: str + :ivar private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + :vartype private_endpoint_id: str + """ + + _attribute_map = { + "virtual_network_id": {"key": "virtualNetworkId", "type": "str"}, + "private_endpoint_id": {"key": "privateEndpointId", "type": "str"}, + } + + def __init__( + self, *, virtual_network_id: Optional[str] = None, private_endpoint_id: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword virtual_network_id: Identifier for the virtual network id. + :paramtype virtual_network_id: str + :keyword private_endpoint_id: Identifier of the private endpoint to reach the Azure Key Vault. + :paramtype private_endpoint_id: str + """ + super().__init__(**kwargs) + self.virtual_network_id = virtual_network_id + self.private_endpoint_id = private_endpoint_id + + class KeyVaultProperties(_serialization.Model): """Properties of key vault. @@ -2041,6 +2248,34 @@ def __init__( self.group_membership_filter = group_membership_filter +class ListQuotaReportResponse(_serialization.Model): + """Quota Report for volume. + + :ivar value: List of volume quota report records. + :vartype value: list[~azure.mgmt.netapp.models.QuotaReport] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[QuotaReport]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.QuotaReport"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: List of volume quota report records. + :paramtype value: list[~azure.mgmt.netapp.models.QuotaReport] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + class ListReplications(_serialization.Model): """List Replications. @@ -2516,6 +2751,11 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the subscription, null equals false. :vartype disable_showmount: bool + :ivar nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :vartype nfs_v4_id_domain: str + :ivar is_multi_ad_enabled: This will have true value only if account is Multiple AD enabled. + :vartype is_multi_ad_enabled: bool """ _validation = { @@ -2527,6 +2767,8 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri "etag": {"readonly": True}, "provisioning_state": {"readonly": True}, "disable_showmount": {"readonly": True}, + "nfs_v4_id_domain": {"max_length": 255, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9.-]{0,253}[a-zA-Z0-9]$"}, + "is_multi_ad_enabled": {"readonly": True}, } _attribute_map = { @@ -2542,6 +2784,8 @@ class NetAppAccount(TrackedResource): # pylint: disable=too-many-instance-attri "active_directories": {"key": "properties.activeDirectories", "type": "[ActiveDirectory]"}, "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, "disable_showmount": {"key": "properties.disableShowmount", "type": "bool"}, + "nfs_v4_id_domain": {"key": "properties.nfsV4IDDomain", "type": "str"}, + "is_multi_ad_enabled": {"key": "properties.isMultiAdEnabled", "type": "bool"}, } def __init__( @@ -2552,6 +2796,7 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, active_directories: Optional[List["_models.ActiveDirectory"]] = None, encryption: Optional["_models.AccountEncryption"] = None, + nfs_v4_id_domain: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -2565,6 +2810,9 @@ def __init__( :paramtype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] :keyword encryption: Encryption settings. :paramtype encryption: ~azure.mgmt.netapp.models.AccountEncryption + :keyword nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :paramtype nfs_v4_id_domain: str """ super().__init__(tags=tags, location=location, **kwargs) self.etag = None @@ -2573,6 +2821,8 @@ def __init__( self.active_directories = active_directories self.encryption = encryption self.disable_showmount = None + self.nfs_v4_id_domain = nfs_v4_id_domain + self.is_multi_ad_enabled = None class NetAppAccountList(_serialization.Model): @@ -2603,7 +2853,7 @@ def __init__( self.next_link = next_link -class NetAppAccountPatch(_serialization.Model): +class NetAppAccountPatch(_serialization.Model): # pylint: disable=too-many-instance-attributes """NetApp account patch resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -2629,6 +2879,11 @@ class NetAppAccountPatch(_serialization.Model): :ivar disable_showmount: Shows the status of disableShowmount for all volumes under the subscription, null equals false. :vartype disable_showmount: bool + :ivar nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :vartype nfs_v4_id_domain: str + :ivar is_multi_ad_enabled: This will have true value only if account is Multiple AD enabled. + :vartype is_multi_ad_enabled: bool """ _validation = { @@ -2637,6 +2892,8 @@ class NetAppAccountPatch(_serialization.Model): "type": {"readonly": True}, "provisioning_state": {"readonly": True}, "disable_showmount": {"readonly": True}, + "nfs_v4_id_domain": {"max_length": 255, "pattern": r"^[a-zA-Z0-9][a-zA-Z0-9.-]{0,253}[a-zA-Z0-9]$"}, + "is_multi_ad_enabled": {"readonly": True}, } _attribute_map = { @@ -2650,6 +2907,8 @@ class NetAppAccountPatch(_serialization.Model): "active_directories": {"key": "properties.activeDirectories", "type": "[ActiveDirectory]"}, "encryption": {"key": "properties.encryption", "type": "AccountEncryption"}, "disable_showmount": {"key": "properties.disableShowmount", "type": "bool"}, + "nfs_v4_id_domain": {"key": "properties.nfsV4IDDomain", "type": "str"}, + "is_multi_ad_enabled": {"key": "properties.isMultiAdEnabled", "type": "bool"}, } def __init__( @@ -2660,6 +2919,7 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, active_directories: Optional[List["_models.ActiveDirectory"]] = None, encryption: Optional["_models.AccountEncryption"] = None, + nfs_v4_id_domain: Optional[str] = None, **kwargs: Any ) -> None: """ @@ -2673,6 +2933,9 @@ def __init__( :paramtype active_directories: list[~azure.mgmt.netapp.models.ActiveDirectory] :keyword encryption: Encryption settings. :paramtype encryption: ~azure.mgmt.netapp.models.AccountEncryption + :keyword nfs_v4_id_domain: Domain for NFSv4 user ID mapping. This property will be set for all + NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + :paramtype nfs_v4_id_domain: str """ super().__init__(**kwargs) self.location = location @@ -2685,6 +2948,8 @@ def __init__( self.active_directories = active_directories self.encryption = encryption self.disable_showmount = None + self.nfs_v4_id_domain = nfs_v4_id_domain + self.is_multi_ad_enabled = None class NetworkSiblingSet(_serialization.Model): @@ -3095,6 +3360,76 @@ def __init__( self.resource_group = resource_group +class QuotaReport(_serialization.Model): + """Quota report record properties. + + :ivar quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota", + "IndividualUserQuota", and "IndividualGroupQuota". + :vartype quota_type: str or ~azure.mgmt.netapp.models.Type + :ivar quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID can + be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by + running :code:``. + :vartype quota_target: str + :ivar quota_limit_used_in_ki_bs: Specifies the current usage in kibibytes for the user/group + quota. + :vartype quota_limit_used_in_ki_bs: int + :ivar quota_limit_total_in_ki_bs: Specifies the total size limit in kibibytes for the + user/group quota. + :vartype quota_limit_total_in_ki_bs: int + :ivar percentage_used: Percentage of used size compared to total size. + :vartype percentage_used: float + :ivar is_derived_quota: Flag to indicate whether the quota is derived from default quota. + :vartype is_derived_quota: bool + """ + + _attribute_map = { + "quota_type": {"key": "quotaType", "type": "str"}, + "quota_target": {"key": "quotaTarget", "type": "str"}, + "quota_limit_used_in_ki_bs": {"key": "quotaLimitUsedInKiBs", "type": "int"}, + "quota_limit_total_in_ki_bs": {"key": "quotaLimitTotalInKiBs", "type": "int"}, + "percentage_used": {"key": "percentageUsed", "type": "float"}, + "is_derived_quota": {"key": "isDerivedQuota", "type": "bool"}, + } + + def __init__( + self, + *, + quota_type: Optional[Union[str, "_models.Type"]] = None, + quota_target: Optional[str] = None, + quota_limit_used_in_ki_bs: Optional[int] = None, + quota_limit_total_in_ki_bs: Optional[int] = None, + percentage_used: Optional[float] = None, + is_derived_quota: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword quota_type: Type of quota. Known values are: "DefaultUserQuota", "DefaultGroupQuota", + "IndividualUserQuota", and "IndividualGroupQuota". + :paramtype quota_type: str or ~azure.mgmt.netapp.models.Type + :keyword quota_target: UserID/GroupID/SID based on the quota target type. UserID and groupID + can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by + running :code:``. + :paramtype quota_target: str + :keyword quota_limit_used_in_ki_bs: Specifies the current usage in kibibytes for the user/group + quota. + :paramtype quota_limit_used_in_ki_bs: int + :keyword quota_limit_total_in_ki_bs: Specifies the total size limit in kibibytes for the + user/group quota. + :paramtype quota_limit_total_in_ki_bs: int + :keyword percentage_used: Percentage of used size compared to total size. + :paramtype percentage_used: float + :keyword is_derived_quota: Flag to indicate whether the quota is derived from default quota. + :paramtype is_derived_quota: bool + """ + super().__init__(**kwargs) + self.quota_type = quota_type + self.quota_target = quota_target + self.quota_limit_used_in_ki_bs = quota_limit_used_in_ki_bs + self.quota_limit_total_in_ki_bs = quota_limit_total_in_ki_bs + self.percentage_used = percentage_used + self.is_derived_quota = is_derived_quota + + class ReestablishReplicationRequest(_serialization.Model): """Re-establish request object supplied in the body of the operation. @@ -3421,8 +3756,6 @@ class ReplicationObject(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. - :ivar replication_id: Id. :vartype replication_id: str :ivar endpoint_type: Indicates whether the local volume is the source or destination for the @@ -3430,17 +3763,21 @@ class ReplicationObject(_serialization.Model): :vartype endpoint_type: str or ~azure.mgmt.netapp.models.EndpointType :ivar replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily". :vartype replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule - :ivar remote_volume_resource_id: The resource ID of the remote volume. Required for cross region and cross zone replication. + :ivar remote_volume_resource_id: The resource ID of the remote volume. Required for cross + region and cross zone replication. :vartype remote_volume_resource_id: str :ivar remote_path: The full path to a volume that is to be migrated into ANF. Required for Migration volumes. :vartype remote_path: ~azure.mgmt.netapp.models.RemotePath :ivar remote_volume_region: The remote region for the other end of the Volume Replication. :vartype remote_volume_region: str + :ivar destination_replications: A list of destination replications. + :vartype destination_replications: list[~azure.mgmt.netapp.models.DestinationReplication] """ _validation = { "replication_id": {"readonly": True}, + "destination_replications": {"readonly": True}, } _attribute_map = { @@ -3450,14 +3787,15 @@ class ReplicationObject(_serialization.Model): "remote_volume_resource_id": {"key": "remoteVolumeResourceId", "type": "str"}, "remote_path": {"key": "remotePath", "type": "RemotePath"}, "remote_volume_region": {"key": "remoteVolumeRegion", "type": "str"}, + "destination_replications": {"key": "destinationReplications", "type": "[DestinationReplication]"}, } def __init__( self, *, - remote_volume_resource_id: Optional[str] = None, endpoint_type: Optional[Union[str, "_models.EndpointType"]] = None, replication_schedule: Optional[Union[str, "_models.ReplicationSchedule"]] = None, + remote_volume_resource_id: Optional[str] = None, remote_path: Optional["_models.RemotePath"] = None, remote_volume_region: Optional[str] = None, **kwargs: Any @@ -3469,7 +3807,8 @@ def __init__( :keyword replication_schedule: Schedule. Known values are: "_10minutely", "hourly", and "daily". :paramtype replication_schedule: str or ~azure.mgmt.netapp.models.ReplicationSchedule - :keyword remote_volume_resource_id: The resource ID of the remote volume. Required for cross region and cross zone replication. + :keyword remote_volume_resource_id: The resource ID of the remote volume. Required for cross + region and cross zone replication. :paramtype remote_volume_resource_id: str :keyword remote_path: The full path to a volume that is to be migrated into ANF. Required for Migration volumes. @@ -3484,6 +3823,7 @@ def __init__( self.remote_volume_resource_id = remote_volume_resource_id self.remote_path = remote_path self.remote_volume_region = remote_volume_region + self.destination_replications = None class ReplicationStatus(_serialization.Model): @@ -4670,12 +5010,12 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes Required. :vartype creation_token: str :ivar service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :vartype usage_threshold: int :ivar export_policy: Set of export policy rules. :vartype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy @@ -4713,11 +5053,18 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :ivar volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :vartype volume_type: str :ivar data_protection: DataProtection type volumes include an object containing details of the replication. :vartype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :ivar accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short term + clone volume, if the parent pool does not have enough space to accommodate the volume after + split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :vartype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :ivar is_restoring: Restoring. :vartype is_restoring: bool :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -4781,7 +5128,10 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :vartype unix_permissions: str :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no @@ -4835,6 +5185,19 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes :vartype is_large_volume: bool :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. :vartype originating_resource_id: str + :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in + bytes. + :vartype inherited_size_in_bytes: int + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ _validation = { @@ -4881,6 +5244,7 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "encrypted": {"readonly": True}, "provisioned_availability_zone": {"readonly": True}, "originating_resource_id": {"readonly": True}, + "inherited_size_in_bytes": {"readonly": True}, } _attribute_map = { @@ -4911,6 +5275,10 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "mount_targets": {"key": "properties.mountTargets", "type": "[MountTargetProperties]"}, "volume_type": {"key": "properties.volumeType", "type": "str"}, "data_protection": {"key": "properties.dataProtection", "type": "VolumePropertiesDataProtection"}, + "accept_grow_capacity_pool_for_short_term_clone_split": { + "key": "properties.acceptGrowCapacityPoolForShortTermCloneSplit", + "type": "str", + }, "is_restoring": {"key": "properties.isRestoring", "type": "bool"}, "snapshot_directory_visible": {"key": "properties.snapshotDirectoryVisible", "type": "bool"}, "kerberos_enabled": {"key": "properties.kerberosEnabled", "type": "bool"}, @@ -4950,6 +5318,8 @@ class Volume(TrackedResource): # pylint: disable=too-many-instance-attributes "provisioned_availability_zone": {"key": "properties.provisionedAvailabilityZone", "type": "str"}, "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, "originating_resource_id": {"key": "properties.originatingResourceId", "type": "str"}, + "inherited_size_in_bytes": {"key": "properties.inheritedSizeInBytes", "type": "int"}, + "language": {"key": "properties.language", "type": "str"}, } def __init__( # pylint: disable=too-many-locals @@ -4970,6 +5340,9 @@ def __init__( # pylint: disable=too-many-locals network_features: Union[str, "_models.NetworkFeatures"] = "Basic", volume_type: Optional[str] = None, data_protection: Optional["_models.VolumePropertiesDataProtection"] = None, + accept_grow_capacity_pool_for_short_term_clone_split: Optional[ + Union[str, "_models.AcceptGrowCapacityPoolForShortTermCloneSplit"] + ] = None, is_restoring: Optional[bool] = None, snapshot_directory_visible: bool = True, kerberos_enabled: bool = False, @@ -4996,6 +5369,7 @@ def __init__( # pylint: disable=too-many-locals placement_rules: Optional[List["_models.PlacementKeyValuePairs"]] = None, enable_subvolumes: Union[str, "_models.EnableSubvolumes"] = "Disabled", is_large_volume: bool = False, + language: Optional[Union[str, "_models.VolumeLanguage"]] = None, **kwargs: Any ) -> None: """ @@ -5009,12 +5383,12 @@ def __init__( # pylint: disable=too-many-locals Required. :paramtype creation_token: str :keyword service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :paramtype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :keyword usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :paramtype usage_threshold: int :keyword export_policy: Set of export policy rules. :paramtype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy @@ -5035,11 +5409,18 @@ def __init__( # pylint: disable=too-many-locals "Standard_Basic". :paramtype network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures :keyword volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :paramtype volume_type: str :keyword data_protection: DataProtection type volumes include an object containing details of the replication. :paramtype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :keyword accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short + term clone volume, if the parent pool does not have enough space to accommodate the volume + after split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :paramtype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :keyword is_restoring: Restoring. :paramtype is_restoring: bool :keyword snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -5100,7 +5481,10 @@ def __init__( # pylint: disable=too-many-locals digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :paramtype unix_permissions: str :keyword avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. Known values are: "Enabled" and "Disabled". @@ -5128,6 +5512,16 @@ def __init__( # pylint: disable=too-many-locals :paramtype enable_subvolumes: str or ~azure.mgmt.netapp.models.EnableSubvolumes :keyword is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. :paramtype is_large_volume: bool + :keyword language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :paramtype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ super().__init__(tags=tags, location=location, **kwargs) self.etag = None @@ -5151,6 +5545,7 @@ def __init__( # pylint: disable=too-many-locals self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection + self.accept_grow_capacity_pool_for_short_term_clone_split = accept_grow_capacity_pool_for_short_term_clone_split self.is_restoring = is_restoring self.snapshot_directory_visible = snapshot_directory_visible self.kerberos_enabled = kerberos_enabled @@ -5187,6 +5582,8 @@ def __init__( # pylint: disable=too-many-locals self.provisioned_availability_zone = None self.is_large_volume = is_large_volume self.originating_resource_id = None + self.inherited_size_in_bytes = None + self.language = language class VolumeBackupProperties(_serialization.Model): @@ -5494,12 +5891,12 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- Required. :vartype creation_token: str :ivar service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :vartype usage_threshold: int :ivar export_policy: Set of export policy rules. :vartype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy @@ -5537,11 +5934,18 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- :ivar mount_targets: List of mount targets. :vartype mount_targets: list[~azure.mgmt.netapp.models.MountTargetProperties] :ivar volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :vartype volume_type: str :ivar data_protection: DataProtection type volumes include an object containing details of the replication. :vartype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :ivar accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short term + clone volume, if the parent pool does not have enough space to accommodate the volume after + split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :vartype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :ivar is_restoring: Restoring. :vartype is_restoring: bool :ivar snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -5605,7 +6009,10 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :vartype unix_permissions: str :ivar clone_progress: When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no @@ -5659,6 +6066,19 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- :vartype is_large_volume: bool :ivar originating_resource_id: Id of the snapshot or backup that the volume is restored from. :vartype originating_resource_id: str + :ivar inherited_size_in_bytes: Space shared by short term clone volume with parent volume in + bytes. + :vartype inherited_size_in_bytes: int + :ivar language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :vartype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ _validation = { @@ -5701,6 +6121,7 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "encrypted": {"readonly": True}, "provisioned_availability_zone": {"readonly": True}, "originating_resource_id": {"readonly": True}, + "inherited_size_in_bytes": {"readonly": True}, } _attribute_map = { @@ -5728,6 +6149,10 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "mount_targets": {"key": "properties.mountTargets", "type": "[MountTargetProperties]"}, "volume_type": {"key": "properties.volumeType", "type": "str"}, "data_protection": {"key": "properties.dataProtection", "type": "VolumePropertiesDataProtection"}, + "accept_grow_capacity_pool_for_short_term_clone_split": { + "key": "properties.acceptGrowCapacityPoolForShortTermCloneSplit", + "type": "str", + }, "is_restoring": {"key": "properties.isRestoring", "type": "bool"}, "snapshot_directory_visible": {"key": "properties.snapshotDirectoryVisible", "type": "bool"}, "kerberos_enabled": {"key": "properties.kerberosEnabled", "type": "bool"}, @@ -5767,6 +6192,8 @@ class VolumeGroupVolumeProperties(_serialization.Model): # pylint: disable=too- "provisioned_availability_zone": {"key": "properties.provisionedAvailabilityZone", "type": "str"}, "is_large_volume": {"key": "properties.isLargeVolume", "type": "bool"}, "originating_resource_id": {"key": "properties.originatingResourceId", "type": "str"}, + "inherited_size_in_bytes": {"key": "properties.inheritedSizeInBytes", "type": "int"}, + "language": {"key": "properties.language", "type": "str"}, } def __init__( # pylint: disable=too-many-locals @@ -5787,6 +6214,9 @@ def __init__( # pylint: disable=too-many-locals network_features: Union[str, "_models.NetworkFeatures"] = "Basic", volume_type: Optional[str] = None, data_protection: Optional["_models.VolumePropertiesDataProtection"] = None, + accept_grow_capacity_pool_for_short_term_clone_split: Optional[ + Union[str, "_models.AcceptGrowCapacityPoolForShortTermCloneSplit"] + ] = None, is_restoring: Optional[bool] = None, snapshot_directory_visible: bool = True, kerberos_enabled: bool = False, @@ -5813,6 +6243,7 @@ def __init__( # pylint: disable=too-many-locals placement_rules: Optional[List["_models.PlacementKeyValuePairs"]] = None, enable_subvolumes: Union[str, "_models.EnableSubvolumes"] = "Disabled", is_large_volume: bool = False, + language: Optional[Union[str, "_models.VolumeLanguage"]] = None, **kwargs: Any ) -> None: """ @@ -5826,12 +6257,12 @@ def __init__( # pylint: disable=too-many-locals Required. :paramtype creation_token: str :keyword service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :paramtype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :keyword usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :paramtype usage_threshold: int :keyword export_policy: Set of export policy rules. :paramtype export_policy: ~azure.mgmt.netapp.models.VolumePropertiesExportPolicy @@ -5852,11 +6283,18 @@ def __init__( # pylint: disable=too-many-locals "Standard_Basic". :paramtype network_features: str or ~azure.mgmt.netapp.models.NetworkFeatures :keyword volume_type: What type of volume is this. For destination volumes in Cross Region - Replication, set type to DataProtection. + Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. :paramtype volume_type: str :keyword data_protection: DataProtection type volumes include an object containing details of the replication. :paramtype data_protection: ~azure.mgmt.netapp.models.VolumePropertiesDataProtection + :keyword accept_grow_capacity_pool_for_short_term_clone_split: While auto splitting the short + term clone volume, if the parent pool does not have enough space to accommodate the volume + after split, it will be automatically resized, which will lead to increased billing. To accept + capacity pool size auto grow and create a short term clone volume, set the property as + accepted. Known values are: "Accepted" and "Declined". + :paramtype accept_grow_capacity_pool_for_short_term_clone_split: str or + ~azure.mgmt.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit :keyword is_restoring: Restoring. :paramtype is_restoring: bool :keyword snapshot_directory_visible: If enabled (true) the volume will contain a read-only @@ -5917,7 +6355,10 @@ def __init__( # pylint: disable=too-many-locals digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other - users. + users. Avoid passing null value for unixPermissions in volume update operation, As per the + behavior, If Null value is passed then user-visible unixPermissions value will became null, and + user will not be able to get unixPermissions value. On safer side, actual unixPermissions value + on volume will remain as its last saved value only. :paramtype unix_permissions: str :keyword avs_data_store: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. Known values are: "Enabled" and "Disabled". @@ -5945,6 +6386,16 @@ def __init__( # pylint: disable=too-many-locals :paramtype enable_subvolumes: str or ~azure.mgmt.netapp.models.EnableSubvolumes :keyword is_large_volume: Specifies whether volume is a Large Volume or Regular Volume. :paramtype is_large_volume: bool + :keyword language: Language supported for volume. Known values are: "c.utf-8", "utf8mb4", "ar", + "ar.utf-8", "hr", "hr.utf-8", "cs", "cs.utf-8", "da", "da.utf-8", "nl", "nl.utf-8", "en", + "en.utf-8", "fi", "fi.utf-8", "fr", "fr.utf-8", "de", "de.utf-8", "he", "he.utf-8", "hu", + "hu.utf-8", "it", "it.utf-8", "ja", "ja.utf-8", "ja-v1", "ja-v1.utf-8", "ja-jp.pck", + "ja-jp.pck.utf-8", "ja-jp.932", "ja-jp.932.utf-8", "ja-jp.pck-v2", "ja-jp.pck-v2.utf-8", "ko", + "ko.utf-8", "no", "no.utf-8", "pl", "pl.utf-8", "pt", "pt.utf-8", "c", "ro", "ro.utf-8", "ru", + "ru.utf-8", "zh", "zh.utf-8", "zh.gbk", "zh.gbk.utf-8", "zh-tw.big5", "zh-tw.big5.utf-8", + "zh-tw", "zh-tw.utf-8", "sk", "sk.utf-8", "sl", "sl.utf-8", "es", "es.utf-8", "sv", "sv.utf-8", + "tr", "tr.utf-8", "en-us", and "en-us.utf-8". + :paramtype language: str or ~azure.mgmt.netapp.models.VolumeLanguage """ super().__init__(**kwargs) self.id = None @@ -5971,6 +6422,7 @@ def __init__( # pylint: disable=too-many-locals self.mount_targets = None self.volume_type = volume_type self.data_protection = data_protection + self.accept_grow_capacity_pool_for_short_term_clone_split = accept_grow_capacity_pool_for_short_term_clone_split self.is_restoring = is_restoring self.snapshot_directory_visible = snapshot_directory_visible self.kerberos_enabled = kerberos_enabled @@ -6007,6 +6459,8 @@ def __init__( # pylint: disable=too-many-locals self.provisioned_availability_zone = None self.is_large_volume = is_large_volume self.originating_resource_id = None + self.inherited_size_in_bytes = None + self.language = language class VolumeList(_serialization.Model): @@ -6053,12 +6507,12 @@ class VolumePatch(_serialization.Model): # pylint: disable=too-many-instance-at :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :vartype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :ivar usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :vartype usage_threshold: int :ivar export_policy: Set of export policy rules. :vartype export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy @@ -6176,12 +6630,12 @@ def __init__( :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword service_level: The service level of the file system. Known values are: "Standard", - "Premium", "Ultra", and "StandardZRS". + "Premium", "Ultra", "StandardZRS", and "Flexible". :paramtype service_level: str or ~azure.mgmt.netapp.models.ServiceLevel :keyword usage_threshold: Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to - 100TiB. For large volumes, valid values are in the range 100TiB to 500TiB, and on an - exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. + 100TiB. For large volumes, valid values are in the range 100TiB to 1PiB, and on an exceptional + basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB. :paramtype usage_threshold: int :keyword export_policy: Set of export policy rules. :paramtype export_policy: ~azure.mgmt.netapp.models.VolumePatchPropertiesExportPolicy 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 f359a05553ef..20d0b9c2b171 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 @@ -10,6 +10,20 @@ from azure.core import CaseInsensitiveEnumMeta +class AcceptGrowCapacityPoolForShortTermCloneSplit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """While auto splitting the short term clone volume, if the parent pool does not have enough space + to accommodate the volume after split, it will be automatically resized, which will lead to + increased billing. To accept capacity pool size auto grow and create a short term clone volume, + set the property as accepted. + """ + + ACCEPTED = "Accepted" + """Auto grow capacity pool for short term clone split is accepted.""" + DECLINED = "Declined" + """Auto grow capacity pool for short term clone split is declined. Short term clone volume + creation will not be allowed, to create short term clone volume accept auto grow capacity pool.""" + + class ActiveDirectoryStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Status of the Active Directory.""" @@ -299,6 +313,15 @@ class ReplicationSchedule(str, Enum, metaclass=CaseInsensitiveEnumMeta): DAILY = "daily" +class ReplicationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether the replication is cross zone or cross region.""" + + CROSS_REGION_REPLICATION = "CrossRegionReplication" + """Cross region replication""" + CROSS_ZONE_REPLICATION = "CrossZoneReplication" + """Cross zone replication""" + + class SecurityStyle(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. @@ -319,6 +342,8 @@ class ServiceLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Ultra service level""" STANDARD_ZRS = "StandardZRS" """Zone redundant storage service level""" + FLEXIBLE = "Flexible" + """Flexible service level""" class SmbAccessBasedEnumeration(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -342,7 +367,7 @@ class SmbNonBrowsable(str, Enum, metaclass=CaseInsensitiveEnumMeta): class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Type of quota.""" + """Type of quota rule.""" DEFAULT_USER_QUOTA = "DefaultUserQuota" """Default user quota""" @@ -354,6 +379,149 @@ class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Individual group quota""" +class VolumeLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Language supported for volume.""" + + C_UTF8 = "c.utf-8" + """Posix with UTF-8""" + UTF8_MB4 = "utf8mb4" + """UTF-8 with 4 byte character support""" + AR = "ar" + """Arabic - Deprecated""" + AR_UTF8 = "ar.utf-8" + """Arabic with UTF-8""" + HR = "hr" + """Croatian - Deprecated""" + HR_UTF8 = "hr.utf-8" + """Croatian with UTF-8""" + CS = "cs" + """Czech - Deprecated""" + CS_UTF8 = "cs.utf-8" + """Czech with UTF-8""" + DA = "da" + """Danish - Deprecated""" + DA_UTF8 = "da.utf-8" + """Danish with UTF-8""" + NL = "nl" + """Dutch - Deprecated""" + NL_UTF8 = "nl.utf-8" + """Dutch with UTF-8""" + EN = "en" + """English - Deprecated""" + EN_UTF8 = "en.utf-8" + """English with UTF-8""" + FI = "fi" + """Finnish - Deprecated""" + FI_UTF8 = "fi.utf-8" + """Finnish with UTF-8""" + FR = "fr" + """French - Deprecated""" + FR_UTF8 = "fr.utf-8" + """French with UTF-8""" + DE = "de" + """German - Deprecated""" + DE_UTF8 = "de.utf-8" + """German with UTF-8""" + HE = "he" + """Hebrew - Deprecated""" + HE_UTF8 = "he.utf-8" + """Hebrew with UTF-8""" + HU = "hu" + """Hungarian - Deprecated""" + HU_UTF8 = "hu.utf-8" + """Hungarian with UTF-8""" + IT = "it" + """Italian - Deprecated""" + IT_UTF8 = "it.utf-8" + """Italian with UTF-8""" + JA = "ja" + """Japanese euc-j - Deprecated""" + JA_UTF8 = "ja.utf-8" + """Japanese euc-j with UTF-8""" + JA_V1 = "ja-v1" + """Japanese euc-j - Deprecated""" + JA_V1_UTF8 = "ja-v1.utf-8" + """Japanese euc-j with UTF-8""" + JA_JP_PCK = "ja-jp.pck" + """Japanese pck""" + JA_JP_PCK_UTF8 = "ja-jp.pck.utf-8" + """Japanese pck with UTF-8 - Deprecated""" + JA_JP932 = "ja-jp.932" + """Japanese cp932""" + JA_JP932_UTF8 = "ja-jp.932.utf-8" + """Japanese cp932 with UTF-8 - Deprecated""" + JA_JP_PCK_V2 = "ja-jp.pck-v2" + """Japanese pck - sjis""" + JA_JP_PCK_V2_UTF8 = "ja-jp.pck-v2.utf-8" + """Japanese pck - sjis with UTF-8 - Deprecated""" + KO = "ko" + """Korean - Deprecated""" + KO_UTF8 = "ko.utf-8" + """Korean with UTF-8""" + NO = "no" + """Norwegian - Deprecated""" + NO_UTF8 = "no.utf-8" + """Norwegian with UTF-8""" + PL = "pl" + """Polish - Deprecated""" + PL_UTF8 = "pl.utf-8" + """Polish with UTF-8""" + PT = "pt" + """Portuguese - Deprecated""" + PT_UTF8 = "pt.utf-8" + """Portuguese with UTF-8""" + C = "c" + """Posix - Deprecated""" + RO = "ro" + """Romanian - Deprecated""" + RO_UTF8 = "ro.utf-8" + """Romanian with UTF-8""" + RU = "ru" + """Russian - Deprecated""" + RU_UTF8 = "ru.utf-8" + """Russian with UTF-8""" + ZH = "zh" + """Simplified Chinese - Deprecated""" + ZH_UTF8 = "zh.utf-8" + """Simplified Chinese with UTF-8""" + ZH_GBK = "zh.gbk" + """Simplified gbk Chinese""" + ZH_GBK_UTF8 = "zh.gbk.utf-8" + """Simplified gbk Chinese with UTF-8 - Deprecated""" + ZH_TW_BIG5 = "zh-tw.big5" + """Traditional Chinese BIG 5""" + ZH_TW_BIG5_UTF8 = "zh-tw.big5.utf-8" + """Traditional Chinese BIG 5 with UTF-8 - Deprecated""" + ZH_TW = "zh-tw" + """Traditional Chinese EUC-TW""" + ZH_TW_UTF8 = "zh-tw.utf-8" + """Traditional Chinese EUC-TW with UTF-8 - Deprecated""" + SK = "sk" + """Slovak - Deprecated""" + SK_UTF8 = "sk.utf-8" + """Slovak with UTF-8""" + SL = "sl" + """Slovenian - Deprecated""" + SL_UTF8 = "sl.utf-8" + """Slovenian with UTF-8""" + ES = "es" + """Spanish - Deprecated""" + ES_UTF8 = "es.utf-8" + """Spanish with UTF-8""" + SV = "sv" + """Swedish - Deprecated""" + SV_UTF8 = "sv.utf-8" + """Swedish with UTF-8""" + TR = "tr" + """Turkish - Deprecated""" + TR_UTF8 = "tr.utf-8" + """Turkish with UTF-8""" + EN_US = "en-us" + """US English - Deprecated""" + EN_US_UTF8 = "en-us.utf-8" + """US English with UTF-8""" + + class VolumeStorageToNetworkProximity(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provides storage to network proximity information for the volume.""" 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 78fbde70bf9b..730a7b117912 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 @@ -48,7 +48,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +72,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +102,7 @@ def build_get_request(resource_group_name: str, account_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +137,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -175,7 +175,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -210,7 +210,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -248,7 +248,7 @@ def build_renew_credentials_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -277,6 +277,117 @@ def build_renew_credentials_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_transition_to_cmk_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/transitiontocmk", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_change_key_vault_information_request( # pylint: disable=name-too-long + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/getKeyVaultStatus", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_change_key_vault_request( + resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + class AccountsOperations: """ .. warning:: @@ -1119,3 +1230,527 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- deserialization_callback=get_long_running_output, ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _transition_to_cmk_initial( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "EncryptionTransitionRequest") + else: + _json = None + + _request = build_transition_to_cmk_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[_models.EncryptionTransitionRequest] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_transition_to_cmk( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.EncryptionTransitionRequest, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Transition volumes encryption from PMK to CMK. + + Transitions all volumes in a VNet to a different encryption key source (Microsoft-managed key + or Azure Key Vault). Operation fails if targeted volumes share encryption sibling set with + volumes from another account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption transition. Is either a + EncryptionTransitionRequest type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.EncryptionTransitionRequest or IO[bytes] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._transition_to_cmk_initial( + resource_group_name=resource_group_name, + account_name=account_name, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _get_change_key_vault_information_initial( # pylint: disable=name-too-long + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_get_change_key_vault_information_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_get_change_key_vault_information( + self, resource_group_name: str, account_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Get information about how volumes under NetApp account are encrypted. + + Contains data from encryption.keyVaultProperties as well as information about which private + endpoint is used by each encryption sibling set. Response from this endpoint can be modified + and used as request body for POST request. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._get_change_key_vault_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _change_key_vault_initial( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + if body is not None: + _json = self._serialize.body(body, "ChangeKeyVault") + else: + _json = None + + _request = build_change_key_vault_request( + resource_group_name=resource_group_name, + account_name=account_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[_models.ChangeKeyVault] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[IO[bytes]] = None, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Default value is None. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_change_key_vault( + self, + resource_group_name: str, + account_name: str, + body: Optional[Union[_models.ChangeKeyVault, IO[bytes]]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Change Key Vault/Managed HSM that is used for encryption of volumes under NetApp account. + + Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. + Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param body: The required parameters to perform encryption migration. Is either a + ChangeKeyVault type or a IO[bytes] type. Default value is None. + :type body: ~azure.mgmt.netapp.models.ChangeKeyVault or IO[bytes] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._change_key_vault_initial( + resource_group_name=resource_group_name, + account_name=account_name, + body=body, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore 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 0b6995293748..7f40afa51a20 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 @@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -83,7 +83,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,7 +119,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +158,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -197,7 +197,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py index 79fafdda0ce1..07869fffaf49 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_vaults_operations.py @@ -50,7 +50,7 @@ def build_list_by_net_app_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,7 +85,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -123,7 +123,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -164,7 +164,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,7 +205,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 88911f808390..ce7b1ac760d2 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 @@ -50,7 +50,7 @@ def build_get_latest_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,7 +91,7 @@ def build_get_volume_latest_restore_status_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +138,7 @@ def build_list_by_vault_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -183,7 +183,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -229,7 +229,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -278,7 +278,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -327,7 +327,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py index 7199364bf559..1a254ae9955a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_account_operations.py @@ -48,7 +48,7 @@ def build_migrate_backups_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py index b31cb5675c64..242708639525 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_backup_vault_operations.py @@ -53,7 +53,7 @@ def build_restore_files_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py index 25787e5947ed..a93b70b02f43 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_under_volume_operations.py @@ -48,7 +48,7 @@ def build_migrate_backups_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") 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 4d51e3f5f2f2..82a0d87dce0f 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 @@ -45,7 +45,7 @@ def build_check_name_availability_request(location: str, subscription_id: str, * _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -78,7 +78,7 @@ def build_check_file_path_availability_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -109,7 +109,7 @@ def build_check_quota_availability_request(location: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -140,7 +140,7 @@ def build_query_region_info_request(location: str, subscription_id: str, **kwarg _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -167,7 +167,7 @@ def build_query_network_sibling_set_request(location: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -198,7 +198,7 @@ def build_update_network_sibling_set_request(location: str, subscription_id: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py index 760436fea10d..9e8ceaba390d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py @@ -43,7 +43,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,7 +70,7 @@ def build_get_request(location: str, quota_limit_name: str, subscription_id: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py index 9d6637b5c283..8001a7ce56b7 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_region_infos_operations.py @@ -43,7 +43,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,7 +70,7 @@ def build_get_request(location: str, subscription_id: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 a770dbf8a001..1978e8ca0066 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 @@ -43,7 +43,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 e9c21919d704..3bb6136e30f1 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 @@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -83,7 +83,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,7 +121,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -162,7 +162,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -203,7 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 c7cbc2357549..c229b6c6258d 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 @@ -48,7 +48,7 @@ def build_list_request(resource_group_name: str, account_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -83,7 +83,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,7 +119,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +158,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -197,7 +197,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -233,7 +233,7 @@ def build_list_volumes_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 97efd6614ce4..1f127ea00591 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 @@ -51,7 +51,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +146,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -199,7 +199,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -250,7 +250,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -298,7 +298,7 @@ def build_restore_files_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py index 4a931ada5744..8e2ab150ef4d 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py @@ -50,7 +50,7 @@ def build_list_by_volume_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +97,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -152,7 +152,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -210,7 +210,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -268,7 +268,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -323,7 +323,7 @@ def build_get_metadata_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py index a1942ef2b467..f990d07f8095 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py @@ -50,7 +50,7 @@ def build_list_by_net_app_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,7 +85,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -128,7 +128,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -174,7 +174,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py index f591c45da5f6..28703a6f4b35 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py @@ -50,7 +50,7 @@ def build_list_by_volume_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +97,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -145,7 +145,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -196,7 +196,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -247,7 +247,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 205b7f94d5ca..7dbd44f4dab1 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 @@ -50,7 +50,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +88,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,7 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,7 +224,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -267,7 +267,7 @@ def build_populate_availability_zone_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -308,7 +308,7 @@ def build_revert_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -352,7 +352,7 @@ def build_reset_cifs_password_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -387,13 +387,54 @@ def build_reset_cifs_password_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_split_clone_from_parent_request( + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/splitCloneFromParent", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$" + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$" + ), + "volumeName": _SERIALIZER.url( + "volume_name", volume_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_break_file_locks_request( resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -437,7 +478,7 @@ def build_list_get_group_id_list_for_ldap_user_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -475,13 +516,54 @@ def build_list_get_group_id_list_for_ldap_user_request( # pylint: disable=name- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_list_quota_report_request( + resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "accountName": _SERIALIZER.url( + "account_name", account_name, "str", pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$" + ), + "poolName": _SERIALIZER.url( + "pool_name", pool_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$" + ), + "volumeName": _SERIALIZER.url( + "volume_name", volume_name, "str", max_length=64, min_length=1, pattern=r"^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$" + ), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_break_replication_request( resource_group_name: str, account_name: str, pool_name: str, volume_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -525,7 +607,7 @@ def build_reestablish_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -569,7 +651,7 @@ def build_replication_status_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -610,7 +692,7 @@ def build_list_replications_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -651,7 +733,7 @@ def build_resync_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -692,7 +774,7 @@ def build_delete_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -733,7 +815,7 @@ def build_authorize_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -777,7 +859,7 @@ def build_re_initialize_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -818,7 +900,7 @@ def build_peer_external_cluster_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -862,7 +944,7 @@ def build_authorize_external_replication_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -903,7 +985,7 @@ def build_finalize_external_replication_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -944,7 +1026,7 @@ def build_perform_replication_transfer_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -985,7 +1067,7 @@ def build_pool_change_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1029,7 +1111,7 @@ def build_relocate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1073,7 +1155,7 @@ def build_finalize_relocation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1114,7 +1196,7 @@ def build_revert_relocation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2365,6 +2447,127 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _split_clone_from_parent_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_split_clone_from_parent_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_split_clone_from_parent( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Split clone from parent volume. + + Split operation to convert clone volume to an independent volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._split_clone_from_parent_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _break_file_locks_initial( self, resource_group_name: str, @@ -2824,6 +3027,133 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) + def _list_quota_report_initial( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping[int, Type[HttpResponseError]] = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_list_quota_report_request( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def begin_list_quota_report( + self, resource_group_name: str, account_name: str, pool_name: str, volume_name: str, **kwargs: Any + ) -> LROPoller[_models.ListQuotaReportResponse]: + """Lists Quota Report for the volume. + + Returns report of quotas for the volume. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param account_name: The name of the NetApp account. Required. + :type account_name: str + :param pool_name: The name of the capacity pool. Required. + :type pool_name: str + :param volume_name: The name of the volume. Required. + :type volume_name: str + :return: An instance of LROPoller that returns either ListQuotaReportResponse or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.netapp.models.ListQuotaReportResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.ListQuotaReportResponse] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._list_quota_report_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pool_name=pool_name, + volume_name=volume_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("ListQuotaReportResponse", pipeline_response.http_response) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ListQuotaReportResponse].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ListQuotaReportResponse]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + def _break_replication_initial( self, resource_group_name: str, diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py new file mode 100644 index 000000000000..3fc9fb48ae3f --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_change_key_vault.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python accounts_change_key_vault.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + client.accounts.begin_change_key_vault( + resource_group_name="myRG", + account_name="account1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_ChangeKeyVault.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py index 03171cf3ddf3..c659e2a55d3b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py index b4f0b2e87483..2d164806037a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_create_or_update_ad.py @@ -56,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_CreateOrUpdateAD.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_CreateOrUpdateAD.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py index e45741ca4196..d9a7cc04cfa7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py index 1d5632b3701e..69e63cd9e0ba 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py new file mode 100644 index 000000000000..912886271b59 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_get_change_key_vault_information.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python accounts_get_change_key_vault_information.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + client.accounts.begin_get_change_key_vault_information( + resource_group_name="myRG", + account_name="account1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py index 87a11e18811f..f25c5ada780c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py index d85fa2fd159f..8f64039cd9c6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_renew_credentials.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_RenewCredentials.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_RenewCredentials.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py new file mode 100644 index 000000000000..1f522bc7b232 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_transition_encryption_key.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python accounts_transition_encryption_key.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + client.accounts.begin_transition_to_cmk( + resource_group_name="myRG", + account_name="account1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_TransitionEncryptionKey.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py index a88e6d231f98..d5a7dafa6497 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/accounts_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Accounts_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Accounts_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py index 847a53e32649..adf04b2e8f41 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py index 1a82f80a7de8..9c1bed7ef879 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py index 875a5a908875..b90d09aa866e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py index 44cc8af1ffe9..413cbd9cab32 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py index 206e060d2fb4..e5058f5b1abe 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_policies_update.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupPolicies_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py index 3e55cc24aa50..52c9a31e6480 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py index c859aa3337f3..d80a95284cf7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py index fa7a951bf64f..bedf76ea3419 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py index e58ab6c71b6d..9a02920e6bb1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py index 6824e60a1785..3ba711ebe61d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backup_vaults_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupVaults_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupVaults_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py index 95caf29c2527..d71d440a6598 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_account_migrate.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderAccount_Migrate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderAccount_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py index bf3221597bce..cb24ffcf014a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_create.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py index d746887d2097..e5314d34335d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py index 280ef8e831e5..a556af8e39b9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py index 455c901d97b5..f3ec902ceedd 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py index 6d01a1ca11d4..5692d4c45e41 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_single_file_restore.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_SingleFileRestore.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py index 30a2f53e3079..26c155acdf9a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_backup_vault_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderBackupVault_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderBackupVault_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py index a4b95351c335..36d95321bc78 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/backups_under_volume_migrate.py @@ -41,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/BackupsUnderVolume_Migrate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/BackupsUnderVolume_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py index 5849a58a6540..5abd63583913 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/group_id_list_for_ldap_user.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/GroupIdListForLDAPUser.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/GroupIdListForLDAPUser.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py index 2c5d42f7bf8e..0c2ab12e6c5c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/OperationList.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/OperationList.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py index 107d4920e061..bca1e7f76bc8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py new file mode 100644 index 000000000000..f7c89945cefd --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_create_or_update_custom_throughput.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python pools_create_or_update_custom_throughput.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + response = client.pools.begin_create_or_update( + resource_group_name="myRG", + account_name="account1", + pool_name="customPool1", + body={ + "location": "eastus", + "properties": { + "customThroughputMibps": 128, + "qosType": "Manual", + "serviceLevel": "Flexible", + "size": 4398046511104, + }, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_CreateOrUpdate_CustomThroughput.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py index e500170ddba2..9fb9e965f18b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py index 3acbdabe2757..bfab2b1c433e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py new file mode 100644 index 000000000000..42d6c036bf61 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_get_custom_throughput.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python pools_get_custom_throughput.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + response = client.pools.get( + resource_group_name="myRG", + account_name="account1", + pool_name="customPool1", + ) + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_Get_CustomThroughput.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py index b1a0d16c935d..a08c8b1a5c9d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/pools_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Pools_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Pools_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py index 8054505c8111..5712a4e89794 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/QuotaLimits_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py index 3ebd70692961..2eb5664520b0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/quota_limits_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/QuotaLimits_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/QuotaLimits_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py index 2003606ec91f..216bcdd783d9 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_info.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfo.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfo.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py index b6a9c7b176e4..b7686e08313f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfos_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py index ae7ddf2295d7..db48d430785d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/region_infos_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/RegionInfos_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/RegionInfos_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py index 6bb01ded387c..b6eb9d7561a1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_create.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py index 78d15957b242..1980b1d12b6c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py index 16ae50864691..748e16e767e2 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py index 90c8cef5ece8..55e4b84bee34 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py index 467e3af24e9e..e6cbe84390dc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_list_volumes.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_ListVolumes.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_ListVolumes.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py index 074f92a1a46a..4b7fcd853dfa 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshot_policies_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/SnapshotPolicies_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/SnapshotPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py index b625f3330b90..f6c056f38b9b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_create.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py index b00d7aed563e..8a58a5d749ea 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py index ab13d2c0b1f6..ec62cbdb0357 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py index b5adec601f5e..45c1fbc4cb9c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py index 7bb5d7584487..554c53bbfd92 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/snapshots_single_file_restore.py @@ -40,6 +40,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Snapshots_SingleFileRestore.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Snapshots_SingleFileRestore.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py index 0408a537416c..e56cd86e8eff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_create.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py index 0ff048e341a7..53c4efe413f8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py index 696cc280aa33..84dd1eb9fbd7 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py index 9bd9447e4f3d..acc20846450c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py index 3268c08ba491..24a4a6b35971 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_metadata.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Metadata.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Metadata.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py index dd0b486576d1..3054f4dc5011 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/subvolumes_update.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Subvolumes_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Subvolumes_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py index 9fa5c0823b88..01de45f1c7e4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_oracle.py @@ -458,6 +458,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Create_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py index 57c213b89b5e..69aa49299825 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_create_sap_hana.py @@ -220,6 +220,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Create_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Create_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py index 0bf142da7544..057e72090042 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py index 87f54fcf5670..4bea4dd19cc3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_oracle.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Get_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py index 8ae3fb95a2f2..fd10a67bda89 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_get_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_Get_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_Get_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py index bc566237acc3..290946f60e47 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_oracle.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_Oracle.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_List_Oracle.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py index bb9e8392b81e..a9245f3ac637 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_groups_list_sap_hana.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeGroups_List_SapHana.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeGroups_List_SapHana.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py index 330f01735fb1..fc9c9120a2ac 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_create.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Create.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Create.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py index cc418d2b0e76..5b19b8554eb1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_delete.py @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py index 681fe1b27d27..245e38d5f100 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py index 0360d2621e28..c7cefeec37dd 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_list.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py index 03a33225de53..8728bcf7d8e0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volume_quota_rules_update.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/VolumeQuotaRules_Update.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/VolumeQuotaRules_Update.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py index 6f0996e3157c..7f332e1bb92b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_external_replication.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_AuthorizeExternalReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_AuthorizeExternalReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py index ca7a8cc2455a..ca5a3c1fb084 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_authorize_replication.py @@ -41,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_AuthorizeReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_AuthorizeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py index dd2ee320217f..982c8370f829 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_file_locks.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_BreakFileLocks.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_BreakFileLocks.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py index 8c09c586cf0d..dc26a08c8eee 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_break_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_BreakReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_BreakReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py index c1041ff35ae9..aa0aaf72577f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_create_or_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_CreateOrUpdate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py index 62f946995cc4..e37aceb2ce32 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Delete.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_Delete.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py index ef7d90558fb4..187dab216807 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_delete_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_DeleteReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_DeleteReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py index 72e43521e224..0f56aa2e6f7a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_external_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_FinalizeExternalReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_FinalizeExternalReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py index 0f6ad3c9c263..8153c914703a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_finalize_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_FinalizeRelocation.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_FinalizeRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py index 73c42fb5b239..9b636a1ed13e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Get.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_Get.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py index a4fd8b385cc1..fc1c47d948a3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_backup_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_LatestBackupStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_LatestBackupStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py index 26ba6547f39f..d9c9656cc935 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_latest_restore_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_LatestRestoreStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_LatestRestoreStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py index d0da0a05658e..473d22761c4a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_List.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_List.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py new file mode 100644 index 000000000000..637603c38180 --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_quota_report.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python volumes_list_quota_report.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + response = client.volumes.begin_list_quota_report( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + print(response) + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ListQuotaReport.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py index 89ec97be2196..8b44a51fee75 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_list_replications.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ListReplications.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ListReplications.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py index bf78e5f1dfa9..8927aa80fbe6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_peer_external_cluster.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PeerExternalCluster.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_PeerExternalCluster.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py index 207e2c300c44..8cefca40ba5f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_perform_replication_transfer.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PerformReplicationTransfer.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_PerformReplicationTransfer.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py index abaa2f79ca19..6444fe4acfed 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_pool_change.py @@ -41,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PoolChange.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_PoolChange.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py index d86247fc85f8..7fe36540bfd1 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_populate_availability_zones.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_PopulateAvailabilityZones.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_PopulateAvailabilityZones.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py index 4e0472136602..1e4bc2c5cbce 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_re_initialize_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReInitializeReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ReInitializeReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py index c94e96869fa9..490eb36e344a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reestablish_replication.py @@ -41,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReestablishReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ReestablishReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py index 98ce6a22de9e..f33cddc7d9eb 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_relocate.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Relocate.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_Relocate.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py index 572ab9059241..4049578c5650 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_replication_status.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ReplicationStatus.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ReplicationStatus.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py index cef2b25dbe01..c28cc6978583 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_reset_cifs_password.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ResetCifsPassword.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ResetCifsPassword.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py index 703c0d37184f..dada759259f0 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_resync_replication.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_ResyncReplication.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_ResyncReplication.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py index 2c8067cc26d5..e4b1b4b6a52e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert.py @@ -41,6 +41,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_Revert.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_Revert.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py index aabab886c057..9cd42d84ba30 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_revert_relocation.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-07-01/examples/Volumes_RevertRelocation.json +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_RevertRelocation.json if __name__ == "__main__": main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py new file mode 100644 index 000000000000..6b0c4f50d3ed --- /dev/null +++ b/sdk/netapp/azure-mgmt-netapp/generated_samples/volumes_split_clone.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.netapp import NetAppManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-netapp +# USAGE + python volumes_split_clone.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = NetAppManagementClient( + credential=DefaultAzureCredential(), + subscription_id="D633CC2E-722B-4AE1-B636-BBD9E4C60ED9", + ) + + client.volumes.begin_split_clone_from_parent( + resource_group_name="myRG", + account_name="account1", + pool_name="pool1", + volume_name="volume1", + ).result() + + +# x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2024-07-01-preview/examples/Volumes_SplitClone.json +if __name__ == "__main__": + main() diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py index e6bb8b34c18b..cc5e880c4fd4 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_list_by_subscription(self, resource_group): response = self.client.accounts.list_by_subscription( - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_list_by_subscription(self, resource_group): def test_list(self, resource_group): response = self.client.accounts.list( resource_group_name=resource_group.name, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_get(self, resource_group): response = self.client.accounts.get( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -88,7 +88,7 @@ def test_begin_create_or_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -106,7 +106,9 @@ def test_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -119,7 +121,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -131,7 +133,7 @@ def test_begin_delete(self, resource_group): response = self.client.accounts.begin_delete( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -173,7 +175,7 @@ def test_begin_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -190,13 +192,15 @@ def test_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "location": "str", "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -208,7 +212,43 @@ def test_begin_renew_credentials(self, resource_group): response = self.client.accounts.begin_renew_credentials( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_transition_to_cmk(self, resource_group): + response = self.client.accounts.begin_transition_to_cmk( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_get_change_key_vault_information(self, resource_group): + response = self.client.accounts.begin_get_change_key_vault_information( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_change_key_vault(self, resource_group): + response = self.client.accounts.begin_change_key_vault( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py index 5ef0227507c0..4ca06c976c56 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_accounts_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_list_by_subscription(self, resource_group): response = self.client.accounts.list_by_subscription( - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_list_by_subscription(self, resource_group): async def test_list(self, resource_group): response = self.client.accounts.list( resource_group_name=resource_group.name, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_get(self, resource_group): response = await self.client.accounts.get( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -90,7 +90,7 @@ async def test_begin_create_or_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -108,7 +108,9 @@ async def test_begin_create_or_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -121,7 +123,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -135,7 +137,7 @@ async def test_begin_delete(self, resource_group): await self.client.accounts.begin_delete( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -179,7 +181,7 @@ async def test_begin_update(self, resource_group): ], "disableShowmount": bool, "encryption": { - "identity": {"principalId": "str", "userAssignedIdentity": "str"}, + "identity": {"federatedClientId": "str", "principalId": "str", "userAssignedIdentity": "str"}, "keySource": "Microsoft.NetApp", "keyVaultProperties": { "keyName": "str", @@ -196,13 +198,15 @@ async def test_begin_update(self, resource_group): "tenantId": "str", "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, }, + "isMultiAdEnabled": bool, "location": "str", "name": "str", + "nfsV4IDDomain": "str", "provisioningState": "str", "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -216,7 +220,49 @@ async def test_begin_renew_credentials(self, resource_group): await self.client.accounts.begin_renew_credentials( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_transition_to_cmk(self, resource_group): + response = await ( + await self.client.accounts.begin_transition_to_cmk( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_get_change_key_vault_information(self, resource_group): + response = await ( + await self.client.accounts.begin_get_change_key_vault_information( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_change_key_vault(self, resource_group): + response = await ( + await self.client.accounts.begin_change_key_vault( + resource_group_name=resource_group.name, + account_name="str", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py index a3f9ff2695d8..b6ac9510570e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.backup_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -76,7 +76,7 @@ def test_begin_create(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -106,7 +106,7 @@ def test_begin_update(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +119,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py index cd05a60e980f..884d13113b74 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_policies_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.backup_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_begin_create(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_update(self, resource_group): "volumesAssigned": 0, "weeklyBackupsToKeep": 0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -125,7 +125,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py index 5e5fe8f567cb..2c21b2fd61cc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations.py @@ -24,7 +24,7 @@ def test_list_by_net_app_account(self, resource_group): response = self.client.backup_vaults.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -66,7 +66,7 @@ def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", body={"tags": {"str": "str"}}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py index fbcfef80b13a..d0e83813bbbc 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backup_vaults_operations_async.py @@ -25,7 +25,7 @@ async def test_list_by_net_app_account(self, resource_group): response = self.client.backup_vaults.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -84,7 +84,7 @@ async def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", body={"tags": {"str": "str"}}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -99,7 +99,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py index 1f8d3ed6597b..0de18654269d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations.py @@ -26,7 +26,7 @@ def test_get_latest_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ def test_get_volume_latest_restore_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_list_by_vault(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -67,7 +67,7 @@ def test_get(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -89,6 +89,7 @@ def test_begin_create(self, resource_group): "creationDate": "2020-02-20 00:00:00", "failureReason": "str", "id": "str", + "isLargeVolume": bool, "label": "str", "name": "str", "provisioningState": "str", @@ -105,7 +106,7 @@ def test_begin_create(self, resource_group): "type": "str", "useExistingSnapshot": False, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +120,7 @@ def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -133,7 +134,7 @@ def test_begin_delete(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py index 62a93d0d99cf..b509cba39b84 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_operations_async.py @@ -27,7 +27,7 @@ async def test_get_latest_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -41,7 +41,7 @@ async def test_get_volume_latest_restore_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_list_by_vault(self, resource_group): resource_group_name=resource_group.name, account_name="str", backup_vault_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_get(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -91,6 +91,7 @@ async def test_begin_create(self, resource_group): "creationDate": "2020-02-20 00:00:00", "failureReason": "str", "id": "str", + "isLargeVolume": bool, "label": "str", "name": "str", "provisioningState": "str", @@ -107,7 +108,7 @@ async def test_begin_create(self, resource_group): "type": "str", "useExistingSnapshot": False, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -123,7 +124,7 @@ async def test_begin_update(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -139,7 +140,7 @@ async def test_begin_delete(self, resource_group): account_name="str", backup_vault_name="str", backup_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py index d1bfa6659041..45db33cbb2bf 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations.py @@ -25,7 +25,7 @@ def test_begin_migrate_backups(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={"backupVaultId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py index 19f25399f864..e7475c11cd72 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_account_operations_async.py @@ -27,7 +27,7 @@ async def test_begin_migrate_backups(self, resource_group): resource_group_name=resource_group.name, account_name="str", body={"backupVaultId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py index 24a54d1308ec..377a1ee5ba9c 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations.py @@ -27,7 +27,7 @@ def test_begin_restore_files(self, resource_group): backup_vault_name="str", backup_name="str", body={"destinationVolumeId": "str", "fileList": ["str"], "restoreFilePath": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py index f0562cb5dc18..7ff883432695 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_backup_vault_operations_async.py @@ -29,7 +29,7 @@ async def test_begin_restore_files(self, resource_group): backup_vault_name="str", backup_name="str", body={"destinationVolumeId": "str", "fileList": ["str"], "restoreFilePath": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py index 50f590200c76..ef1af1eafb7f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations.py @@ -27,7 +27,7 @@ def test_begin_migrate_backups(self, resource_group): pool_name="str", volume_name="str", body={"backupVaultId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py index b3aa51b4495b..ed5d8d16ec13 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_backups_under_volume_operations_async.py @@ -29,7 +29,7 @@ async def test_begin_migrate_backups(self, resource_group): pool_name="str", volume_name="str", body={"backupVaultId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py index b7fc794179a5..0d90b71e4df6 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations.py @@ -26,7 +26,7 @@ def test_check_name_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_check_file_path_availability(self, resource_group): location="str", name="str", subnet_id="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_check_quota_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -64,7 +64,7 @@ def test_check_quota_availability(self, resource_group): def test_query_region_info(self, resource_group): response = self.client.net_app_resource.query_region_info( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ def test_query_network_sibling_set(self, resource_group): location="str", network_sibling_set_id="str", subnet_id="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ def test_begin_update_network_sibling_set(self, resource_group): subnet_id="str", network_sibling_set_state_id="str", network_features="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py index 4a5bb25abff5..3ef5db363615 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_operations_async.py @@ -27,7 +27,7 @@ async def test_check_name_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_check_file_path_availability(self, resource_group): location="str", name="str", subnet_id="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_check_quota_availability(self, resource_group): name="str", type="str", resource_group="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -65,7 +65,7 @@ async def test_check_quota_availability(self, resource_group): async def test_query_region_info(self, resource_group): response = await self.client.net_app_resource.query_region_info( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ async def test_query_network_sibling_set(self, resource_group): location="str", network_sibling_set_id="str", subnet_id="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_begin_update_network_sibling_set(self, resource_group): subnet_id="str", network_sibling_set_state_id="str", network_features="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py index 401d625be12d..5d84715f40d3 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_list(self, resource_group): response = self.client.net_app_resource_quota_limits.list( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -35,7 +35,7 @@ def test_get(self, resource_group): response = self.client.net_app_resource_quota_limits.get( location="str", quota_limit_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py index 18498df9d507..7fc06f64fa16 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_quota_limits_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_list(self, resource_group): response = self.client.net_app_resource_quota_limits.list( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -36,7 +36,7 @@ async def test_get(self, resource_group): response = await self.client.net_app_resource_quota_limits.get( location="str", quota_limit_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py index 96ee49254d3c..ebca8ce2f653 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_list(self, resource_group): response = self.client.net_app_resource_region_infos.list( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ def test_list(self, resource_group): def test_get(self, resource_group): response = self.client.net_app_resource_region_infos.get( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py index 2be26ab47041..00e2efa2f4ad 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_net_app_resource_region_infos_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_list(self, resource_group): response = self.client.net_app_resource_region_infos.list( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -35,7 +35,7 @@ async def test_list(self, resource_group): async def test_get(self, resource_group): response = await self.client.net_app_resource_region_infos.get( location="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py index bb119b4883f5..9080b659d8ff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_list(self, resource_group): response = self.client.operations.list( - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py index 26686d3e6bfd..e1a09441312d 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_list(self, resource_group): response = self.client.operations.list( - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py index 1121df5a84a7..931a67973a68 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.pools.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -55,6 +55,7 @@ def test_begin_create_or_update(self, resource_group): "serviceLevel": "Premium", "size": 4398046511104, "coolAccess": False, + "customThroughputMibps": 0.0, "encryptionType": "Single", "etag": "str", "id": "str", @@ -75,7 +76,7 @@ def test_begin_create_or_update(self, resource_group): "type": "str", "utilizedThroughputMibps": 0.0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -90,6 +91,7 @@ def test_begin_update(self, resource_group): pool_name="str", body={ "coolAccess": bool, + "customThroughputMibps": 0.0, "id": "str", "location": "str", "name": "str", @@ -98,7 +100,7 @@ def test_begin_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,7 +113,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py index 2bf72bfb77c3..54ae4de729ff 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_pools_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.pools.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -57,6 +57,7 @@ async def test_begin_create_or_update(self, resource_group): "serviceLevel": "Premium", "size": 4398046511104, "coolAccess": False, + "customThroughputMibps": 0.0, "encryptionType": "Single", "etag": "str", "id": "str", @@ -77,7 +78,7 @@ async def test_begin_create_or_update(self, resource_group): "type": "str", "utilizedThroughputMibps": 0.0, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -94,6 +95,7 @@ async def test_begin_update(self, resource_group): pool_name="str", body={ "coolAccess": bool, + "customThroughputMibps": 0.0, "id": "str", "location": "str", "name": "str", @@ -102,7 +104,7 @@ async def test_begin_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -117,7 +119,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py index 2a1191611dc7..582337d3e65f 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations.py @@ -24,7 +24,7 @@ def test_list(self, resource_group): response = self.client.snapshot_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -72,7 +72,7 @@ def test_create(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -98,7 +98,7 @@ def test_begin_update(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,7 +111,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -124,7 +124,7 @@ def test_list_volumes(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py index 3847e7809f42..5e5e27d30b5b 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshot_policies_operations_async.py @@ -25,7 +25,7 @@ async def test_list(self, resource_group): response = self.client.snapshot_policies.list( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_create(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_begin_update(self, resource_group): "type": "str", "weeklySchedule": {"day": "str", "hour": 0, "minute": 0, "snapshotsToKeep": 0, "usedBytes": 0}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -121,7 +121,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -135,7 +135,7 @@ async def test_list_volumes(self, resource_group): resource_group_name=resource_group.name, account_name="str", snapshot_policy_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py index e4fffa2bbca0..5a6ece9425ca 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations.py @@ -26,7 +26,7 @@ def test_list(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,7 +89,7 @@ def test_begin_update(self, resource_group): volume_name="str", snapshot_name="str", body={}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -120,7 +120,7 @@ def test_begin_restore_files(self, resource_group): volume_name="str", snapshot_name="str", body={"filePaths": ["str"], "destinationPath": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py index ed8c1e7b5d5d..ebe1350f61ed 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_snapshots_operations_async.py @@ -27,7 +27,7 @@ async def test_list(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,7 +93,7 @@ async def test_begin_update(self, resource_group): volume_name="str", snapshot_name="str", body={}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", snapshot_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -128,7 +128,7 @@ async def test_begin_restore_files(self, resource_group): volume_name="str", snapshot_name="str", body={"filePaths": ["str"], "destinationPath": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py index fbd22873ddd2..9ea002bbeb9e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations.py @@ -26,7 +26,7 @@ def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -89,7 +89,7 @@ def test_begin_update(self, resource_group): volume_name="str", subvolume_name="str", body={"path": "str", "size": 0}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -104,7 +104,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -119,7 +119,7 @@ def test_begin_get_metadata(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py index bcb00fe6f682..6ff827e7689a 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_subvolumes_operations_async.py @@ -27,7 +27,7 @@ async def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ async def test_begin_create(self, resource_group): }, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -93,7 +93,7 @@ async def test_begin_update(self, resource_group): volume_name="str", subvolume_name="str", body={"path": "str", "size": 0}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -110,7 +110,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -127,7 +127,7 @@ async def test_begin_get_metadata(self, resource_group): pool_name="str", volume_name="str", subvolume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py index f56c03177f28..150c8eef3a0e 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations.py @@ -24,7 +24,7 @@ def test_list_by_net_app_account(self, resource_group): response = self.client.volume_groups.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -68,6 +68,7 @@ def test_begin_create(self, resource_group): "creationToken": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -80,10 +81,13 @@ def test_begin_create(self, resource_group): "dataProtection": { "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { - "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", + "remoteVolumeResourceId": "str", "replicationId": "str", "replicationSchedule": "str", }, @@ -122,11 +126,13 @@ def test_begin_create(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -162,7 +168,7 @@ def test_begin_create(self, resource_group): } ], }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -175,7 +181,7 @@ def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py index c044142e91ce..15ffd4331576 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_groups_operations_async.py @@ -25,7 +25,7 @@ async def test_list_by_net_app_account(self, resource_group): response = self.client.volume_groups.list_by_net_app_account( resource_group_name=resource_group.name, account_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_get(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -70,6 +70,7 @@ async def test_begin_create(self, resource_group): "creationToken": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -82,10 +83,13 @@ async def test_begin_create(self, resource_group): "dataProtection": { "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { - "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", + "remoteVolumeResourceId": "str", "replicationId": "str", "replicationSchedule": "str", }, @@ -124,11 +128,13 @@ async def test_begin_create(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -169,7 +175,7 @@ async def test_begin_create(self, resource_group): } ], }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -184,7 +190,7 @@ async def test_begin_delete(self, resource_group): resource_group_name=resource_group.name, account_name="str", volume_group_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py index 45d54a7fd5c4..2a400afa0c83 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations.py @@ -26,7 +26,7 @@ def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,7 +41,7 @@ def test_get(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -75,7 +75,7 @@ def test_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -97,7 +97,7 @@ def test_begin_update(self, resource_group): "quotaType": "str", "tags": {"str": "str"}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -112,7 +112,7 @@ def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py index 742cd286ce1f..0895754f5446 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volume_quota_rules_operations_async.py @@ -27,7 +27,7 @@ async def test_list_by_volume(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,7 +42,7 @@ async def test_get(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -77,7 +77,7 @@ async def test_begin_create(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -101,7 +101,7 @@ async def test_begin_update(self, resource_group): "quotaType": "str", "tags": {"str": "str"}, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -118,7 +118,7 @@ async def test_begin_delete(self, resource_group): pool_name="str", volume_name="str", volume_quota_rule_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py index 5fd2b1bc9a71..09f8fef4b236 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations.py @@ -25,7 +25,7 @@ def test_list(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_get(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -58,6 +58,7 @@ def test_begin_create_or_update(self, resource_group): "location": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -70,10 +71,13 @@ def test_begin_create_or_update(self, resource_group): "dataProtection": { "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { - "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", + "remoteVolumeResourceId": "str", "replicationId": "str", "replicationSchedule": "str", }, @@ -113,11 +117,13 @@ def test_begin_create_or_update(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -159,7 +165,7 @@ def test_begin_create_or_update(self, resource_group): "volumeType": "str", "zones": ["str"], }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -219,7 +225,7 @@ def test_begin_update(self, resource_group): "unixPermissions": "str", "usageThreshold": 107374182400, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -233,7 +239,7 @@ def test_begin_delete(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -247,7 +253,7 @@ def test_begin_populate_availability_zone(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -262,7 +268,7 @@ def test_begin_revert(self, resource_group): pool_name="str", volume_name="str", body={"snapshotId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -276,7 +282,21 @@ def test_begin_reset_cifs_password(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_split_clone_from_parent(self, resource_group): + response = self.client.volumes.begin_split_clone_from_parent( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -290,7 +310,7 @@ def test_begin_break_file_locks(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -305,7 +325,21 @@ def test_begin_list_get_group_id_list_for_ldap_user(self, resource_group): pool_name="str", volume_name="str", body={"username": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_begin_list_quota_report(self, resource_group): + response = self.client.volumes.begin_list_quota_report( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -319,7 +353,7 @@ def test_begin_break_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -334,7 +368,7 @@ def test_begin_reestablish_replication(self, resource_group): pool_name="str", volume_name="str", body={"sourceVolumeId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -348,7 +382,7 @@ def test_replication_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -362,7 +396,7 @@ def test_list_replications(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -376,7 +410,7 @@ def test_begin_resync_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -390,7 +424,7 @@ def test_begin_delete_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -405,7 +439,7 @@ def test_begin_authorize_replication(self, resource_group): pool_name="str", volume_name="str", body={"remoteVolumeResourceId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -419,7 +453,7 @@ def test_begin_re_initialize_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -434,7 +468,7 @@ def test_begin_peer_external_cluster(self, resource_group): pool_name="str", volume_name="str", body={"peerIpAddresses": ["str"]}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -448,7 +482,7 @@ def test_begin_authorize_external_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -462,7 +496,7 @@ def test_begin_finalize_external_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -476,7 +510,7 @@ def test_begin_perform_replication_transfer(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -491,7 +525,7 @@ def test_begin_pool_change(self, resource_group): pool_name="str", volume_name="str", body={"newPoolResourceId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -505,7 +539,7 @@ def test_begin_relocate(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -519,7 +553,7 @@ def test_begin_finalize_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -533,7 +567,7 @@ def test_begin_revert_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py index e0a2c687094c..fc9b924de6d8 100644 --- a/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py +++ b/sdk/netapp/azure-mgmt-netapp/generated_tests/test_net_app_management_volumes_operations_async.py @@ -26,7 +26,7 @@ async def test_list(self, resource_group): resource_group_name=resource_group.name, account_name="str", pool_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_get(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -60,6 +60,7 @@ async def test_begin_create_or_update(self, resource_group): "location": "str", "subnetId": "str", "usageThreshold": 107374182400, + "acceptGrowCapacityPoolForShortTermCloneSplit": "str", "actualThroughputMibps": 0.0, "avsDataStore": "Disabled", "backupId": "str", @@ -72,10 +73,13 @@ async def test_begin_create_or_update(self, resource_group): "dataProtection": { "backup": {"backupPolicyId": "str", "backupVaultId": "str", "policyEnforced": bool}, "replication": { - "remoteVolumeResourceId": "str", + "destinationReplications": [ + {"region": "str", "replicationType": "str", "resourceId": "str", "zone": "str"} + ], "endpointType": "str", "remotePath": {"externalHostName": "str", "serverName": "str", "volumeName": "str"}, "remoteVolumeRegion": "str", + "remoteVolumeResourceId": "str", "replicationId": "str", "replicationSchedule": "str", }, @@ -115,11 +119,13 @@ async def test_begin_create_or_update(self, resource_group): "fileAccessLogs": "Disabled", "fileSystemId": "str", "id": "str", + "inheritedSizeInBytes": 0, "isDefaultQuotaEnabled": False, "isLargeVolume": False, "isRestoring": bool, "kerberosEnabled": False, "keyVaultPrivateEndpointResourceId": "str", + "language": "str", "ldapEnabled": False, "maximumNumberOfFiles": 0, "mountTargets": [ @@ -161,7 +167,7 @@ async def test_begin_create_or_update(self, resource_group): "volumeType": "str", "zones": ["str"], }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -223,7 +229,7 @@ async def test_begin_update(self, resource_group): "unixPermissions": "str", "usageThreshold": 107374182400, }, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -239,7 +245,7 @@ async def test_begin_delete(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -255,7 +261,7 @@ async def test_begin_populate_availability_zone(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -272,7 +278,7 @@ async def test_begin_revert(self, resource_group): pool_name="str", volume_name="str", body={"snapshotId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -288,7 +294,23 @@ async def test_begin_reset_cifs_password(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_split_clone_from_parent(self, resource_group): + response = await ( + await self.client.volumes.begin_split_clone_from_parent( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -304,7 +326,7 @@ async def test_begin_break_file_locks(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -321,7 +343,23 @@ async def test_begin_list_get_group_id_list_for_ldap_user(self, resource_group): pool_name="str", volume_name="str", body={"username": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_begin_list_quota_report(self, resource_group): + response = await ( + await self.client.volumes.begin_list_quota_report( + resource_group_name=resource_group.name, + account_name="str", + pool_name="str", + volume_name="str", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -337,7 +375,7 @@ async def test_begin_break_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -354,7 +392,7 @@ async def test_begin_reestablish_replication(self, resource_group): pool_name="str", volume_name="str", body={"sourceVolumeId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -369,7 +407,7 @@ async def test_replication_status(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) # please add some check logic here by yourself @@ -383,7 +421,7 @@ async def test_list_replications(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -398,7 +436,7 @@ async def test_begin_resync_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -414,7 +452,7 @@ async def test_begin_delete_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -431,7 +469,7 @@ async def test_begin_authorize_replication(self, resource_group): pool_name="str", volume_name="str", body={"remoteVolumeResourceId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -447,7 +485,7 @@ async def test_begin_re_initialize_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -464,7 +502,7 @@ async def test_begin_peer_external_cluster(self, resource_group): pool_name="str", volume_name="str", body={"peerIpAddresses": ["str"]}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -480,7 +518,7 @@ async def test_begin_authorize_external_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -496,7 +534,7 @@ async def test_begin_finalize_external_replication(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -512,7 +550,7 @@ async def test_begin_perform_replication_transfer(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -529,7 +567,7 @@ async def test_begin_pool_change(self, resource_group): pool_name="str", volume_name="str", body={"newPoolResourceId": "str"}, - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -545,7 +583,7 @@ async def test_begin_relocate(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -561,7 +599,7 @@ async def test_begin_finalize_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result @@ -577,7 +615,7 @@ async def test_begin_revert_relocation(self, resource_group): account_name="str", pool_name="str", volume_name="str", - api_version="2024-07-01", + api_version="2024-07-01-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/netapp/azure-mgmt-netapp/sdk_packaging.toml b/sdk/netapp/azure-mgmt-netapp/sdk_packaging.toml index d448bcb16e58..4c7cad36dc60 100644 --- a/sdk/netapp/azure-mgmt-netapp/sdk_packaging.toml +++ b/sdk/netapp/azure-mgmt-netapp/sdk_packaging.toml @@ -2,6 +2,6 @@ package_name = "azure-mgmt-netapp" package_pprint_name = "NetApp Files Management" package_doc_id = "" -is_stable = true +is_stable = false is_arm = true title = "NetAppManagementClient" diff --git a/sdk/netapp/azure-mgmt-netapp/setup.py b/sdk/netapp/azure-mgmt-netapp/setup.py index 512cdbbbce5f..6282a0daf59b 100644 --- a/sdk/netapp/azure-mgmt-netapp/setup.py +++ b/sdk/netapp/azure-mgmt-netapp/setup.py @@ -22,9 +22,11 @@ # Version extraction inspired from 'requests' with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), + ( + os.path.join(package_folder_path, "version.py") + if os.path.exists(os.path.join(package_folder_path, "version.py")) + else os.path.join(package_folder_path, "_version.py") + ), "r", ) as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -49,7 +51,7 @@ url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", diff --git a/sdk/netapp/azure-mgmt-netapp/tests/conftest.py b/sdk/netapp/azure-mgmt-netapp/tests/conftest.py index d1d25dbdf2c7..67a3d64285d7 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/conftest.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/conftest.py @@ -41,6 +41,7 @@ load_dotenv() + @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/setup.py b/sdk/netapp/azure-mgmt-netapp/tests/setup.py index 7dd91ba878b6..aa396c17dfa5 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/setup.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/setup.py @@ -3,33 +3,33 @@ # - actual subsid to be used # - rg must exist # - vnet must exist -LOCATION = 'westus2' -REMOTE_LOCATION = 'eastus2' -TEST_RG = 'sdk-python-tests-rg-tmp' -TEST_REPL_REMOTE_RG = 'sdk-python-tests-rg-R-tmp' -TEST_ACC_1 = 'sdk-py-tests-acc-1' -TEST_ACC_2 = 'sdk-py-tests-acc-2' -TEST_POOL_1 = 'sdk-py-tests-pool-1' -TEST_POOL_2 = 'sdk-py-tests-pool-2' -TEST_VOL_1 = 'sdk-py-tests-vol-3' -TEST_VOL_2 = 'sdk-py-tests-vol-4' -TEST_BACKUP_1 = 'sdk-py-tests-backups-1' -TEST_BACKUP_2 = 'sdk-py-tests-backups-2' -TEST_SUBVOLUME_1 = 'sdk-py-tests-subvolume-1' -TEST_SUBVOLUME_2 = 'sdk-py-tests-subvolume-2' -TEST_SNAPSHOT_1 = 'sdk-py-tests-snapshot-1' -TEST_SNAPSHOT_2 = 'sdk-py-tests-snapshot-2' -SERVICE_LEVEL = 'Premium' -REMOTE_VNET = 'sdk-python-tests-VNET-R' -PERMA_ACCOUNT = 'sdk-python-perma-account' -PERMA_REMOTE_ACCOUNT = 'sdk-python-perma-remote-account' +LOCATION = "westus2" +REMOTE_LOCATION = "eastus2" +TEST_RG = "sdk-python-tests-rg-tmp" +TEST_REPL_REMOTE_RG = "sdk-python-tests-rg-R-tmp" +TEST_ACC_1 = "sdk-py-tests-acc-1" +TEST_ACC_2 = "sdk-py-tests-acc-2" +TEST_POOL_1 = "sdk-py-tests-pool-1" +TEST_POOL_2 = "sdk-py-tests-pool-2" +TEST_VOL_1 = "sdk-py-tests-vol-3" +TEST_VOL_2 = "sdk-py-tests-vol-4" +TEST_BACKUP_1 = "sdk-py-tests-backups-1" +TEST_BACKUP_2 = "sdk-py-tests-backups-2" +TEST_SUBVOLUME_1 = "sdk-py-tests-subvolume-1" +TEST_SUBVOLUME_2 = "sdk-py-tests-subvolume-2" +TEST_SNAPSHOT_1 = "sdk-py-tests-snapshot-1" +TEST_SNAPSHOT_2 = "sdk-py-tests-snapshot-2" +SERVICE_LEVEL = "Premium" +REMOTE_VNET = "sdk-python-tests-VNET-R" +PERMA_ACCOUNT = "sdk-python-perma-account" +PERMA_REMOTE_ACCOUNT = "sdk-python-perma-remote-account" PERMA_POOL = "sdk-python-perma-pool" -PERMA_REMOTE_POOL = 'sdk-python-perma-remote-pool' +PERMA_REMOTE_POOL = "sdk-python-perma-remote-pool" PERMA_VOLUME = "sdk-python-perma-volume" -PERMA_REMOTE_VOLUME= 'sdk-python-perma-remote-volume' -PERMA_VNET = 'sdk-python-tests-perma-VNET' -PERMA_REMOTE_VNET = 'sdk-python-tests-remote-perma-VNET' -PERMA_SUBNET = 'sdk-python-tests-subnet' -PERMA_REMOTE_SUBNET = 'sdk-python-tests-remote-subnet' +PERMA_REMOTE_VOLUME = "sdk-python-perma-remote-volume" +PERMA_VNET = "sdk-python-tests-perma-VNET" +PERMA_REMOTE_VNET = "sdk-python-tests-remote-perma-VNET" +PERMA_SUBNET = "sdk-python-tests-subnet" +PERMA_REMOTE_SUBNET = "sdk-python-tests-remote-subnet" LIVE = False -SUBSID = '69a75bda-882e-44d5-8431-63421204132a' \ No newline at end of file +SUBSID = "69a75bda-882e-44d5-8431-63421204132a" diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_account.py b/sdk/netapp/azure-mgmt-netapp/tests/test_account.py index 7c5b1e31a79e..c17ecbf1ab17 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_account.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_account.py @@ -5,19 +5,17 @@ from azure.mgmt.netapp.models import NetAppAccount, NetAppAccountPatch import setup + def create_account(client, rg, acc_name, location=setup.LOCATION, tags=None, active_directories=None): account_body = NetAppAccount(location=location, tags=tags, active_directories=active_directories) - + print("Creating NetApp Account {0}".format(acc_name)) - account = client.accounts.begin_create_or_update( - rg, - acc_name, - account_body - ).result() + account = client.accounts.begin_create_or_update(rg, acc_name, account_body).result() wait_for_account(client, rg, acc_name) print("\tDone creating NetApp Account {0}".format(acc_name)) return account + def wait_for_account(client, rg, acc_name): # a work around for the async nature of certain ARM processes retry = 0 @@ -31,6 +29,7 @@ def wait_for_account(client, rg, acc_name): if retry == 60: raise Exception("Timeout when waiting for account") + def wait_for_no_account(client, rg, acc_name): # a workaround for the async nature of certain ARM processes retry = 0 @@ -47,14 +46,15 @@ def wait_for_no_account(client, rg, acc_name): if retry == 60: raise Exception("Timeout when waiting for no account") + def delete_account(client, rg, acc_name): print("Deleting NetApp Account {0}".format(acc_name)) retry = 0 while retry < 5: try: - client.accounts.begin_delete(rg, acc_name).wait() + client.accounts.begin_delete(rg, acc_name).wait() break - except Exception as e: + except Exception as e: print("failed to delete account. Retry number: {0}".format(retry)) print(e) retry += 1 @@ -66,6 +66,7 @@ def delete_account(client, rg, acc_name): wait_for_no_account(client, rg, acc_name) print("\tDone deleting account {0}".format(acc_name)) + class TestNetAppAccount(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -79,7 +80,7 @@ def setup_method(self, method): @recorded_by_proxy def test_create_delete_account(self): print("Starting test_create_delete_account") - account_name = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name = self.get_resource_name(setup.TEST_ACC_1 + "-") account_list = self.client.accounts.list(setup.TEST_RG) account_list_lenght = len(list(account_list)) @@ -88,7 +89,7 @@ def test_create_delete_account(self): assert account.name == account_name account_list = self.client.accounts.list(setup.TEST_RG) - assert len(list(account_list)) == account_list_lenght+1 + assert len(list(account_list)) == account_list_lenght + 1 delete_account(self.client, setup.TEST_RG, account_name) account_list = self.client.accounts.list(setup.TEST_RG) @@ -98,8 +99,8 @@ def test_create_delete_account(self): @recorded_by_proxy def test_list_accounts(self): print("Starting test_list_accounts") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") - account_name2 = self.get_resource_name(setup.TEST_ACC_2+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") + account_name2 = self.get_resource_name(setup.TEST_ACC_2 + "-") account_list = self.client.accounts.list(setup.TEST_RG) account_list_lenght = len(list(account_list)) @@ -108,7 +109,7 @@ def test_list_accounts(self): accounts = [account_name1, account_name2] account_list = self.client.accounts.list(setup.TEST_RG) - assert len(list(account_list)) == account_list_lenght+2 + assert len(list(account_list)) == account_list_lenght + 2 idx = 0 for account in account_list: assert account.name == accounts[idx] @@ -121,7 +122,7 @@ def test_list_accounts(self): @recorded_by_proxy def test_get_account_by_name(self): print("Starting test_get_account_by_name") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_account(self.client, setup.TEST_RG, account_name1) account = self.client.accounts.get(setup.TEST_RG, account_name1) @@ -133,14 +134,14 @@ def test_get_account_by_name(self): @recorded_by_proxy def test_patch_account(self): print("Starting test_patch_account") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_account(self.client, setup.TEST_RG, account_name1) - tag = {'Tag1': 'Value2'} + tag = {"Tag1": "Value2"} netapp_account_patch = NetAppAccountPatch(tags=tag) account = self.client.accounts.begin_update(setup.TEST_RG, account_name1, netapp_account_patch).result() - assert account.tags['Tag1'] == 'Value2' + assert account.tags["Tag1"] == "Value2" delete_account(self.client, setup.TEST_RG, account_name1) print("Finished with test_patch_account") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/tests/test_net_app_resource_operations.py index 4852bedfb2b5..5400feb81108 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_net_app_resource_operations.py @@ -2,6 +2,7 @@ import setup import azure.mgmt.netapp.models + class TestNetAppResourceOperations(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -11,20 +12,30 @@ def setup_method(self, method): # Note that when tests are run in live mode it is best to run one test at a time. @recorded_by_proxy def test_query_network_sibling_set(self): - + print("Starting test_query_network_sibling_set") try: - self.client.net_app_resource.query_network_sibling_set(setup.LOCATION, "9760acf5-4638-11e7-9bdb-020073ca3333", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet") + self.client.net_app_resource.query_network_sibling_set( + setup.LOCATION, + "9760acf5-4638-11e7-9bdb-020073ca3333", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet", + ) except Exception as e: assert str(e).startswith("(NoNicsFoundForSubnet)") print("Finished with test_query_network_sibling_set") @recorded_by_proxy def test_begin_update_network_sibling_set(self): - + print("Starting test_begin_update_network_sibling_set") try: - self.client.net_app_resource.begin_update_network_sibling_set(setup.LOCATION, "9760acf5-4638-11e7-9bdb-020073ca3333", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet", "herpiderp", "Standard") + self.client.net_app_resource.begin_update_network_sibling_set( + setup.LOCATION, + "9760acf5-4638-11e7-9bdb-020073ca3333", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-python-tests-rg-tmp/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/sdk-python-tests-subnet", + "herpiderp", + "Standard", + ) except Exception as e: assert str(e).startswith("(NetworkSiblingSetChanged)") - print("Finished with test_begin_update_network_sibling_set") \ No newline at end of file + print("Finished with test_begin_update_network_sibling_set") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_pool.py b/sdk/netapp/azure-mgmt-netapp/tests/test_pool.py index 9af0bb654d40..553f429b88c9 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_pool.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_pool.py @@ -8,21 +8,25 @@ DEFAULT_SIZE = 4398046511104 -def create_pool(client, rg=setup.TEST_RG, acc_name=setup.TEST_ACC_1, pool_name=setup.TEST_POOL_1, location=setup.LOCATION, pool_only=False): + +def create_pool( + client, + rg=setup.TEST_RG, + acc_name=setup.TEST_ACC_1, + pool_name=setup.TEST_POOL_1, + location=setup.LOCATION, + pool_only=False, +): if not pool_only: create_account(client, rg, acc_name, location) - print("Creating pool {0} in NetApp Account {1}".format(pool_name,acc_name)) + print("Creating pool {0} in NetApp Account {1}".format(pool_name, acc_name)) pool_body = CapacityPool(SERVICE_LEVEL=setup.SERVICE_LEVEL, size=DEFAULT_SIZE, location=location) - pool = client.pools.begin_create_or_update( - rg, - acc_name, - pool_name, - pool_body - ).result() + pool = client.pools.begin_create_or_update(rg, acc_name, pool_name, pool_body).result() wait_for_pool(client, rg, acc_name, pool_name) - print("\tDone creating pool {0} in NetApp Account {1}".format(pool_name,acc_name)) + print("\tDone creating pool {0} in NetApp Account {1}".format(pool_name, acc_name)) return pool + def wait_for_pool(client, rg, account_name, pool_name): # a work around for the async nature of certain ARM processes retry = 0 @@ -36,6 +40,7 @@ def wait_for_pool(client, rg, account_name, pool_name): if retry == 60: raise Exception("Timeout when waiting for pool") + def wait_for_no_pool(client, rg, acc_name, pool_name): # a workaround for the async nature of certain ARM processes retry = 0 @@ -52,16 +57,17 @@ def wait_for_no_pool(client, rg, acc_name, pool_name): if retry == 100: raise Exception("Timeout when waiting for no pool") + def delete_pool(client, rg, acc_name, pool_name): # nest resources seem to hang around for a little while even # when apparently deleted, therefore give it a chance - print("Deleting pool {0} in NetApp Account {1}".format(pool_name,acc_name)) + print("Deleting pool {0} in NetApp Account {1}".format(pool_name, acc_name)) retry = 0 while retry < 3: try: client.pools.begin_delete(rg, acc_name, pool_name).wait() break - except Exception as e: + except Exception as e: print("failed to delete pool. Retry number: {0}".format(retry)) print(e) retry += 1 @@ -70,7 +76,8 @@ def delete_pool(client, rg, acc_name, pool_name): if retry == 3: raise Exception("Timeout when deleting pool") wait_for_no_pool(client, rg, acc_name, pool_name) - print("\tDone deleting pool {0} in NetApp Account {1}".format(pool_name,acc_name)) + print("\tDone deleting pool {0} in NetApp Account {1}".format(pool_name, acc_name)) + class TestNetAppCapacityPool(AzureMgmtRecordedTestCase): @@ -84,10 +91,10 @@ def setup_method(self, method): @recorded_by_proxy def test_create_delete_pool(self): print("Starting test_create_delete_pool") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") pool = create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1, setup.LOCATION) assert pool.size == DEFAULT_SIZE - assert pool.name == account_name1 + '/' + setup.TEST_POOL_1 + assert pool.name == account_name1 + "/" + setup.TEST_POOL_1 pool_list = self.client.pools.list(setup.TEST_RG, account_name1) assert len(list(pool_list)) == 1 @@ -97,13 +104,13 @@ def test_create_delete_pool(self): assert len(list(pool_list)) == 0 delete_account(self.client, setup.TEST_RG, account_name1) - + print("Finished with test_create_delete_pool") @recorded_by_proxy def test_list_pools(self): print("Starting test_list_pools") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1, setup.LOCATION) create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_2, setup.LOCATION, pool_only=True) pools = [setup.TEST_POOL_1, setup.TEST_POOL_2] @@ -123,11 +130,11 @@ def test_list_pools(self): @recorded_by_proxy def test_get_pool_by_name(self): print("Starting test_get_pool_by_name") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1, setup.LOCATION) pool = self.client.pools.get(setup.TEST_RG, account_name1, setup.TEST_POOL_1) - assert pool.name == account_name1 + '/' + setup.TEST_POOL_1 + assert pool.name == account_name1 + "/" + setup.TEST_POOL_1 delete_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1) delete_account(self.client, setup.TEST_RG, account_name1) @@ -136,16 +143,13 @@ def test_get_pool_by_name(self): @recorded_by_proxy def test_update_pool(self): print("Starting test_update_pool") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") pool = create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1) assert pool.qos_type == "Auto" pool_body = CapacityPoolPatch(qos_type="Manual", size=DEFAULT_SIZE, location=setup.LOCATION) pool = self.client.pools.begin_create_or_update( - setup.TEST_RG, - account_name1, - setup.TEST_POOL_1, - pool_body + setup.TEST_RG, account_name1, setup.TEST_POOL_1, pool_body ).result() assert pool.qos_type == "Manual" @@ -156,10 +160,10 @@ def test_update_pool(self): @recorded_by_proxy def test_patch_pool(self): print("Starting test_patch_pool") - account_name1 = self.get_resource_name(setup.TEST_ACC_1+"-") + account_name1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1) - tag = {'Tag2': 'Value1'} + tag = {"Tag2": "Value1"} capacity_pool_patch = CapacityPoolPatch(qos_type="Manual", tags=tag) print("Updating pool") @@ -167,8 +171,8 @@ def test_patch_pool(self): print("Done updating pool") pool = self.client.pools.get(setup.TEST_RG, account_name1, setup.TEST_POOL_1) assert pool.qos_type == "Manual" - assert pool.tags['Tag2'] == 'Value1' + assert pool.tags["Tag2"] == "Value1" delete_pool(self.client, setup.TEST_RG, account_name1, setup.TEST_POOL_1) delete_account(self.client, setup.TEST_RG, account_name1) - print("Finished with test_patch_pool") \ No newline at end of file + print("Finished with test_patch_pool") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot.py b/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot.py index 9a0d2e5e4850..17ada6b33087 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot.py @@ -10,10 +10,22 @@ import setup import azure.mgmt.netapp.models -def create_snapshot(client, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1, pool_name=setup.TEST_POOL_1, volume_name=setup.TEST_VOL_1, - snapshot_name=setup.TEST_SNAPSHOT_1, location=setup.LOCATION, vnet=setup.PERMA_VNET, snapshot_only=False): + +def create_snapshot( + client, + rg=setup.TEST_RG, + account_name=setup.TEST_ACC_1, + pool_name=setup.TEST_POOL_1, + volume_name=setup.TEST_VOL_1, + snapshot_name=setup.TEST_SNAPSHOT_1, + location=setup.LOCATION, + vnet=setup.PERMA_VNET, + snapshot_only=False, +): if not snapshot_only: - volume = create_volume(client, rg, account_name, pool_name, volume_name, vnet=setup.PERMA_VNET, volume_only=True) + volume = create_volume( + client, rg, account_name, pool_name, volume_name, vnet=setup.PERMA_VNET, volume_only=True + ) else: # we need to get the volume id if we didn't just create it volume = client.volumes.get(rg, account_name, pool_name, volume_name) @@ -28,6 +40,7 @@ def delete_snapshot(client, rg, account_name, pool_name, volume_name, snapshot_n client.snapshots.begin_delete(rg, account_name, pool_name, volume_name, snapshot_name).wait() wait_for_no_snapshot(client, rg, account_name, pool_name, volume_name, snapshot_name) + def wait_for_no_snapshot(client, rg, account_name, pool_name, volume_name, snapshot_name): retry = 0 while retry < 60: @@ -44,6 +57,7 @@ def wait_for_no_snapshot(client, rg, account_name, pool_name, volume_name, snaps if retry == 60: raise Exception("Timeout when waiting for no snapshot") + def wait_for_snapshot(client, rg, account_name, pool_name, volume_name, snapshot_name): retry = 0 while retry < 100: @@ -60,6 +74,7 @@ def wait_for_snapshot(client, rg, account_name, pool_name, volume_name, snapshot raise Exception("Timeout when waiting for snapshot") return snapshot + class TestNetAppSnapshot(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -72,16 +87,31 @@ def setup_method(self, method): def test_create_delete_snapshot(self): print("Starting test_create_delete_snapshot") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1+"-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1 + "-") try: - create_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname, setup.LOCATION, vnet=setup.PERMA_VNET) - - snapshot_list = self.client.snapshots.list(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + create_snapshot( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + snapshotname, + setup.LOCATION, + vnet=setup.PERMA_VNET, + ) + + snapshot_list = self.client.snapshots.list( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(snapshot_list)) == 1 - delete_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname) - snapshot_list = self.client.snapshots.list(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + delete_snapshot( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname + ) + snapshot_list = self.client.snapshots.list( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(snapshot_list)) == 0 finally: delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) @@ -92,42 +122,81 @@ def test_create_delete_snapshot(self): def test_list_snapshots(self): print("Starting test_list_snapshots") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1+"-") - snapshotname2 = self.get_resource_name(setup.TEST_SNAPSHOT_2+"-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1 + "-") + snapshotname2 = self.get_resource_name(setup.TEST_SNAPSHOT_2 + "-") try: - create_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname, setup.LOCATION, vnet=setup.PERMA_VNET) - create_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname2, setup.LOCATION, snapshot_only=True) + create_snapshot( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + snapshotname, + setup.LOCATION, + vnet=setup.PERMA_VNET, + ) + create_snapshot( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + snapshotname2, + setup.LOCATION, + snapshot_only=True, + ) snapshots = [snapshotname, snapshotname2] - snapshot_list = self.client.snapshots.list(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + snapshot_list = self.client.snapshots.list( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(snapshot_list)) == 2 idx = 0 for snapshot in snapshot_list: assert snapshot.name == snapshots[idx] idx += 1 finally: - delete_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname) - delete_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname2) + delete_snapshot( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname + ) + delete_snapshot( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname2 + ) delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - print("Finished with test_list_snapshots") + print("Finished with test_list_snapshots") @recorded_by_proxy def test_get_snapshot_by_name(self): print("Starting test_get_snapshot_by_name") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1+"-") - - try: - create_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname, setup.LOCATION, vnet=setup.PERMA_VNET) + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + snapshotname = self.get_resource_name(setup.TEST_SNAPSHOT_1 + "-") - snapshot = self.client.snapshots.get(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname) - assert snapshot.name == setup.PERMA_ACCOUNT + '/' + setup.PERMA_POOL + '/' + volumeName1+ '/' + snapshotname + try: + create_snapshot( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + snapshotname, + setup.LOCATION, + vnet=setup.PERMA_VNET, + ) + + snapshot = self.client.snapshots.get( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname + ) + assert ( + snapshot.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + snapshotname + ) finally: - delete_snapshot(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname) + delete_snapshot( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, snapshotname + ) delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - print("Finished with test_get_snapshot_by_name") \ No newline at end of file + print("Finished with test_get_snapshot_by_name") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot_policies.py b/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot_policies.py index d3e666f874bb..1131cae90c17 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot_policies.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_snapshot_policies.py @@ -1,16 +1,32 @@ import time from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy, set_bodiless_matcher -from azure.mgmt.netapp.models import SnapshotPolicy, SnapshotPolicyPatch, HourlySchedule, DailySchedule, VolumeSnapshotProperties, VolumePatchPropertiesDataProtection, VolumePatch +from azure.mgmt.netapp.models import ( + SnapshotPolicy, + SnapshotPolicyPatch, + HourlySchedule, + DailySchedule, + VolumeSnapshotProperties, + VolumePatchPropertiesDataProtection, + VolumePatch, +) from test_account import create_account, delete_account from test_pool import delete_pool from test_volume import create_volume, delete_volume, wait_for_volume import setup import azure.mgmt.netapp.models -setup.TEST_SNAPSHOT_POLICY_1 = 'sdk-py-tests-snapshot-policy-1' -setup.TEST_SNAPSHOT_POLICY_2 = 'sdk-py-tests-snapshot-policy-2' +setup.TEST_SNAPSHOT_POLICY_1 = "sdk-py-tests-snapshot-policy-1" +setup.TEST_SNAPSHOT_POLICY_2 = "sdk-py-tests-snapshot-policy-2" -def create_snapshot_policy(client, snapshot_policy_name, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1, location=setup.LOCATION, snapshot_policy_only=False): + +def create_snapshot_policy( + client, + snapshot_policy_name, + rg=setup.TEST_RG, + account_name=setup.TEST_ACC_1, + location=setup.LOCATION, + snapshot_policy_only=False, +): if not snapshot_policy_only: create_account(client, rg, account_name, location) @@ -20,13 +36,14 @@ def create_snapshot_policy(client, snapshot_policy_name, rg=setup.TEST_RG, accou daily_schedule={}, weekly_schedule={}, monthly_schedule={}, - enabled=False + enabled=False, ) snapshot_policy = client.snapshot_policies.create(rg, account_name, snapshot_policy_name, snapshot_policy_body) wait_for_snapshot_policy(client, rg, account_name, snapshot_policy_name) return snapshot_policy + def wait_for_snapshot_policy(client, rg, account_name, snapshot_policy_name): # a work around for the async nature of certain ARM processes retry = 0 @@ -43,6 +60,7 @@ def wait_for_snapshot_policy(client, rg, account_name, snapshot_policy_name): if retry == 60: raise Exception("Timeout when waiting for snapshot policy") + def delete_snapshot_policy(client, snapshot_policy_name, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1): client.snapshot_policies.begin_delete(rg, account_name, snapshot_policy_name).wait() wait_for_no_snapshot_policy(client, rg, account_name, snapshot_policy_name) @@ -64,6 +82,7 @@ def wait_for_no_snapshot_policy(client, rg, account_name, snapshot_policy_name): if retry == 60: raise Exception("Timeout when waiting for no snapshot policy") + class TestNetAppSnapshotPolicy(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -76,7 +95,7 @@ def setup_method(self, method): @recorded_by_proxy def test_create_delete_snapshot_policy(self): print("Starting test_create_delete_snapshot_policy") - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_1, account_name=ACCOUNT1) snapshot_policies_list = self.client.snapshot_policies.list(setup.TEST_RG, account_name=ACCOUNT1) @@ -93,16 +112,18 @@ def test_create_delete_snapshot_policy(self): @recorded_by_proxy def test_list_snapshot_policies(self): print("Starting test_list_snapshot_policies") - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_1, account_name=ACCOUNT1) - create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_2, account_name=ACCOUNT1, snapshot_policy_only=True) + create_snapshot_policy( + self.client, setup.TEST_SNAPSHOT_POLICY_2, account_name=ACCOUNT1, snapshot_policy_only=True + ) snapshot_policies_list = self.client.snapshot_policies.list(setup.TEST_RG, ACCOUNT1) assert len(list(snapshot_policies_list)) == 2 snapshot_policies = [setup.TEST_SNAPSHOT_POLICY_1, setup.TEST_SNAPSHOT_POLICY_2] idx = 0 - for snapshot_policy in snapshot_policies_list: + for snapshot_policy in snapshot_policies_list: assert snapshot_policy.name == snapshot_policies[idx] idx += 1 @@ -118,7 +139,7 @@ def test_list_snapshot_policies(self): @recorded_by_proxy def test_get_snapshot_policy_by_name(self): print("Starting test_get_snapshot_policy_by_name") - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_1, account_name=ACCOUNT1) snapshot_policy = self.client.snapshot_policies.get(setup.TEST_RG, ACCOUNT1, setup.TEST_SNAPSHOT_POLICY_1) @@ -131,7 +152,7 @@ def test_get_snapshot_policy_by_name(self): @recorded_by_proxy def test_update_snapshot_policies(self): print("Starting test_update_snapshot_policies") - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_1, account_name=ACCOUNT1) snapshot_policy_body = SnapshotPolicyPatch( @@ -140,9 +161,11 @@ def test_update_snapshot_policies(self): daily_schedule=DailySchedule(snapshots_to_keep=1, minute=50, hour=1), weekly_schedule={}, monthly_schedule={}, - enabled=False + enabled=False, ) - snapshot_policy = self.client.snapshot_policies.begin_update(setup.TEST_RG, ACCOUNT1, setup.TEST_SNAPSHOT_POLICY_1, snapshot_policy_body).result() + snapshot_policy = self.client.snapshot_policies.begin_update( + setup.TEST_RG, ACCOUNT1, setup.TEST_SNAPSHOT_POLICY_1, snapshot_policy_body + ).result() wait_for_snapshot_policy(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_SNAPSHOT_POLICY_1) assert snapshot_policy.daily_schedule.snapshots_to_keep == 1 assert snapshot_policy.daily_schedule.hour == 1 @@ -157,17 +180,21 @@ def test_assign_snapshot_policy_to_volume(self): print("Starting test_assign_snapshot_policy_to_volume") set_bodiless_matcher() # create volume and snapshot policy - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - - create_volume(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET) + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + + create_volume( + self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET + ) snapshot_policy = create_snapshot_policy(self.client, setup.TEST_SNAPSHOT_POLICY_1, account_name=ACCOUNT1) # assign the snapshot policy to the volume snapshot = VolumeSnapshotProperties(snapshot_policy_id=snapshot_policy.id) data_protection = VolumePatchPropertiesDataProtection(snapshot=snapshot) volume_patch = VolumePatch(data_protection=data_protection) - volume = self.client.volumes.begin_update(setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, volume_patch).result() + volume = self.client.volumes.begin_update( + setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, volume_patch + ).result() wait_for_volume(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1) assert volume.data_protection.snapshot.snapshot_policy_id == snapshot_policy.id @@ -178,4 +205,4 @@ def test_assign_snapshot_policy_to_volume(self): delete_pool(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1) delete_account(self.client, setup.TEST_RG, ACCOUNT1) - print("Finished with test_assign_snapshot_policy_to_volume") \ No newline at end of file + print("Finished with test_assign_snapshot_policy_to_volume") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_subvolume.py b/sdk/netapp/azure-mgmt-netapp/tests/test_subvolume.py index 77af9ed16c3a..5593db2a9cfa 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_subvolume.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_subvolume.py @@ -2,25 +2,30 @@ import string from azure.mgmt.netapp.models import SubvolumeInfo, SubvolumePatchRequest from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy, set_bodiless_matcher -from test_volume import create_volume, delete_volume, delete_pool, delete_account, create_virtual_network, wait_for_volume +from test_volume import ( + create_volume, + delete_volume, + delete_pool, + delete_account, + create_virtual_network, + wait_for_volume, +) import setup import azure.mgmt.netapp.models import time + def create_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name, path, size): print("Creating subvolume {0} under volume {1}".format(subvolume_name, volume_name)) - - subvolume_body = SubvolumeInfo( - path=path, - size=size - ) - - client.subvolumes.begin_create( - rg, account_name, pool_name, volume_name, subvolume_name, subvolume_body).result() + + subvolume_body = SubvolumeInfo(path=path, size=size) + + client.subvolumes.begin_create(rg, account_name, pool_name, volume_name, subvolume_name, subvolume_body).result() subvolume = wait_for_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name) print("\tdone") return subvolume + def wait_for_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name): retry = 0 while retry < 60: @@ -35,7 +40,8 @@ def wait_for_subvolume(client, rg, account_name, pool_name, volume_name, subvolu time.sleep(3) if retry == 60: raise Exception("Timeout when waiting for subvolume") - return subvolume + return subvolume + def delete_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name): print("Delete subvolume {0}".format(volume_name)) @@ -43,6 +49,7 @@ def delete_subvolume(client, rg, account_name, pool_name, volume_name, subvolume wait_for_no_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name) print("\tDone") + def wait_for_no_subvolume(client, rg, account_name, pool_name, volume_name, subvolume_name): retry = 0 while retry < 60: @@ -59,6 +66,7 @@ def wait_for_no_subvolume(client, rg, account_name, pool_name, volume_name, subv if retry == 60: raise Exception("Timeout when waiting for no subvolume") + class TestNetAppSubvolume(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -72,96 +80,192 @@ def setup_method(self, method): def test_crud_subvolumes(self): print("Starting test_crud_subvolumes") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1+"-") - + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1 + "-") + try: - create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=True, enable_subvolumes="Enabled") + create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=True, + enable_subvolumes="Enabled", + ) # create - subvolume = create_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName, "/sub_vol_1.txt", 1000000) - - assert subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + subvolume = create_subvolume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + subvolumeName, + "/sub_vol_1.txt", + 1000000, + ) + + assert ( + subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + ) assert subvolume.path == "/sub_vol_1.txt" # update subvolume_patch = SubvolumePatchRequest(path="/sub_vol_update.txt", size=2000000) print("Updating subvolume") - subvolume = self.client.subvolumes.begin_update(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName, subvolume_patch).result() + subvolume = self.client.subvolumes.begin_update( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName, subvolume_patch + ).result() print("\tDone") - wait_for_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName) + wait_for_subvolume( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ) wait_for_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - assert subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + assert ( + subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + ) assert subvolume.path == "/sub_vol_update.txt" # get - subvolume_info = self.client.subvolumes.get(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName) - assert subvolume_info.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + subvolume_info = self.client.subvolumes.get( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ) + assert ( + subvolume_info.name + == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + ) assert subvolume_info.path == "/sub_vol_update.txt" finally: # delete - delete_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName) - subvolume_list = self.client.subvolumes.list_by_volume(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + delete_subvolume( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ) + subvolume_list = self.client.subvolumes.list_by_volume( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(subvolume_list)) == 0 delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - + print("Finished with test_crud_subvolumes") @recorded_by_proxy def test_list_by_volume(self): print("Starting test_list_by_volume") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1+"-") - subvolumeName2 = self.get_resource_name(setup.TEST_SUBVOLUME_2+"-") - + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1 + "-") + subvolumeName2 = self.get_resource_name(setup.TEST_SUBVOLUME_2 + "-") + try: - create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, enable_subvolumes="Enabled") + create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + enable_subvolumes="Enabled", + ) # create - subvolume = create_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName, "/sub_vol_2.txt", 1000000) - subvolume2 = create_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName2, "/sub_vol_3.txt", 2000000) + subvolume = create_subvolume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + subvolumeName, + "/sub_vol_2.txt", + 1000000, + ) + subvolume2 = create_subvolume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + subvolumeName2, + "/sub_vol_3.txt", + 2000000, + ) # list_by_volume - subvolume_list = self.client.subvolumes.list_by_volume(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + subvolume_list = self.client.subvolumes.list_by_volume( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(subvolume_list)) == 2 - delete_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName) - subvolume_list = self.client.subvolumes.list_by_volume(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + delete_subvolume( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ) + subvolume_list = self.client.subvolumes.list_by_volume( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(subvolume_list)) == 1 - delete_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName2) - subvolume_list = self.client.subvolumes.list_by_volume(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) + delete_subvolume( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName2 + ) + subvolume_list = self.client.subvolumes.list_by_volume( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) assert len(list(subvolume_list)) == 0 finally: # clean up delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - + print("Finished with test_list_by_volume") @recorded_by_proxy def test_get_metadata(self): print("Starting test_get_metadata") set_bodiless_matcher() - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1+"-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + subvolumeName = self.get_resource_name(setup.TEST_SUBVOLUME_1 + "-") try: - create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, enable_subvolumes="Enabled") + create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + enable_subvolumes="Enabled", + ) # create - subvolume = create_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName, "/sub_vol_4.txt", 123) - assert subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + subvolume = create_subvolume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + subvolumeName, + "/sub_vol_4.txt", + 123, + ) + assert ( + subvolume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 + "/" + subvolumeName + ) assert subvolume.path == "/sub_vol_4.txt" # get metadata metadata = self.client.subvolumes.begin_get_metadata( - setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName).result() + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ).result() assert metadata is not None finally: # clean up - delete_subvolume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName) + delete_subvolume( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, subvolumeName + ) delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - + print("Finished with test_get_metadata") diff --git a/sdk/netapp/azure-mgmt-netapp/tests/test_volume.py b/sdk/netapp/azure-mgmt-netapp/tests/test_volume.py index 435a94110211..5de030bd2ab8 100644 --- a/sdk/netapp/azure-mgmt-netapp/tests/test_volume.py +++ b/sdk/netapp/azure-mgmt-netapp/tests/test_volume.py @@ -2,17 +2,27 @@ import pytest from azure.mgmt.resource import ResourceManagementClient from devtools_testutils import AzureMgmtRecordedTestCase, recorded_by_proxy, set_bodiless_matcher -from azure.mgmt.netapp.models import Volume, VolumePatch, ReplicationObject, VolumePropertiesDataProtection, AuthorizeRequest, PoolChangeRequest, RemotePath, PeerClusterForVolumeMigrationRequest +from azure.mgmt.netapp.models import ( + Volume, + VolumePatch, + ReplicationObject, + VolumePropertiesDataProtection, + AuthorizeRequest, + PoolChangeRequest, + RemotePath, + PeerClusterForVolumeMigrationRequest, +) from test_pool import create_pool, delete_pool from test_account import delete_account import setup import azure.mgmt.netapp.models GIGABYTE = 1024 * 1024 * 1024 -SUBSID = '69a75bda-882e-44d5-8431-63421204132a' +SUBSID = "69a75bda-882e-44d5-8431-63421204132a" + def create_volume_body(volume_name, location, rg=setup.TEST_RG, vnet=setup.PERMA_VNET, enable_subvolumes=None): - default_protocol_type = ["NFSv3"] + default_protocol_type = ["NFSv3"] volume_body = Volume( location=location, usage_threshold=100 * GIGABYTE, @@ -20,60 +30,62 @@ def create_volume_body(volume_name, location, rg=setup.TEST_RG, vnet=setup.PERMA creation_token=volume_name, enable_subvolumes=enable_subvolumes, service_level=setup.SERVICE_LEVEL, - subnet_id="/subscriptions/" + SUBSID + "/resourceGroups/" + rg + "/providers/Microsoft.Network/virtualNetworks/" - + vnet + "/subnets/" + setup.PERMA_SUBNET, - network_features="Standard" + subnet_id="/subscriptions/" + + SUBSID + + "/resourceGroups/" + + rg + + "/providers/Microsoft.Network/virtualNetworks/" + + vnet + + "/subnets/" + + setup.PERMA_SUBNET, + network_features="Standard", ) return volume_body -def create_volume(client, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1, pool_name=setup.TEST_POOL_1, volume_name=setup.TEST_VOL_1, - location=setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=False, enable_subvolumes=None): +def create_volume( + client, + rg=setup.TEST_RG, + account_name=setup.TEST_ACC_1, + pool_name=setup.TEST_POOL_1, + volume_name=setup.TEST_VOL_1, + location=setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=False, + enable_subvolumes=None, +): if not volume_only: - create_pool( - client, - rg, - account_name, - pool_name, - location, - False) + create_pool(client, rg, account_name, pool_name, location, False) print("Creating volume {0} in NetApp Account {1}".format(volume_name, account_name)) volume_body = create_volume_body(volume_name, location, rg, vnet, enable_subvolumes) - client.volumes.begin_create_or_update( - rg, - account_name, - pool_name, - volume_name, - volume_body - ).result() + client.volumes.begin_create_or_update(rg, account_name, pool_name, volume_name, volume_body).result() volume = wait_for_volume(client, rg, account_name, pool_name, volume_name) print("\tDone creating volume {0} in NetApp Account {1}".format(volume_name, account_name)) return volume -def create_dp_volume(client, source_volume, rg=setup.TEST_REPL_REMOTE_RG, account_name=setup.TEST_ACC_2, pool_name=setup.TEST_POOL_2, - volume_name=setup.TEST_VOL_2, location=setup.REMOTE_LOCATION, vnet=setup.PERMA_REMOTE_VNET, volume_only=False): +def create_dp_volume( + client, + source_volume, + rg=setup.TEST_REPL_REMOTE_RG, + account_name=setup.TEST_ACC_2, + pool_name=setup.TEST_POOL_2, + volume_name=setup.TEST_VOL_2, + location=setup.REMOTE_LOCATION, + vnet=setup.PERMA_REMOTE_VNET, + volume_only=False, +): if not volume_only: - create_pool( - client, - rg, - account_name, - pool_name, - location, - False) + create_pool(client, rg, account_name, pool_name, location, False) print("Creating DP volume {0} in NetApp Account {1}".format(volume_name, account_name)) # data protection and replication object replication = ReplicationObject( - endpoint_type="dst", - remote_volume_resource_id=source_volume.id, - replication_schedule="_10minutely" + endpoint_type="dst", remote_volume_resource_id=source_volume.id, replication_schedule="_10minutely" ) - data_protection = VolumePropertiesDataProtection( - replication=replication - ) + data_protection = VolumePropertiesDataProtection(replication=replication) default_protocol_type = ["NFSv3"] @@ -82,42 +94,47 @@ def create_dp_volume(client, source_volume, rg=setup.TEST_REPL_REMOTE_RG, accoun usage_threshold=100 * GIGABYTE, protocol_types=default_protocol_type, creation_token=volume_name, - subnet_id="/subscriptions/" + SUBSID + "/resourceGroups/" + rg + "/providers/Microsoft.Network/virtualNetworks/" - + vnet + "/subnets/" + setup.PERMA_REMOTE_SUBNET, + subnet_id="/subscriptions/" + + SUBSID + + "/resourceGroups/" + + rg + + "/providers/Microsoft.Network/virtualNetworks/" + + vnet + + "/subnets/" + + setup.PERMA_REMOTE_SUBNET, volume_type="DataProtection", - data_protection=data_protection + data_protection=data_protection, ) destination_volume = client.volumes.begin_create_or_update( - rg, - account_name, - pool_name, - volume_name, - volume_body + rg, account_name, pool_name, volume_name, volume_body ).result() wait_for_volume(client, rg, account_name, pool_name, volume_name) print("\tDone creating DP volume in NetApp Account {0}".format(account_name)) return destination_volume -def create_migration_volume(client, rg=setup.TEST_REPL_REMOTE_RG, account_name=setup.TEST_ACC_1, pool_name=setup.TEST_POOL_1, - volume_name=setup.TEST_VOL_1, location=setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=False): + +def create_migration_volume( + client, + rg=setup.TEST_REPL_REMOTE_RG, + account_name=setup.TEST_ACC_1, + pool_name=setup.TEST_POOL_1, + volume_name=setup.TEST_VOL_1, + location=setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=False, +): if not volume_only: - create_pool( - client, - rg, - account_name, - pool_name, - location, - False) + create_pool(client, rg, account_name, pool_name, location, False) print("Creating Migration volume {0} in NetApp Account {1}".format(volume_name, account_name)) # data protection and replication object - replication = ReplicationObject( - remote_path=RemotePath(external_host_name="externalHostName", server_name="serverName", volume_name="volumeName") + replication = ReplicationObject( + remote_path=RemotePath( + external_host_name="externalHostName", server_name="serverName", volume_name="volumeName" + ) ) - data_protection = VolumePropertiesDataProtection( - replication=replication - ) + data_protection = VolumePropertiesDataProtection(replication=replication) default_protocol_type = ["NFSv3"] @@ -126,23 +143,26 @@ def create_migration_volume(client, rg=setup.TEST_REPL_REMOTE_RG, account_name=s usage_threshold=100 * GIGABYTE, protocol_types=default_protocol_type, creation_token=volume_name, - subnet_id="/subscriptions/" + SUBSID + "/resourceGroups/" + rg + "/providers/Microsoft.Network/virtualNetworks/" - + vnet + "/subnets/" + setup.PERMA_SUBNET, + subnet_id="/subscriptions/" + + SUBSID + + "/resourceGroups/" + + rg + + "/providers/Microsoft.Network/virtualNetworks/" + + vnet + + "/subnets/" + + setup.PERMA_SUBNET, volume_type="Migration", - data_protection=data_protection + data_protection=data_protection, ) destination_volume = client.volumes.begin_create_or_update( - rg, - account_name, - pool_name, - volume_name, - volume_body + rg, account_name, pool_name, volume_name, volume_body ).result() wait_for_volume(client, rg, account_name, pool_name, volume_name) print("\tDone creating Migration volume in NetApp Account {0}".format(account_name)) return destination_volume + def get_volume(client, rg, account_name, pool_name, volume_name): volume = client.volumes.get(rg, account_name, pool_name, volume_name) return volume @@ -163,9 +183,10 @@ def wait_for_no_volume(client, rg, account_name, pool_name, volume_name): time.sleep(3) retry += 1 if retry == 100: - raise Exception("Timeout when waiting for no volume") + raise Exception("Timeout when waiting for no volume") print("Retried {0} times".format(retry)) + def wait_for_volume(client, rg, account_name, pool_name, volume_name): # a work around for the async nature of certain ARM processes retry = 0 @@ -180,9 +201,10 @@ def wait_for_volume(client, rg, account_name, pool_name, volume_name): time.sleep(3) retry += 1 if retry == 100: - raise Exception("Timeout when waiting for volume") + raise Exception("Timeout when waiting for volume") return volume + def delete_volume(client, rg, account_name, pool_name, volume_name): print("Delete volume {0}".format(volume_name)) retry = 0 @@ -190,18 +212,26 @@ def delete_volume(client, rg, account_name, pool_name, volume_name): try: client.volumes.begin_delete(rg, account_name, pool_name, volume_name).wait() break - except Exception as e: + except Exception as e: print("failed to delete volume. Retry number: {0}".format(retry)) print(e) retry += 1 if setup.LIVE: time.sleep(10) if retry == 3: - raise Exception("Timeout when trying to delete volume") + raise Exception("Timeout when trying to delete volume") wait_for_no_volume(client, rg, account_name, pool_name, volume_name) print("\tDone deleting volume {0}".format(volume_name)) -def wait_for_replication_status(client, target_state, dp_rg=setup.TEST_REPL_REMOTE_RG, dp_account_name=setup.TEST_ACC_2, dp_pool_name=setup.TEST_POOL_2, dp_volume_name=setup.TEST_VOL_2): + +def wait_for_replication_status( + client, + target_state, + dp_rg=setup.TEST_REPL_REMOTE_RG, + dp_account_name=setup.TEST_ACC_2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=setup.TEST_VOL_2, +): print("Waiting for replication status") retry = 0 while retry < 11: @@ -212,10 +242,22 @@ def wait_for_replication_status(client, target_state, dp_rg=setup.TEST_REPL_REMO time.sleep(60) retry += 1 if retry == 11: - raise Exception("Timeout when waiting for replication status") + raise Exception("Timeout when waiting for replication status") print("\tDone waiting for replication status") -def wait_for_succeeded(client, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1, pool_name=setup.TEST_POOL_1, volume_name=setup.TEST_VOL_1, dp_rg=setup.TEST_REPL_REMOTE_RG, dp_account_name=setup.TEST_ACC_2, dp_pool_name=setup.TEST_POOL_2, dp_volume_name=setup.TEST_VOL_2,live=False): + +def wait_for_succeeded( + client, + rg=setup.TEST_RG, + account_name=setup.TEST_ACC_1, + pool_name=setup.TEST_POOL_1, + volume_name=setup.TEST_VOL_1, + dp_rg=setup.TEST_REPL_REMOTE_RG, + dp_account_name=setup.TEST_ACC_2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=setup.TEST_VOL_2, + live=False, +): print("Waiting for success status on source and dest volume") retry = 0 while retry < 20: @@ -226,41 +268,33 @@ def wait_for_succeeded(client, rg=setup.TEST_RG, account_name=setup.TEST_ACC_1, if setup.LIVE: time.sleep(10) if retry == 20: - raise Exception("Timeout when waiting for success status on source and dest volume") + raise Exception("Timeout when waiting for success status on source and dest volume") print("\tDone waiting for success status on source and dest volume") + def create_virtual_network(network_client, group_name, location, network_name, subnet_name): - print("Create vnet {0}".format(network_name)) + print("Create vnet {0}".format(network_name)) azure_operation_poller = network_client.virtual_networks.begin_create_or_update( group_name, network_name, - { - 'location': location, - 'address_space': { - 'address_prefixes': ['10.0.0.0/16'] - } - }, + {"location": location, "address_space": {"address_prefixes": ["10.0.0.0/16"]}}, ) result_create = azure_operation_poller.result() - print("Create subnet {0}".format(subnet_name)) + print("Create subnet {0}".format(subnet_name)) async_subnet_creation = network_client.subnets.begin_create_or_update( group_name, network_name, subnet_name, { - 'address_prefix': '10.0.0.0/24', - 'delegations': [ - { - "service_name": "Microsoft.Netapp/volumes", - "name": "netAppVolumes" - } - ] - } + "address_prefix": "10.0.0.0/24", + "delegations": [{"service_name": "Microsoft.Netapp/volumes", "name": "netAppVolumes"}], + }, ) subnet_info = async_subnet_creation.result() print("\tdone") return subnet_info + class TestNetAppVolume(AzureMgmtRecordedTestCase): def setup_method(self, method): @@ -268,24 +302,20 @@ def setup_method(self, method): if self.is_live: setup.LIVE = True from azure.mgmt.network import NetworkManagementClient + self.network_client = self.create_mgmt_client(NetworkManagementClient) # Note that when tests are run in live mode it is best to run one test at a time. @recorded_by_proxy def test_create_delete_list_volume(self): - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") print("Starting test_create_delete_list_volume") try: set_bodiless_matcher() volume = create_volume( - self.client, - setup.TEST_RG, - ACCOUNT1, - setup.TEST_POOL_1, - setup.TEST_VOL_1, - vnet=setup.PERMA_VNET + self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, setup.TEST_VOL_1, vnet=setup.PERMA_VNET ) - assert volume.name == ACCOUNT1 + '/' + setup.TEST_POOL_1 + '/' + setup.TEST_VOL_1 + assert volume.name == ACCOUNT1 + "/" + setup.TEST_POOL_1 + "/" + setup.TEST_VOL_1 # check default export policy and protocol assert volume.export_policy.rules[0].nfsv3 assert not volume.export_policy.rules[0].nfsv41 @@ -308,13 +338,30 @@ def test_create_delete_list_volume(self): def test_list_volumes(self): print("Starting test_list_volumes") try: - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-") - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - volumeName2 = self.get_resource_name(setup.TEST_VOL_2+"-") - + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + volumeName2 = self.get_resource_name(setup.TEST_VOL_2 + "-") + set_bodiless_matcher() - create_volume(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET) - create_volume(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName2, setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=True) + create_volume( + self.client, + setup.TEST_RG, + ACCOUNT1, + setup.TEST_POOL_1, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + ) + create_volume( + self.client, + setup.TEST_RG, + ACCOUNT1, + setup.TEST_POOL_1, + volumeName2, + setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=True, + ) volumes = [volumeName1, volumeName2] volume_list = self.client.volumes.list(setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1) @@ -328,26 +375,22 @@ def test_list_volumes(self): delete_volume(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName2) delete_pool(self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1) delete_account(self.client, setup.TEST_RG, ACCOUNT1) - + print("Finished with test_list_volumes") @recorded_by_proxy def test_volume_replication(self): set_bodiless_matcher() print("Starting test_volume_replication") - ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1+"-b2-") - ACCOUNT2 = self.get_resource_name(setup.TEST_ACC_2+"-b2-") - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-b2-") - dbVolumeName = self.get_resource_name(setup.TEST_VOL_2+"-b2-") - + ACCOUNT1 = self.get_resource_name(setup.TEST_ACC_1 + "-b2-") + ACCOUNT2 = self.get_resource_name(setup.TEST_ACC_2 + "-b2-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-b2-") + dbVolumeName = self.get_resource_name(setup.TEST_VOL_2 + "-b2-") + try: source_volume = create_volume( - self.client, - setup.TEST_RG, - ACCOUNT1, - setup.TEST_POOL_1, - volumeName1, - vnet=setup.PERMA_VNET) + self.client, setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, vnet=setup.PERMA_VNET + ) dp_volume = create_dp_volume( self.client, source_volume, @@ -355,47 +398,122 @@ def test_volume_replication(self): ACCOUNT2, setup.TEST_POOL_2, dbVolumeName, - vnet=setup.PERMA_REMOTE_VNET) + vnet=setup.PERMA_REMOTE_VNET, + ) # sync replication print("Syncing replication") body = AuthorizeRequest(remote_volume_resource_id=dp_volume.id) - self.client.volumes.begin_authorize_replication(setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, body) - wait_for_succeeded(self.client, setup.TEST_RG, account_name=ACCOUNT1, pool_name=setup.TEST_POOL_1, volume_name=volumeName1, dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) - wait_for_replication_status(self.client, "Mirrored", dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) + self.client.volumes.begin_authorize_replication( + setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1, body + ) + wait_for_succeeded( + self.client, + setup.TEST_RG, + account_name=ACCOUNT1, + pool_name=setup.TEST_POOL_1, + volume_name=volumeName1, + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) + wait_for_replication_status( + self.client, + "Mirrored", + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) # list replications - replications = self.client.volumes.list_replications(setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1) + replications = self.client.volumes.list_replications( + setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1 + ) assert len(list(replications)) == 1 # break replication print("Breaking replication") - self.client.volumes.begin_break_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) - wait_for_replication_status(self.client, "Mirrored", dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) - wait_for_succeeded(self.client, setup.TEST_RG, account_name=ACCOUNT1, pool_name=setup.TEST_POOL_1, volume_name=volumeName1, dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) + self.client.volumes.begin_break_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) + wait_for_replication_status( + self.client, + "Mirrored", + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) + wait_for_succeeded( + self.client, + setup.TEST_RG, + account_name=ACCOUNT1, + pool_name=setup.TEST_POOL_1, + volume_name=volumeName1, + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) # resync print("Resyncing replication") - self.client.volumes.begin_resync_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) - wait_for_replication_status(self.client, "Mirrored", dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) - wait_for_succeeded(self.client, setup.TEST_RG, account_name=ACCOUNT1, pool_name=setup.TEST_POOL_1, volume_name=volumeName1, dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) + self.client.volumes.begin_resync_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) + wait_for_replication_status( + self.client, + "Mirrored", + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) + wait_for_succeeded( + self.client, + setup.TEST_RG, + account_name=ACCOUNT1, + pool_name=setup.TEST_POOL_1, + volume_name=volumeName1, + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) # break again print("Breaking replication again") - self.client.volumes.begin_break_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) - wait_for_replication_status(self.client, "Mirrored", dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) - wait_for_succeeded(self.client, setup.TEST_RG, account_name=ACCOUNT1, pool_name=setup.TEST_POOL_1, volume_name=volumeName1, dp_account_name=ACCOUNT2,dp_pool_name=setup.TEST_POOL_2, dp_volume_name=dbVolumeName) + self.client.volumes.begin_break_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) + wait_for_replication_status( + self.client, + "Mirrored", + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) + wait_for_succeeded( + self.client, + setup.TEST_RG, + account_name=ACCOUNT1, + pool_name=setup.TEST_POOL_1, + volume_name=volumeName1, + dp_account_name=ACCOUNT2, + dp_pool_name=setup.TEST_POOL_2, + dp_volume_name=dbVolumeName, + ) # delete the data protection object # - initiate delete replication on destination, this then releases on source, both resulting in object deletion print("Deleting replication") - self.client.volumes.begin_delete_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) + self.client.volumes.begin_delete_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) print("Making sure no replication is found replication") retry = 0 while retry < 10: try: - self.client.volumes.replication_status(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) + self.client.volumes.replication_status( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) except: # an exception means the replication was not found # i.e. it has been deleted @@ -416,10 +534,15 @@ def test_volume_replication(self): retry = 0 while retry < 10: source_volume = self.client.volumes.get(setup.TEST_RG, ACCOUNT1, setup.TEST_POOL_1, volumeName1) - dp_volume = self.client.volumes.get(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) - if (source_volume.provisioning_state == "Succeeded") and (dp_volume.provisioning_state == "Succeeded") and \ - (source_volume.data_protection.replication is None) and \ - (dp_volume.data_protection.replication is None): + dp_volume = self.client.volumes.get( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) + if ( + (source_volume.provisioning_state == "Succeeded") + and (dp_volume.provisioning_state == "Succeeded") + and (source_volume.data_protection.replication is None) + and (dp_volume.data_protection.replication is None) + ): break if setup.LIVE: time.sleep(10) @@ -429,11 +552,15 @@ def test_volume_replication(self): # now proceed with the delete of the volumes and tidy up resources except: if setup.LIVE: - time.sleep(10) - self.client.volumes.begin_break_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) + time.sleep(10) + self.client.volumes.begin_break_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) if setup.LIVE: - time.sleep(10) - self.client.volumes.begin_delete_replication(setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) + time.sleep(10) + self.client.volumes.begin_delete_replication( + setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName + ) finally: # delete destination volume delete_volume(self.client, setup.TEST_REPL_REMOTE_RG, ACCOUNT2, setup.TEST_POOL_2, dbVolumeName) @@ -452,15 +579,24 @@ def test_get_volume_by_name(self): set_bodiless_matcher() print("Starting test_get_volume_by_name") try: - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") - create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=True) + create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=True, + ) volume = self.client.volumes.get(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - assert volume.name == setup.PERMA_ACCOUNT + '/' + setup.PERMA_POOL + '/' + volumeName1 + assert volume.name == setup.PERMA_ACCOUNT + "/" + setup.PERMA_POOL + "/" + volumeName1 finally: delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - + print("Finished with test_get_volume_by_name") @recorded_by_proxy @@ -468,9 +604,18 @@ def test_update_volume(self): set_bodiless_matcher() print("Starting test_update_volume") try: - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - - volume = create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=True) + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + + volume = create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=True, + ) assert "Premium" == volume.service_level assert 100 * GIGABYTE == volume.usage_threshold @@ -479,37 +624,49 @@ def test_update_volume(self): creation_token=volumeName1, SERVICE_LEVEL="Premium", # cannot differ from pool location=setup.LOCATION, - subnet_id="/subscriptions/" + SUBSID + "/resourceGroups/" + setup.TEST_RG + - "/providers/Microsoft.Network/virtualNetworks/" + setup.PERMA_VNET + "/subnets/" + setup.PERMA_SUBNET, - network_features="Standard" + subnet_id="/subscriptions/" + + SUBSID + + "/resourceGroups/" + + setup.TEST_RG + + "/providers/Microsoft.Network/virtualNetworks/" + + setup.PERMA_VNET + + "/subnets/" + + setup.PERMA_SUBNET, + network_features="Standard", ) volume = self.client.volumes.begin_create_or_update( - setup.TEST_RG, - setup.PERMA_ACCOUNT, - setup.PERMA_POOL, - volumeName1, - volume_body + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, volume_body ).result() assert "Premium" == volume.service_level # unchanged assert 200 * GIGABYTE == volume.usage_threshold finally: delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - + print("Finished with test_update_volume") @recorded_by_proxy def test_patch_volume(self): set_bodiless_matcher() print("Starting test_patch_volume") - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") try: - volume = create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET) + volume = create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + ) assert "Premium" == volume.service_level assert 100 * GIGABYTE == volume.usage_threshold volume_patch = VolumePatch(usage_threshold=200 * GIGABYTE) - volume = self.client.volumes.begin_update(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, volume_patch).result() + volume = self.client.volumes.begin_update( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, volume_patch + ).result() assert "Premium" == volume.service_level assert 200 * GIGABYTE == volume.usage_threshold finally: @@ -521,13 +678,26 @@ def test_pool_change(self): set_bodiless_matcher() print("Starting test_pool_change") try: - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-") - - volume = create_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, setup.LOCATION, vnet=setup.PERMA_VNET, volume_only=True) - pool2 = create_pool(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2, setup.LOCATION, pool_only=True) + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-") + + volume = create_volume( + self.client, + setup.TEST_RG, + setup.PERMA_ACCOUNT, + setup.PERMA_POOL, + volumeName1, + setup.LOCATION, + vnet=setup.PERMA_VNET, + volume_only=True, + ) + pool2 = create_pool( + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2, setup.LOCATION, pool_only=True + ) body = PoolChangeRequest(new_pool_resource_id=pool2.id) - self.client.volumes.begin_pool_change(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, body).wait() + self.client.volumes.begin_pool_change( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, body + ).wait() wait_for_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2, volumeName1) volume = self.client.volumes.get(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2, volumeName1) assert volume.name == setup.PERMA_ACCOUNT + "/" + setup.TEST_POOL_2 + "/" + volumeName1 @@ -538,55 +708,70 @@ def test_pool_change(self): delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2, volumeName1) delete_pool(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.TEST_POOL_2) print("Finished with test_pool_change") - + @recorded_by_proxy def test_begin_populate_availability_zone(self): set_bodiless_matcher() print("Starting begin_populate_availability_zone") - - volume = self.client.volumes.begin_populate_availability_zone(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, setup.PERMA_VOLUME).result() + + volume = self.client.volumes.begin_populate_availability_zone( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, setup.PERMA_VOLUME + ).result() assert len(list(volume.zones)) > 0 print("Finished with begin_populate_availability_zone") - + @pytest.mark.skip(reason="Skipping this test for service side issue re-enable when fixed") - @recorded_by_proxy + @recorded_by_proxy def test_external_migration_volume_fails(self): set_bodiless_matcher() - print("Starting test_volume_replication") - volumeName1 = self.get_resource_name(setup.TEST_VOL_1+"-m2-") - + print("Starting test_volume_replication") + volumeName1 = self.get_resource_name(setup.TEST_VOL_1 + "-m2-") + try: migration_volume = create_migration_volume( - self.client, + self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, vnet=setup.PERMA_VNET, - volume_only=True) - + volume_only=True, + ) + # peer external replication print("Peer external replication") - body = PeerClusterForVolumeMigrationRequest(peer_ip_addresses=['0.0.0.1','0.0.0.2','0.0.0.3','0.0.0.4','0.0.0.5']) + body = PeerClusterForVolumeMigrationRequest( + peer_ip_addresses=["0.0.0.1", "0.0.0.2", "0.0.0.3", "0.0.0.4", "0.0.0.5"] + ) try: - self.client.volumes.begin_peer_external_cluster(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, body) + self.client.volumes.begin_peer_external_cluster( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1, body + ) except Exception as e: assert str(e).startswith("(Something unexpected occurred)") try: - self.client.volumes.begin_authorize_external_replication(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - except Exception as e: #ExternalClusterPeerMissing + self.client.volumes.begin_authorize_external_replication( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) + except Exception as e: # ExternalClusterPeerMissing assert str(e).startswith("(Cluster peer targeting)") try: - self.client.volumes.begin_perform_replication_transfer(setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - except Exception as e: #VolumeReplicationHasNotBeenCreated - assert str(e).startswith("(This operation cannot be performed since the replication setup has not been completed)") + self.client.volumes.begin_perform_replication_transfer( + setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) + except Exception as e: # VolumeReplicationHasNotBeenCreated + assert str(e).startswith( + "(This operation cannot be performed since the replication setup has not been completed)" + ) try: - self.client.volumes.begin_finalize_relocation(setup.TEST_RG, PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) - except Exception as e: # VolumeReplicationMissingFor + self.client.volumes.begin_finalize_relocation( + setup.TEST_RG, PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1 + ) + except Exception as e: # VolumeReplicationMissingFor assert str(e).startswith("(Volume Replication was not found for volume:)") # now proceed with the delete of the volumes and tidy up resources @@ -595,4 +780,3 @@ def test_external_migration_volume_fails(self): delete_volume(self.client, setup.TEST_RG, setup.PERMA_ACCOUNT, setup.PERMA_POOL, volumeName1) print("Finished with external_migration_volume_fails") -