From 9b02e5c519abee758743f420b395143986024abe Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Tue, 15 Sep 2020 16:04:49 -0700 Subject: [PATCH 1/8] added smb multichannel feature --- .../azure/storage/fileshare/_models.py | 11 +++++++++++ .../azure/storage/fileshare/_share_service_client.py | 8 +++++++- .../fileshare/aio/_share_service_client_async.py | 8 +++++++- 3 files changed, 25 insertions(+), 2 deletions(-) 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 2d348d67d43a..2272ded52f1f 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 @@ -14,6 +14,7 @@ from ._generated.models import Metrics as GeneratedMetrics from ._generated.models import RetentionPolicy as GeneratedRetentionPolicy from ._generated.models import CorsRule as GeneratedCorsRule +from ._generated.models import ProtocolSettings as GeneratedProtocolSettings from ._generated.models import AccessPolicy as GenAccessPolicy from ._generated.models import DirectoryItem @@ -134,6 +135,16 @@ def _from_generated(cls, generated): ) +class ProtocolProperties(GeneratedProtocolSettings): + def __init__(self, smb_settings=None): + self.smb_settings = smb_settings + + @classmethod + def _from_generated(cls, generated): + return cls( + smb_settings=generated.smb_settings) + + class AccessPolicy(GenAccessPolicy): """Access Policy class used by the set and get acl methods in each service. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index 549e09f62965..5f30729ae100 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -35,6 +35,7 @@ ShareProperties, Metrics, CorsRule, + ProtocolProperties ) @@ -169,6 +170,7 @@ def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] + protocol_settings=None, # type: Optional[ProtocolProperties], **kwargs ): # type: (...) -> None @@ -189,6 +191,9 @@ def set_service_properties( list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) + :param protocol_settings: + Sets protocol settings + :type protocol_settings: ~azure.storage.fileshare.ProtocolProperties :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -206,7 +211,8 @@ def set_service_properties( props = StorageServiceProperties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, - cors=cors + cors=cors, + protocol_settings=protocol_settings ) try: self._client.service.set_properties(props, timeout=timeout, **kwargs) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py index 2ee8390932f4..1d39e72ceeb3 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py @@ -34,6 +34,7 @@ ShareProperties, Metrics, CorsRule, + ProtocolProperties, ) @@ -124,6 +125,7 @@ async def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] + protocol_settings=None, # type: Optional[ProtocolProperties], **kwargs ): # type: (...) -> None @@ -144,6 +146,9 @@ async def set_service_properties( list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) + :param protocol_settings: + Sets protocol settings + :type protocol_settings: ~azure.storage.fileshare.ProtocolProperties :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -161,7 +166,8 @@ async def set_service_properties( props = StorageServiceProperties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, - cors=cors + cors=cors, + protocol_settings=protocol_settings ) try: await self._client.service.set_properties(props, timeout=timeout, **kwargs) From 9a89473993d07d50bdec5e3c9b9f0fde58a77baf Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Tue, 15 Sep 2020 16:36:06 -0700 Subject: [PATCH 2/8] added protocol properties to desarialize --- .../azure/storage/fileshare/_models.py | 5 +++++ 1 file changed, 5 insertions(+) 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 2272ded52f1f..c69a6591c0f2 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 @@ -136,6 +136,10 @@ def _from_generated(cls, generated): class ProtocolProperties(GeneratedProtocolSettings): + """Protocol Properties class used by the set and get service properties methods in the share service. + + Contains protocol properties of the share service such as the SMB setting of the share service. + """ def __init__(self, smb_settings=None): self.smb_settings = smb_settings @@ -933,4 +937,5 @@ def service_properties_deserialize(generated): 'hour_metrics': Metrics._from_generated(generated.hour_metrics), # pylint: disable=protected-access 'minute_metrics': Metrics._from_generated(generated.minute_metrics), # pylint: disable=protected-access 'cors': [CorsRule._from_generated(cors) for cors in generated.cors], # pylint: disable=protected-access + 'protocol_settings': ProtocolProperties._from_generated(generated.protocol_settings), # pylint: disable=protected-access } From ae33c010afa7dc17093479d39f36211ae64ffd60 Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Wed, 16 Sep 2020 16:59:20 -0700 Subject: [PATCH 3/8] added two more classes --- .../azure/storage/fileshare/_models.py | 24 ++++++++++++++----- .../fileshare/_share_service_client.py | 6 ++--- 2 files changed, 21 insertions(+), 9 deletions(-) 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 c69a6591c0f2..83cfce2752cd 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 @@ -15,6 +15,8 @@ from ._generated.models import RetentionPolicy as GeneratedRetentionPolicy from ._generated.models import CorsRule as GeneratedCorsRule from ._generated.models import ProtocolSettings as GeneratedProtocolSettings +from ._generated.models import SmbSettings as GeneratedSmbSettings +from ._generated.models import SmbMultichannel as GeneratedSmbMultichannel from ._generated.models import AccessPolicy as GenAccessPolicy from ._generated.models import DirectoryItem @@ -135,18 +137,28 @@ def _from_generated(cls, generated): ) -class ProtocolProperties(GeneratedProtocolSettings): - """Protocol Properties class used by the set and get service properties methods in the share service. +class SmbSettings(GeneratedSmbSettings): + def __init__(self, multichannel): + self.multichannel = multichannel + + +class SmbMultichannel(GeneratedSmbMultichannel): + def __init__(self, enabled): + self.enabled = enabled + + +class ProtocolSettings(GeneratedProtocolSettings): + """Protocol Settings class used by the set and get service properties methods in the share service. Contains protocol properties of the share service such as the SMB setting of the share service. """ - def __init__(self, smb_settings=None): - self.smb_settings = smb_settings + def __init__(self, smb): + self.smb = smb @classmethod def _from_generated(cls, generated): return cls( - smb_settings=generated.smb_settings) + smb=generated.smb_settings) class AccessPolicy(GenAccessPolicy): @@ -937,5 +949,5 @@ def service_properties_deserialize(generated): 'hour_metrics': Metrics._from_generated(generated.hour_metrics), # pylint: disable=protected-access 'minute_metrics': Metrics._from_generated(generated.minute_metrics), # pylint: disable=protected-access 'cors': [CorsRule._from_generated(cors) for cors in generated.cors], # pylint: disable=protected-access - 'protocol_settings': ProtocolProperties._from_generated(generated.protocol_settings), # pylint: disable=protected-access + 'protocol_settings': ProtocolSettings._from_generated(generated.protocol_settings), # pylint: disable=protected-access } diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index 5f30729ae100..ea4a3a60b6a7 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -170,7 +170,7 @@ def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol_settings=None, # type: Optional[ProtocolProperties], + protocol=None, # type: Optional[ProtocolProperties], **kwargs ): # type: (...) -> None @@ -193,7 +193,7 @@ def set_service_properties( :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) :param protocol_settings: Sets protocol settings - :type protocol_settings: ~azure.storage.fileshare.ProtocolProperties + :type protocol: ~azure.storage.fileshare.ProtocolProperties :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -212,7 +212,7 @@ def set_service_properties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, - protocol_settings=protocol_settings + protocol_settings=protocol ) try: self._client.service.set_properties(props, timeout=timeout, **kwargs) From 7cc8adf0741aa29b7f86964bda38b410b06aa2cf Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Wed, 16 Sep 2020 17:06:45 -0700 Subject: [PATCH 4/8] better docstrings --- .../azure/storage/fileshare/_models.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 83cfce2752cd..556ae4f45980 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 @@ -138,11 +138,19 @@ def _from_generated(cls, generated): class SmbSettings(GeneratedSmbSettings): + """ Settings for the SMB protocol. + + :param SmbMultichannel multichannel: Required. Sets the multichannel settings. + """ def __init__(self, multichannel): self.multichannel = multichannel class SmbMultichannel(GeneratedSmbMultichannel): + """ Settings for Multichannel. + + :param bool enabled: Required. If SMB Multichannel is enabled. + """ def __init__(self, enabled): self.enabled = enabled From cfb8bcbdca5ff83d11be0473cfa4b0bd96cd1905 Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Thu, 17 Sep 2020 07:27:04 -0700 Subject: [PATCH 5/8] added test and everything is working --- .../azure/storage/fileshare/__init__.py | 6 + .../azure/storage/fileshare/_models.py | 8 +- .../fileshare/_share_service_client.py | 8 +- ...operties.test_file_service_properties.yaml | 104 +++++++++++++++--- .../tests/test_file_service_properties.py | 15 ++- 5 files changed, 117 insertions(+), 24 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py index 3266ae2ad6c9..a8911624ffff 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py @@ -25,6 +25,9 @@ Metrics, RetentionPolicy, CorsRule, + SmbSettings, + SmbMultichannel, + ProtocolSettings, AccessPolicy, FileSasPermissions, ShareSasPermissions, @@ -52,6 +55,9 @@ 'Metrics', 'RetentionPolicy', 'CorsRule', + 'SmbSettings', + 'SmbMultichannel', + 'ProtocolSettings', 'AccessPolicy', 'FileSasPermissions', 'ShareSasPermissions', 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 556ae4f45980..2d44bf76ea61 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 @@ -159,14 +159,16 @@ class ProtocolSettings(GeneratedProtocolSettings): """Protocol Settings class used by the set and get service properties methods in the share service. Contains protocol properties of the share service such as the SMB setting of the share service. + + :param SmbSettings smb_settings: Required. Sets SMB settings. """ - def __init__(self, smb): - self.smb = smb + def __init__(self, smb_settings): + self.smb_settings = smb_settings @classmethod def _from_generated(cls, generated): return cls( - smb=generated.smb_settings) + smb_settings=generated.smb_settings) class AccessPolicy(GenAccessPolicy): diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index ea4a3a60b6a7..a5f24569678c 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -35,7 +35,7 @@ ShareProperties, Metrics, CorsRule, - ProtocolProperties + ProtocolSettings ) @@ -170,7 +170,7 @@ def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol=None, # type: Optional[ProtocolProperties], + protocol=None, # type: Optional[ProtocolSettings], **kwargs ): # type: (...) -> None @@ -193,7 +193,7 @@ def set_service_properties( :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) :param protocol_settings: Sets protocol settings - :type protocol: ~azure.storage.fileshare.ProtocolProperties + :type protocol: ~azure.storage.fileshare.ProtocolSettings :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -215,7 +215,7 @@ def set_service_properties( protocol_settings=protocol ) try: - self._client.service.set_properties(props, timeout=timeout, **kwargs) + self._client.service.set_properties(storage_service_properties=props, timeout=timeout, **kwargs) except StorageErrorException as error: process_storage_error(error) diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml index 9661f7b7229d..7f98111f2141 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml @@ -3,7 +3,7 @@ interactions: body: ' 1.0falsefalse1.0falsefalse' + />false' headers: Accept: - '*/*' @@ -12,29 +12,103 @@ interactions: Connection: - keep-alive Content-Length: - - '368' + - '469' Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:14 GMT + - Thu, 17 Sep 2020 14:26:01 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: - - '0' date: - - Wed, 15 Jan 2020 23:51:14 GMT + - Thu, 17 Sep 2020 14:26:01 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-02-10' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Sep 2020 14:26:02 GMT + x-ms-version: + - '2020-02-10' + method: GET + uri: https://storagename.file.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalse1.0falsefalsefalse" + headers: + content-type: + - application/xml + date: + - Thu, 17 Sep 2020 14:26:01 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-02-10' + status: + code: 200 + message: OK +- request: + body: ' + + 1.0falsefalse1.0falsefalsetrue' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '468' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Sep 2020 14:26:02 GMT + x-ms-version: + - '2020-02-10' + method: PUT + uri: https://storagename.file.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: + - Thu, 17 Sep 2020 14:26:01 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 202 message: Accepted @@ -48,28 +122,28 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:15 GMT + - Thu, 17 Sep 2020 14:26:02 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0falsefalse1.0falsefalse" + />true" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:14 GMT + - Thu, 17 Sep 2020 14:26:01 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py index af540fe39b59..121778d57e07 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py @@ -14,6 +14,9 @@ Metrics, CorsRule, RetentionPolicy, + SmbSettings, + SmbMultichannel, + ProtocolSettings, ) from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -75,16 +78,24 @@ def _assert_retention_equal(self, ret1, ret2): def test_file_service_properties(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) + protocol_properties1 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=False))) + protocol_properties2 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=True))) # Act resp = self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) - + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties1) # Assert self.assertIsNone(resp) props = self.fsc.get_service_properties() self._assert_metrics_equal(props['hour_metrics'], Metrics()) self._assert_metrics_equal(props['minute_metrics'], Metrics()) self._assert_cors_equal(props['cors'], list()) + self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, False) + + # Act + self.fsc.set_service_properties( + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties2) + props = self.fsc.get_service_properties() + self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, True) # --Test cases per feature --------------------------------------- @GlobalStorageAccountPreparer() From dc3282a5dfb8be579194ea988c1dddbde18f1308 Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Thu, 17 Sep 2020 07:40:54 -0700 Subject: [PATCH 6/8] added async --- .../fileshare/_share_service_client.py | 4 +- .../aio/_share_service_client_async.py | 4 +- ...operties.test_file_service_properties.yaml | 16 +-- ...nc.test_file_service_properties_async.yaml | 103 +++++++++++++----- .../tests/test_file_service_properties.py | 4 +- .../test_file_service_properties_async.py | 14 ++- 6 files changed, 100 insertions(+), 45 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index a5f24569678c..6cb960ef4e7b 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -170,7 +170,7 @@ def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol=None, # type: Optional[ProtocolSettings], + protocol_settings=None, # type: Optional[ProtocolSettings], **kwargs ): # type: (...) -> None @@ -212,7 +212,7 @@ def set_service_properties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, - protocol_settings=protocol + protocol_settings=protocol_settings ) try: self._client.service.set_properties(storage_service_properties=props, timeout=timeout, **kwargs) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py index 1d39e72ceeb3..b8f5c640a07f 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py @@ -34,7 +34,7 @@ ShareProperties, Metrics, CorsRule, - ProtocolProperties, + ProtocolSettings, ) @@ -125,7 +125,7 @@ async def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol_settings=None, # type: Optional[ProtocolProperties], + protocol_settings=None, # type: Optional[ProtocolSettings], **kwargs ): # type: (...) -> None diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml index 7f98111f2141..3484d11380e6 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml @@ -18,7 +18,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:26:01 GMT + - Thu, 17 Sep 2020 14:40:29 GMT x-ms-version: - '2020-02-10' method: PUT @@ -28,7 +28,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 14:26:01 GMT + - Thu, 17 Sep 2020 14:40:29 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,7 +50,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:26:02 GMT + - Thu, 17 Sep 2020 14:40:30 GMT x-ms-version: - '2020-02-10' method: GET @@ -63,7 +63,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 14:26:01 GMT + - Thu, 17 Sep 2020 14:40:29 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -92,7 +92,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:26:02 GMT + - Thu, 17 Sep 2020 14:40:30 GMT x-ms-version: - '2020-02-10' method: PUT @@ -102,7 +102,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 14:26:01 GMT + - Thu, 17 Sep 2020 14:40:29 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -124,7 +124,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:26:02 GMT + - Thu, 17 Sep 2020 14:40:31 GMT x-ms-version: - '2020-02-10' method: GET @@ -137,7 +137,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 14:26:01 GMT + - Thu, 17 Sep 2020 14:40:29 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml index 56791da59694..9d3cc0f52c2d 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml @@ -3,71 +3,114 @@ interactions: body: ' 1.0falsefalse1.0falsefalse' + />false' headers: Content-Length: - - '368' + - '469' Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:19 GMT + - Thu, 17 Sep 2020 14:40:44 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: '0' - date: Wed, 15 Jan 2020 23:51:19 GMT + date: Thu, 17 Sep 2020 14:40:43 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-02-02' + transfer-encoding: chunked + x-ms-version: '2020-02-10' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Sep 2020 14:40:45 GMT + x-ms-version: + - '2020-02-10' + method: GET + uri: https://storagename.file.core.windows.net/?restype=service&comp=properties + response: + body: + string: "\uFEFF1.0falsefalse1.0falsefalsefalse" + headers: + content-type: application/xml + date: Thu, 17 Sep 2020 14:40:43 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-02-10' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties +- request: + body: ' + + 1.0falsefalse1.0falsefalsetrue' + headers: + Content-Length: + - '468' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 17 Sep 2020 14:40:45 GMT + x-ms-version: + - '2020-02-10' + method: PUT + uri: https://storagename.file.core.windows.net/?restype=service&comp=properties + response: + body: + string: '' + headers: + date: Thu, 17 Sep 2020 14:40:43 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-02-10' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:20 GMT + - Thu, 17 Sep 2020 14:40:45 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0falsefalse1.0falsefalse" + />true" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:20 GMT + date: Thu, 17 Sep 2020 14:40:43 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py index 121778d57e07..0059e42d4a0d 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py @@ -82,7 +82,7 @@ def test_file_service_properties(self, resource_group, location, storage_account protocol_properties2 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=True))) # Act resp = self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties1) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties1) # Assert self.assertIsNone(resp) props = self.fsc.get_service_properties() @@ -93,7 +93,7 @@ def test_file_service_properties(self, resource_group, location, storage_account # Act self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties2) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties2) props = self.fsc.get_service_properties() self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, True) diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py index a38231090d77..5045f670c6d7 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py @@ -15,6 +15,9 @@ Metrics, CorsRule, RetentionPolicy, + ProtocolSettings, + SmbMultichannel, + SmbSettings, ) from azure.storage.fileshare.aio import ShareServiceClient from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -85,10 +88,12 @@ def _assert_retention_equal(self, ret1, ret2): @AsyncStorageTestCase.await_prepared_test async def test_file_service_properties_async(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) + protocol_properties1 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=False))) + protocol_properties2 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=True))) # Act resp = await self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list()) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties1) # Assert self.assertIsNone(resp) @@ -96,6 +101,13 @@ async def test_file_service_properties_async(self, resource_group, location, sto self._assert_metrics_equal(props['hour_metrics'], Metrics()) self._assert_metrics_equal(props['minute_metrics'], Metrics()) self._assert_cors_equal(props['cors'], list()) + self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, False) + + # Act + await self.fsc.set_service_properties( + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties2) + props = await self.fsc.get_service_properties() + self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, True) # --Test cases per feature --------------------------------------- @GlobalStorageAccountPreparer() From 487ae6de7f273d2eaee36c4d9f3ccfeafc9d8435 Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Thu, 17 Sep 2020 10:20:42 -0700 Subject: [PATCH 7/8] passing tests --- ...st_file_client.test_user_agent_append.yaml | 17 ++++--- ...st_file_client.test_user_agent_custom.yaml | 33 +++++++------ ...t_file_client.test_user_agent_default.yaml | 16 +++--- ...nt_async.test_user_agent_append_async.yaml | 25 ++++------ ...nt_async.test_user_agent_custom_async.yaml | 49 +++++++------------ ...t_async.test_user_agent_default_async.yaml | 24 ++++----- ...operties.test_file_service_properties.yaml | 20 +++++--- ...file_service_properties.test_set_cors.yaml | 26 +++++----- ...vice_properties.test_set_hour_metrics.yaml | 26 +++++----- ...ce_properties.test_set_minute_metrics.yaml | 26 +++++----- ...e_properties.test_too_many_cors_rules.yaml | 12 ++--- ...nc.test_file_service_properties_async.yaml | 16 +++--- ..._properties_async.test_set_cors_async.yaml | 43 ++++++---------- ...ies_async.test_set_hour_metrics_async.yaml | 43 ++++++---------- ...s_async.test_set_minute_metrics_async.yaml | 43 ++++++---------- ..._async.test_too_many_cors_rules_async.yaml | 21 +++----- 16 files changed, 188 insertions(+), 252 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml index 680a67b9fb38..668c4b54804c 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml @@ -9,29 +9,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) - customer_user_agent + - customer_user_agent azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:32 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:31 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml index 88668b5d8077..f6a49d289bc5 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml @@ -9,28 +9,30 @@ interactions: Connection: - keep-alive User-Agent: - - TestApp/v1.0 azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:33 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:32 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK @@ -44,28 +46,31 @@ interactions: Connection: - keep-alive User-Agent: - - TestApp/v2.0 azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 + (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:34 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:32 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml index 8cc459694ab0..25d6488c3347 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml @@ -9,28 +9,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:34 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:11 GMT + - Thu, 17 Sep 2020 17:18:33 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml index 587b007fab9e..f34724b2adb5 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml @@ -5,33 +5,26 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) - customer_user_agent + - customer_user_agent azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:13 GMT + - Thu, 17 Sep 2020 17:18:41 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:12 GMT + date: Thu, 17 Sep 2020 17:18:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seanmcccanary3.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml index df949c5be398..25802cabe4c4 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml @@ -5,66 +5,55 @@ interactions: Accept: - application/xml User-Agent: - - TestApp/v1.0 azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:13 GMT + - Thu, 17 Sep 2020 17:18:41 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:12 GMT + date: Thu, 17 Sep 2020 17:18:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seanmcccanary3.file.core.windows.net/?restype=service&comp=properties - request: body: null headers: Accept: - application/xml User-Agent: - - TestApp/v2.0 azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 + (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:13 GMT + - Thu, 17 Sep 2020 17:18:41 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:12 GMT + date: Thu, 17 Sep 2020 17:18:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seanmcccanary3.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml index 14350dd64ec5..a0af5136e4af 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml @@ -5,32 +5,26 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:13 GMT + - Thu, 17 Sep 2020 17:18:42 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: - string: "\uFEFF1.0truetruetrue71.0falsefalse" + string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:14 GMT + date: Thu, 17 Sep 2020 17:18:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seanmcccanary3.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml index 3484d11380e6..77f23e95958e 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml @@ -18,7 +18,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:29 GMT + - Thu, 17 Sep 2020 17:19:36 GMT x-ms-version: - '2020-02-10' method: PUT @@ -28,7 +28,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 14:40:29 GMT + - Thu, 17 Sep 2020 17:19:36 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,7 +50,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:30 GMT + - Thu, 17 Sep 2020 17:19:37 GMT x-ms-version: - '2020-02-10' method: GET @@ -63,11 +63,13 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 14:40:29 GMT + - Thu, 17 Sep 2020 17:19:36 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - '2020-02-10' status: @@ -92,7 +94,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:30 GMT + - Thu, 17 Sep 2020 17:19:37 GMT x-ms-version: - '2020-02-10' method: PUT @@ -102,7 +104,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 14:40:29 GMT + - Thu, 17 Sep 2020 17:19:36 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -124,7 +126,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:31 GMT + - Thu, 17 Sep 2020 17:19:37 GMT x-ms-version: - '2020-02-10' method: GET @@ -137,11 +139,13 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 14:40:29 GMT + - Thu, 17 Sep 2020 17:19:36 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - '2020-02-10' status: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml index 7aa701e4ef79..91758e790171 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml @@ -16,25 +16,25 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:15 GMT + - Thu, 17 Sep 2020 17:19:38 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: - - '0' date: - - Wed, 15 Jan 2020 23:51:15 GMT + - Thu, 17 Sep 2020 17:19:40 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 202 message: Accepted @@ -48,22 +48,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:16 GMT + - Thu, 17 Sep 2020 17:19:41 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0falsefalse1.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:15 GMT + - Thu, 17 Sep 2020 17:19:40 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -71,7 +71,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml index 959cebe114be..08b9ee6d9948 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml @@ -15,25 +15,25 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:16 GMT + - Thu, 17 Sep 2020 17:19:41 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: - - '0' date: - - Wed, 15 Jan 2020 23:51:17 GMT + - Thu, 17 Sep 2020 17:19:42 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 202 message: Accepted @@ -47,22 +47,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:17 GMT + - Thu, 17 Sep 2020 17:19:44 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:17 GMT + - Thu, 17 Sep 2020 17:19:42 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -70,7 +70,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml index c8886063fc24..dbf96f07169a 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml @@ -15,25 +15,25 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:17 GMT + - Thu, 17 Sep 2020 17:19:44 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: - - '0' date: - - Wed, 15 Jan 2020 23:51:17 GMT + - Thu, 17 Sep 2020 17:19:44 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 202 message: Accepted @@ -47,22 +47,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:18 GMT + - Thu, 17 Sep 2020 17:19:45 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:18 GMT + - Thu, 17 Sep 2020 17:19:44 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -70,7 +70,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml index f923e3d8b690..cd70dd61c7c6 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml @@ -21,17 +21,17 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:18 GMT + - Thu, 17 Sep 2020 17:19:45 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFFInvalidXmlDocumentXML - specified is not syntactically valid.\nRequestId:bf9fc971-701a-0071-0bfe-cb90ac000000\nTime:2020-01-15T23:51:19.3215206Z0000" headers: content-length: @@ -39,13 +39,13 @@ interactions: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:51:18 GMT + - Thu, 17 Sep 2020 17:19:44 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: - InvalidXmlDocument x-ms-version: - - '2019-02-02' + - '2020-02-10' status: code: 400 message: XML specified is not syntactically valid. diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml index 9d3cc0f52c2d..19c7d754ef2d 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml @@ -12,7 +12,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:44 GMT + - Thu, 17 Sep 2020 17:18:19 GMT x-ms-version: - '2020-02-10' method: PUT @@ -21,7 +21,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 14:40:43 GMT + date: Thu, 17 Sep 2020 17:18:18 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -37,7 +37,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:45 GMT + - Thu, 17 Sep 2020 17:18:20 GMT x-ms-version: - '2020-02-10' method: GET @@ -48,7 +48,7 @@ interactions: />false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 14:40:43 GMT + date: Thu, 17 Sep 2020 17:18:18 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -69,7 +69,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:45 GMT + - Thu, 17 Sep 2020 17:18:20 GMT x-ms-version: - '2020-02-10' method: PUT @@ -78,7 +78,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 14:40:43 GMT + date: Thu, 17 Sep 2020 17:18:18 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -94,7 +94,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 14:40:45 GMT + - Thu, 17 Sep 2020 17:18:20 GMT x-ms-version: - '2020-02-10' method: GET @@ -105,7 +105,7 @@ interactions: />true" headers: content-type: application/xml - date: Thu, 17 Sep 2020 14:40:43 GMT + date: Thu, 17 Sep 2020 17:18:18 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml index f00a6cea78b6..2d47103d94a5 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml @@ -10,65 +10,50 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:20 GMT + - Thu, 17 Sep 2020 17:18:20 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: '0' - date: Wed, 15 Jan 2020 23:51:20 GMT + date: Thu, 17 Sep 2020 17:18:19 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-02-02' + transfer-encoding: chunked + x-ms-version: '2020-02-10' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:21 GMT + - Thu, 17 Sep 2020 17:18:21 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0falsefalse1.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:20 GMT + date: Thu, 17 Sep 2020 17:18:19 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - vary: Origin - x-ms-version: '2019-02-02' + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml index 54cfd749208e..53b8cd47bd05 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml @@ -9,65 +9,50 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:21 GMT + - Thu, 17 Sep 2020 17:18:21 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: '0' - date: Wed, 15 Jan 2020 23:51:21 GMT + date: Thu, 17 Sep 2020 17:18:21 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-02-02' + transfer-encoding: chunked + x-ms-version: '2020-02-10' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:22 GMT + - Thu, 17 Sep 2020 17:18:22 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0truetruetrue51.0falsefalseGETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:21 GMT + date: Thu, 17 Sep 2020 17:18:21 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - vary: Origin - x-ms-version: '2019-02-02' + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml index 98b6fab23dbc..c4c1924d0e2b 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml @@ -9,65 +9,50 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:22 GMT + - Thu, 17 Sep 2020 17:18:22 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: '' headers: - content-length: '0' - date: Wed, 15 Jan 2020 23:51:22 GMT + date: Thu, 17 Sep 2020 17:18:20 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-02-02' + transfer-encoding: chunked + x-ms-version: '2020-02-10' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:22 GMT + - Thu, 17 Sep 2020 17:18:22 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: GET uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFF1.0truetruetrue51.0truetruetrue5GETwww.xyz.com0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500" + />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Wed, 15 Jan 2020 23:51:22 GMT + date: Thu, 17 Sep 2020 17:18:21 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - vary: Origin - x-ms-version: '2019-02-02' + x-ms-version: '2020-02-10' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml index a8cbe6c69a78..3d5ea5eab3fe 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml @@ -15,34 +15,27 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-file-share/12.0.1 Python/3.7.3 (Windows-10-10.0.17763-SP0) + - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:51:23 GMT + - Thu, 17 Sep 2020 17:18:22 GMT x-ms-version: - - '2019-02-02' + - '2020-02-10' method: PUT uri: https://storagename.file.core.windows.net/?restype=service&comp=properties response: body: string: "\uFEFFInvalidXmlDocumentXML - specified is not syntactically valid.\nRequestId:92094185-001a-0057-77fe-cb0b18000000\nTime:2020-01-15T23:51:23.3058154Z0000" headers: content-length: '294' content-type: application/xml - date: Wed, 15 Jan 2020 23:51:22 GMT + date: Thu, 17 Sep 2020 17:18:21 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: InvalidXmlDocument - x-ms-version: '2019-02-02' + x-ms-version: '2020-02-10' status: code: 400 message: XML specified is not syntactically valid. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage43x4qoc3y4bx.file.core.windows.net - - / - - restype=service&comp=properties - - '' + url: https://seancanarypremiumfile.file.core.windows.net/?restype=service&comp=properties version: 1 From 60f46d8a62bfe9362333a4b7d30513fcabfbbdbb Mon Sep 17 00:00:00 2001 From: Tamer Sherif Date: Thu, 17 Sep 2020 18:55:40 -0700 Subject: [PATCH 8/8] fixed var names --- .../azure/storage/fileshare/__init__.py | 8 ++++---- .../azure/storage/fileshare/_models.py | 18 +++++++++--------- .../storage/fileshare/_share_service_client.py | 10 +++++----- .../aio/_share_service_client_async.py | 8 ++++---- ...est_file_client.test_user_agent_append.yaml | 4 ++-- ...est_file_client.test_user_agent_custom.yaml | 8 ++++---- ...st_file_client.test_user_agent_default.yaml | 4 ++-- ...ent_async.test_user_agent_append_async.yaml | 4 ++-- ...ent_async.test_user_agent_custom_async.yaml | 8 ++++---- ...nt_async.test_user_agent_default_async.yaml | 4 ++-- ...roperties.test_file_service_properties.yaml | 16 ++++++++-------- ...ync.test_file_service_properties_async.yaml | 18 ++++++++++-------- ...e_properties_async.test_set_cors_async.yaml | 9 +++++---- ...ties_async.test_set_hour_metrics_async.yaml | 9 +++++---- ...es_async.test_set_minute_metrics_async.yaml | 9 +++++---- ...s_async.test_too_many_cors_rules_async.yaml | 6 +++--- .../tests/test_file_service_properties.py | 16 ++++++++-------- .../test_file_service_properties_async.py | 16 ++++++++-------- 18 files changed, 90 insertions(+), 85 deletions(-) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py index a8911624ffff..7c838c1d1707 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py @@ -25,9 +25,9 @@ Metrics, RetentionPolicy, CorsRule, - SmbSettings, + ShareSmbSettings, SmbMultichannel, - ProtocolSettings, + ShareProtocolSettings, AccessPolicy, FileSasPermissions, ShareSasPermissions, @@ -55,9 +55,9 @@ 'Metrics', 'RetentionPolicy', 'CorsRule', - 'SmbSettings', + 'ShareSmbSettings', 'SmbMultichannel', - 'ProtocolSettings', + 'ShareProtocolSettings', 'AccessPolicy', 'FileSasPermissions', 'ShareSasPermissions', 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 2d44bf76ea61..4df12dea8de8 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 @@ -14,8 +14,8 @@ from ._generated.models import Metrics as GeneratedMetrics from ._generated.models import RetentionPolicy as GeneratedRetentionPolicy from ._generated.models import CorsRule as GeneratedCorsRule -from ._generated.models import ProtocolSettings as GeneratedProtocolSettings -from ._generated.models import SmbSettings as GeneratedSmbSettings +from ._generated.models import ShareProtocolSettings as GeneratedShareProtocolSettings +from ._generated.models import ShareSmbSettings as GeneratedShareSmbSettings from ._generated.models import SmbMultichannel as GeneratedSmbMultichannel from ._generated.models import AccessPolicy as GenAccessPolicy from ._generated.models import DirectoryItem @@ -137,7 +137,7 @@ def _from_generated(cls, generated): ) -class SmbSettings(GeneratedSmbSettings): +class ShareSmbSettings(GeneratedShareSmbSettings): """ Settings for the SMB protocol. :param SmbMultichannel multichannel: Required. Sets the multichannel settings. @@ -155,20 +155,20 @@ def __init__(self, enabled): self.enabled = enabled -class ProtocolSettings(GeneratedProtocolSettings): +class ShareProtocolSettings(GeneratedShareProtocolSettings): """Protocol Settings class used by the set and get service properties methods in the share service. Contains protocol properties of the share service such as the SMB setting of the share service. - :param SmbSettings smb_settings: Required. Sets SMB settings. + :param SmbSettings smb: Required. Sets SMB settings. """ - def __init__(self, smb_settings): - self.smb_settings = smb_settings + def __init__(self, smb): + self.smb = smb @classmethod def _from_generated(cls, generated): return cls( - smb_settings=generated.smb_settings) + smb=generated.smb) class AccessPolicy(GenAccessPolicy): @@ -959,5 +959,5 @@ def service_properties_deserialize(generated): 'hour_metrics': Metrics._from_generated(generated.hour_metrics), # pylint: disable=protected-access 'minute_metrics': Metrics._from_generated(generated.minute_metrics), # pylint: disable=protected-access 'cors': [CorsRule._from_generated(cors) for cors in generated.cors], # pylint: disable=protected-access - 'protocol_settings': ProtocolSettings._from_generated(generated.protocol_settings), # pylint: disable=protected-access + 'protocol': ShareProtocolSettings._from_generated(generated.protocol), # pylint: disable=protected-access } diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index 6cb960ef4e7b..d6b240e9efa7 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -35,7 +35,7 @@ ShareProperties, Metrics, CorsRule, - ProtocolSettings + ShareProtocolSettings ) @@ -170,7 +170,7 @@ def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol_settings=None, # type: Optional[ProtocolSettings], + protocol=None, # type: Optional[ShareProtocolSettings], **kwargs ): # type: (...) -> None @@ -191,9 +191,9 @@ def set_service_properties( list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) - :param protocol_settings: + :param protocol: Sets protocol settings - :type protocol: ~azure.storage.fileshare.ProtocolSettings + :type protocol: ~azure.storage.fileshare.ShareProtocolSettings :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -212,7 +212,7 @@ def set_service_properties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, - protocol_settings=protocol_settings + protocol=protocol ) try: self._client.service.set_properties(storage_service_properties=props, timeout=timeout, **kwargs) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py index b8f5c640a07f..af67dcd83213 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py @@ -34,7 +34,7 @@ ShareProperties, Metrics, CorsRule, - ProtocolSettings, + ShareProtocolSettings, ) @@ -125,7 +125,7 @@ async def set_service_properties( self, hour_metrics=None, # type: Optional[Metrics] minute_metrics=None, # type: Optional[Metrics] cors=None, # type: Optional[List[CorsRule]] - protocol_settings=None, # type: Optional[ProtocolSettings], + protocol=None, # type: Optional[ShareProtocolSettings], **kwargs ): # type: (...) -> None @@ -148,7 +148,7 @@ async def set_service_properties( :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) :param protocol_settings: Sets protocol settings - :type protocol_settings: ~azure.storage.fileshare.ProtocolProperties + :type protocol: ~azure.storage.fileshare.ShareProtocolSettings :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -167,7 +167,7 @@ async def set_service_properties( hour_metrics=hour_metrics, minute_metrics=minute_metrics, cors=cors, - protocol_settings=protocol_settings + protocol=protocol ) try: await self._client.service.set_properties(props, timeout=timeout, **kwargs) diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml index 668c4b54804c..e6ba0a348740 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml @@ -11,7 +11,7 @@ interactions: User-Agent: - customer_user_agent azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:32 GMT + - Fri, 18 Sep 2020 01:52:21 GMT x-ms-version: - '2020-02-10' method: GET @@ -24,7 +24,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:18:31 GMT + - Fri, 18 Sep 2020 01:52:21 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml index f6a49d289bc5..96a432f8ee0b 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml @@ -11,7 +11,7 @@ interactions: User-Agent: - TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:33 GMT + - Fri, 18 Sep 2020 01:52:23 GMT x-ms-version: - '2020-02-10' method: GET @@ -24,7 +24,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:18:32 GMT + - Fri, 18 Sep 2020 01:52:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -49,7 +49,7 @@ interactions: - TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:34 GMT + - Fri, 18 Sep 2020 01:52:23 GMT x-ms-version: - '2020-02-10' method: GET @@ -62,7 +62,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:18:32 GMT + - Fri, 18 Sep 2020 01:52:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml index 25d6488c3347..ddf36533263c 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml @@ -11,7 +11,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:34 GMT + - Fri, 18 Sep 2020 01:52:23 GMT x-ms-version: - '2020-02-10' method: GET @@ -24,7 +24,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:18:33 GMT + - Fri, 18 Sep 2020 01:52:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml index f34724b2adb5..90ab35cec905 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml @@ -7,7 +7,7 @@ interactions: User-Agent: - customer_user_agent azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:41 GMT + - Fri, 18 Sep 2020 01:52:39 GMT x-ms-version: - '2020-02-10' method: GET @@ -18,7 +18,7 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:40 GMT + date: Fri, 18 Sep 2020 01:52:38 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml index 25802cabe4c4..0e248ab1a26b 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml @@ -7,7 +7,7 @@ interactions: User-Agent: - TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:41 GMT + - Fri, 18 Sep 2020 01:52:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -18,7 +18,7 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:40 GMT + date: Fri, 18 Sep 2020 01:52:38 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin @@ -36,7 +36,7 @@ interactions: - TestApp/v2.0 TestApp/v1.0 azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:41 GMT + - Fri, 18 Sep 2020 01:52:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -47,7 +47,7 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:40 GMT + date: Fri, 18 Sep 2020 01:52:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml index a0af5136e4af..035d8432b964 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml @@ -7,7 +7,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:42 GMT + - Fri, 18 Sep 2020 01:52:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -18,7 +18,7 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:40 GMT + date: Fri, 18 Sep 2020 01:52:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml index 77f23e95958e..e942c7f5ca0b 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml @@ -18,7 +18,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:19:36 GMT + - Fri, 18 Sep 2020 01:45:18 GMT x-ms-version: - '2020-02-10' method: PUT @@ -28,7 +28,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 17:19:36 GMT + - Fri, 18 Sep 2020 01:45:17 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,7 +50,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:19:37 GMT + - Fri, 18 Sep 2020 01:45:19 GMT x-ms-version: - '2020-02-10' method: GET @@ -63,7 +63,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:19:36 GMT + - Fri, 18 Sep 2020 01:45:18 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -94,7 +94,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:19:37 GMT + - Fri, 18 Sep 2020 01:45:19 GMT x-ms-version: - '2020-02-10' method: PUT @@ -104,7 +104,7 @@ interactions: string: '' headers: date: - - Thu, 17 Sep 2020 17:19:36 GMT + - Fri, 18 Sep 2020 01:45:18 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -126,7 +126,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:19:37 GMT + - Fri, 18 Sep 2020 01:45:19 GMT x-ms-version: - '2020-02-10' method: GET @@ -139,7 +139,7 @@ interactions: content-type: - application/xml date: - - Thu, 17 Sep 2020 17:19:36 GMT + - Fri, 18 Sep 2020 01:45:18 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml index 19c7d754ef2d..0fcb6611e76a 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml @@ -12,7 +12,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:19 GMT + - Fri, 18 Sep 2020 01:53:37 GMT x-ms-version: - '2020-02-10' method: PUT @@ -21,7 +21,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 17:18:18 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -37,7 +37,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:20 GMT + - Fri, 18 Sep 2020 01:53:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -48,9 +48,10 @@ interactions: />false" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:18 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-version: '2020-02-10' status: code: 200 @@ -69,7 +70,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:20 GMT + - Fri, 18 Sep 2020 01:53:40 GMT x-ms-version: - '2020-02-10' method: PUT @@ -78,7 +79,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 17:18:18 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -94,7 +95,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:20 GMT + - Fri, 18 Sep 2020 01:53:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -105,9 +106,10 @@ interactions: />true" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:18 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-version: '2020-02-10' status: code: 200 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml index 2d47103d94a5..0181be1e5aa2 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml @@ -12,7 +12,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:20 GMT + - Fri, 18 Sep 2020 01:53:40 GMT x-ms-version: - '2020-02-10' method: PUT @@ -21,7 +21,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 17:18:19 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -37,7 +37,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:21 GMT + - Fri, 18 Sep 2020 01:53:40 GMT x-ms-version: - '2020-02-10' method: GET @@ -48,9 +48,10 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:19 GMT + date: Fri, 18 Sep 2020 01:53:39 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-version: '2020-02-10' status: code: 200 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml index 53b8cd47bd05..b82ba345dc86 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml @@ -11,7 +11,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:21 GMT + - Fri, 18 Sep 2020 01:53:41 GMT x-ms-version: - '2020-02-10' method: PUT @@ -20,7 +20,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 17:18:21 GMT + date: Fri, 18 Sep 2020 01:53:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -36,7 +36,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:22 GMT + - Fri, 18 Sep 2020 01:53:41 GMT x-ms-version: - '2020-02-10' method: GET @@ -47,9 +47,10 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:21 GMT + date: Fri, 18 Sep 2020 01:53:40 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-version: '2020-02-10' status: code: 200 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml index c4c1924d0e2b..0eca84a4c4f9 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml @@ -11,7 +11,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:22 GMT + - Fri, 18 Sep 2020 01:53:42 GMT x-ms-version: - '2020-02-10' method: PUT @@ -20,7 +20,7 @@ interactions: body: string: '' headers: - date: Thu, 17 Sep 2020 17:18:20 GMT + date: Fri, 18 Sep 2020 01:53:41 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked x-ms-version: '2020-02-10' @@ -36,7 +36,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:22 GMT + - Fri, 18 Sep 2020 01:53:43 GMT x-ms-version: - '2020-02-10' method: GET @@ -47,9 +47,10 @@ interactions: />0GET,PUTwww.xyz.com,www.ab.com,www.bc.comx-ms-meta-xyz,x-ms-meta-foo,x-ms-meta-data*,x-ms-meta-target*x-ms-meta-abc,x-ms-meta-bcd,x-ms-meta-data*,x-ms-meta-source*500true" headers: content-type: application/xml - date: Thu, 17 Sep 2020 17:18:21 GMT + date: Fri, 18 Sep 2020 01:53:41 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-version: '2020-02-10' status: code: 200 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml index 3d5ea5eab3fe..10dfe103177f 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml @@ -17,7 +17,7 @@ interactions: User-Agent: - azsdk-python-storage-file-share/12.2.0 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 17 Sep 2020 17:18:22 GMT + - Fri, 18 Sep 2020 01:53:43 GMT x-ms-version: - '2020-02-10' method: PUT @@ -25,12 +25,12 @@ interactions: response: body: string: "\uFEFFInvalidXmlDocumentXML - specified is not syntactically valid.\nRequestId:663faed4-d01a-000b-2d16-8dcd27000000\nTime:2020-09-17T17:18:22.1994630Z0000" headers: content-length: '294' content-type: application/xml - date: Thu, 17 Sep 2020 17:18:21 GMT + date: Fri, 18 Sep 2020 01:53:42 GMT server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: InvalidXmlDocument x-ms-version: '2020-02-10' diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py index 0059e42d4a0d..f5c03734e7f0 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py @@ -14,9 +14,9 @@ Metrics, CorsRule, RetentionPolicy, - SmbSettings, + ShareSmbSettings, SmbMultichannel, - ProtocolSettings, + ShareProtocolSettings, ) from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -78,24 +78,24 @@ def _assert_retention_equal(self, ret1, ret2): def test_file_service_properties(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) - protocol_properties1 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=False))) - protocol_properties2 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=True))) + protocol_properties1 = ShareProtocolSettings(ShareSmbSettings(SmbMultichannel(enabled=False))) + protocol_properties2 = ShareProtocolSettings(ShareSmbSettings(SmbMultichannel(enabled=True))) # Act resp = self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties1) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties1) # Assert self.assertIsNone(resp) props = self.fsc.get_service_properties() self._assert_metrics_equal(props['hour_metrics'], Metrics()) self._assert_metrics_equal(props['minute_metrics'], Metrics()) self._assert_cors_equal(props['cors'], list()) - self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, False) + self.assertEqual(props['protocol'].smb.multichannel.enabled, False) # Act self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties2) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties2) props = self.fsc.get_service_properties() - self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, True) + self.assertEqual(props['protocol'].smb.multichannel.enabled, True) # --Test cases per feature --------------------------------------- @GlobalStorageAccountPreparer() diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py index 5045f670c6d7..f0dcd2ac2f9b 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py @@ -15,9 +15,9 @@ Metrics, CorsRule, RetentionPolicy, - ProtocolSettings, + ShareProtocolSettings, SmbMultichannel, - SmbSettings, + ShareSmbSettings, ) from azure.storage.fileshare.aio import ShareServiceClient from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -88,12 +88,12 @@ def _assert_retention_equal(self, ret1, ret2): @AsyncStorageTestCase.await_prepared_test async def test_file_service_properties_async(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) - protocol_properties1 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=False))) - protocol_properties2 = ProtocolSettings(SmbSettings(SmbMultichannel(enabled=True))) + protocol_properties1 = ShareProtocolSettings(ShareSmbSettings(SmbMultichannel(enabled=False))) + protocol_properties2 = ShareProtocolSettings(ShareSmbSettings(SmbMultichannel(enabled=True))) # Act resp = await self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties1) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties1) # Assert self.assertIsNone(resp) @@ -101,13 +101,13 @@ async def test_file_service_properties_async(self, resource_group, location, sto self._assert_metrics_equal(props['hour_metrics'], Metrics()) self._assert_metrics_equal(props['minute_metrics'], Metrics()) self._assert_cors_equal(props['cors'], list()) - self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, False) + self.assertEqual(props['protocol'].smb.multichannel.enabled, False) # Act await self.fsc.set_service_properties( - hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol_settings=protocol_properties2) + hour_metrics=Metrics(), minute_metrics=Metrics(), cors=list(), protocol=protocol_properties2) props = await self.fsc.get_service_properties() - self.assertEqual(props['protocol_settings'].smb_settings.multichannel.enabled, True) + self.assertEqual(props['protocol'].smb.multichannel.enabled, True) # --Test cases per feature --------------------------------------- @GlobalStorageAccountPreparer()