From 2ca0b6faf470130a92df6b31b431c31c10d4dfd0 Mon Sep 17 00:00:00 2001 From: vincenttran-msft <101599632+vincenttran-msft@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:29:50 -0700 Subject: [PATCH] [Storage] STG94 GA API View Feedback (#36208) --- sdk/storage/azure-storage-file-share/CHANGELOG.md | 1 - .../azure/storage/fileshare/_models.py | 2 +- .../azure/storage/fileshare/_share_client.py | 3 --- .../azure/storage/fileshare/aio/_share_client_async.py | 3 --- sdk/storage/azure-storage-file-share/tests/test_share.py | 2 +- sdk/storage/azure-storage-file-share/tests/test_share_async.py | 2 +- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index b252614ef734..bb4c132b16c9 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -8,7 +8,6 @@ ## 12.17.0b1 (2024-06-11) ### Features Added -- Added `enable_snapshot_virtual_directory_access` parameter support for NFS shares on premium-tier Storage accounts. - Added a more descriptive authorization error message when facing authorization errors. ## 12.16.0 (2024-05-07) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py index 141de2b503f6..364a53ecd5d0 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py @@ -343,7 +343,7 @@ class ShareProperties(DictMixin): Indicates the protocols enabled on the share. The protocol can be either SMB or NFS. :ivar bool enable_snapshot_virtual_directory_access: Specifies whether the snapshot virtual directory should be accessible at the root of the share - mount point when NFS is enabled. if not specified, the default is True. + mount point when NFS is enabled. If not specified, it will be accessible. """ def __init__(self, **kwargs): diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py index 47750688b0dc..a0b9e7a8583a 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py @@ -374,9 +374,6 @@ def create_share(self, **kwargs): Root squash to set on the share. Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash - :keyword bool enable_snapshot_virtual_directory_access: - Specifies whether the snapshot virtual directory should be accessible at the root of the share - mount point when NFS is enabled. Default value is True. :returns: Share-updated property dict (Etag and last modified). :rtype: Dict[str, Any] diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py index 4028c7fb3b79..1ef7acec8780 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py @@ -223,9 +223,6 @@ async def create_share(self, **kwargs): Root squash to set on the share. Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash - :keyword bool enable_snapshot_virtual_directory_access: - Specifies whether the snapshot virtual directory should be accessible at the root of the share - mount point when NFS is enabled. Default value is True. :returns: Share-updated property dict (Etag and last modified). :rtype: Dict[str, Any] diff --git a/sdk/storage/azure-storage-file-share/tests/test_share.py b/sdk/storage/azure-storage-file-share/tests/test_share.py index 185d61f23d62..56e60b7f893b 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share.py @@ -759,7 +759,7 @@ def test_list_shares_enable_snapshot_virtual_directory_access(self, **kwargs): premium_storage_file_account_key = kwargs.pop("premium_storage_file_account_key") self._setup(premium_storage_file_account_name, premium_storage_file_account_key) - share = self._create_share(protocols="NFS", enable_snapshot_virtual_directory_access=False) + share = self._create_share(protocols="NFS", headers={'x-ms-enable-snapshot-virtual-directory-access': "False"}) # Act list_props = list(self.fsc.list_shares()) diff --git a/sdk/storage/azure-storage-file-share/tests/test_share_async.py b/sdk/storage/azure-storage-file-share/tests/test_share_async.py index 2d12b853ab52..5722839303cf 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share_async.py @@ -756,7 +756,7 @@ async def test_list_shares_enable_snapshot_virtual_directory_access(self, **kwar premium_storage_file_account_key = kwargs.pop("premium_storage_file_account_key") self._setup(premium_storage_file_account_name, premium_storage_file_account_key) - share = await self._create_share(protocols="NFS", enable_snapshot_virtual_directory_access=False) + share = await self._create_share(protocols="NFS", headers={'x-ms-enable-snapshot-virtual-directory-access': "False"}) # Act list_props = []