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 d5a1b769973a..af67e01332f7 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 @@ -28,6 +28,7 @@ ShareSmbSettings, SmbMultichannel, ShareProtocolSettings, + ShareProtocols, AccessPolicy, FileSasPermissions, ShareSasPermissions, @@ -37,6 +38,9 @@ HandleItem, ShareAccessTier ) +from ._generated.models import ( + ShareRootSquash +) __version__ = VERSION @@ -63,6 +67,7 @@ 'AccessPolicy', 'FileSasPermissions', 'ShareSasPermissions', + 'ShareProtocols', 'ShareProperties', 'DirectoryProperties', 'FileProperties', @@ -70,6 +75,7 @@ 'Handle', 'NTFSAttributes', 'HandleItem', + 'ShareRootSquash', 'generate_account_sas', 'generate_share_sas', 'generate_file_sas' diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py index 3c52986c52e4..7a681889f122 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py @@ -49,7 +49,7 @@ def __init__(self, version, url, **kwargs): self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-02-10' + self.api_version = '2020-04-08' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py index c0fcb43d6368..83264f1daebe 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py @@ -50,7 +50,7 @@ def __init__( self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-02-10' + self.api_version = '2020-04-08' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py index 0d95a586306f..8e0bf2e4473c 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._config = config self.restype = "share" - async def create(self, timeout=None, metadata=None, quota=None, access_tier=None, *, cls=None, **kwargs): + async def create(self, timeout=None, metadata=None, quota=None, access_tier=None, enabled_protocols=None, root_squash=None, *, cls=None, **kwargs): """Creates a new share under the specified account. If the share with the same name already exists, the operation fails. @@ -55,6 +55,13 @@ async def create(self, timeout=None, metadata=None, quota=None, access_tier=None values include: 'TransactionOptimized', 'Hot', 'Cool' :type access_tier: str or ~azure.storage.fileshare.models.ShareAccessTier + :param enabled_protocols: Protocols to enable on the share. + :type enabled_protocols: str + :param root_squash: Root squash to set on the share. Only valid for + NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or + ~azure.storage.fileshare.models.ShareRootSquash :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) @@ -85,6 +92,10 @@ async def create(self, timeout=None, metadata=None, quota=None, access_tier=None if access_tier is not None: header_parameters['x-ms-access-tier'] = self._serialize.header("access_tier", access_tier, 'str') header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if enabled_protocols is not None: + header_parameters['x-ms-enabled-protocols'] = self._serialize.header("enabled_protocols", enabled_protocols, 'str') + if root_squash is not None: + header_parameters['x-ms-root-squash'] = self._serialize.header("root_squash", root_squash, 'ShareRootSquash') # Construct and send request request = self._client.put(url, query_parameters, header_parameters) @@ -185,6 +196,8 @@ async def get_properties(self, sharesnapshot=None, timeout=None, lease_access_co 'x-ms-access-tier': self._deserialize('str', response.headers.get('x-ms-access-tier')), 'x-ms-access-tier-change-time': self._deserialize('rfc-1123', response.headers.get('x-ms-access-tier-change-time')), 'x-ms-access-tier-transition-state': self._deserialize('str', response.headers.get('x-ms-access-tier-transition-state')), + 'x-ms-enabled-protocols': self._deserialize('str', response.headers.get('x-ms-enabled-protocols')), + 'x-ms-root-squash': self._deserialize(models.ShareRootSquash, response.headers.get('x-ms-root-squash')), 'x-ms-error-code': self._deserialize('str', response.headers.get('x-ms-error-code')), } return cls(response, None, response_headers) @@ -877,7 +890,7 @@ async def get_permission(self, file_permission_key, timeout=None, *, cls=None, * return deserialized get_permission.metadata = {'url': '/{shareName}'} - async def set_properties(self, timeout=None, quota=None, access_tier=None, lease_access_conditions=None, *, cls=None, **kwargs): + async def set_properties(self, timeout=None, quota=None, access_tier=None, root_squash=None, lease_access_conditions=None, *, cls=None, **kwargs): """Sets properties for the specified share. :param timeout: The timeout parameter is expressed in seconds. For @@ -891,6 +904,11 @@ async def set_properties(self, timeout=None, quota=None, access_tier=None, lease values include: 'TransactionOptimized', 'Hot', 'Cool' :type access_tier: str or ~azure.storage.fileshare.models.ShareAccessTier + :param root_squash: Root squash to set on the share. Only valid for + NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or + ~azure.storage.fileshare.models.ShareRootSquash :param lease_access_conditions: Additional parameters for the operation :type lease_access_conditions: @@ -930,6 +948,8 @@ async def set_properties(self, timeout=None, quota=None, access_tier=None, lease header_parameters['x-ms-share-quota'] = self._serialize.header("quota", quota, 'int', minimum=1) if access_tier is not None: header_parameters['x-ms-access-tier'] = self._serialize.header("access_tier", access_tier, 'str') + if root_squash is not None: + header_parameters['x-ms-root-squash'] = self._serialize.header("root_squash", root_squash, 'ShareRootSquash') if lease_id is not None: header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", lease_id, 'str') diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py index f431cdd89b51..2919e8ad0418 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py @@ -28,9 +28,9 @@ from ._models_py3 import Metrics from ._models_py3 import RetentionPolicy from ._models_py3 import ShareFileRangeList - from ._models_py3 import ShareItem + from ._models_py3 import ShareItemInternal from ._models_py3 import SharePermission - from ._models_py3 import ShareProperties + from ._models_py3 import SharePropertiesInternal from ._models_py3 import ShareProtocolSettings from ._models_py3 import ShareSmbSettings from ._models_py3 import ShareStats @@ -58,9 +58,9 @@ from ._models import Metrics from ._models import RetentionPolicy from ._models import ShareFileRangeList - from ._models import ShareItem + from ._models import ShareItemInternal from ._models import SharePermission - from ._models import ShareProperties + from ._models import SharePropertiesInternal from ._models import ShareProtocolSettings from ._models import ShareSmbSettings from ._models import ShareStats @@ -79,6 +79,7 @@ ListSharesIncludeType, PermissionCopyModeType, ShareAccessTier, + ShareRootSquash, StorageErrorCode, ) @@ -101,9 +102,9 @@ 'Metrics', 'RetentionPolicy', 'ShareFileRangeList', - 'ShareItem', + 'ShareItemInternal', 'SharePermission', - 'ShareProperties', + 'SharePropertiesInternal', 'ShareProtocolSettings', 'ShareSmbSettings', 'ShareStats', @@ -116,6 +117,7 @@ 'LeaseDurationType', 'LeaseStateType', 'LeaseStatusType', + 'ShareRootSquash', 'ShareAccessTier', 'PermissionCopyModeType', 'DeleteSnapshotsOptionType', diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py index 0835990e4488..fb1c252f022e 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py @@ -103,6 +103,13 @@ class LeaseStatusType(str, Enum): unlocked = "unlocked" +class ShareRootSquash(str, Enum): + + no_root_squash = "NoRootSquash" + root_squash = "RootSquash" + all_squash = "AllSquash" + + class ShareAccessTier(str, Enum): transaction_optimized = "TransactionOptimized" diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py index cc504f8e8de7..08b2bf6c74e4 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py @@ -553,7 +553,7 @@ class ListSharesResponse(Model): :param max_results: :type max_results: int :param share_items: - :type share_items: list[~azure.storage.fileshare.models.ShareItem] + :type share_items: list[~azure.storage.fileshare.models.ShareItemInternal] :param next_marker: Required. :type next_marker: str """ @@ -568,7 +568,7 @@ class ListSharesResponse(Model): 'prefix': {'key': 'Prefix', 'type': 'str', 'xml': {'name': 'Prefix'}}, 'marker': {'key': 'Marker', 'type': 'str', 'xml': {'name': 'Marker'}}, 'max_results': {'key': 'MaxResults', 'type': 'int', 'xml': {'name': 'MaxResults'}}, - 'share_items': {'key': 'ShareItems', 'type': '[ShareItem]', 'xml': {'name': 'Shares', 'itemsName': 'Shares', 'wrapped': True}}, + 'share_items': {'key': 'ShareItems', 'type': '[ShareItemInternal]', 'xml': {'name': 'Shares', 'itemsName': 'Shares', 'wrapped': True}}, 'next_marker': {'key': 'NextMarker', 'type': 'str', 'xml': {'name': 'NextMarker'}}, } _xml_map = { @@ -679,7 +679,7 @@ def __init__(self, **kwargs): self.clear_ranges = kwargs.get('clear_ranges', None) -class ShareItem(Model): +class ShareItemInternal(Model): """A listed Azure Storage share item. All required parameters must be populated in order to send to Azure. @@ -693,7 +693,7 @@ class ShareItem(Model): :param version: :type version: str :param properties: Required. - :type properties: ~azure.storage.fileshare.models.ShareProperties + :type properties: ~azure.storage.fileshare.models.SharePropertiesInternal :param metadata: :type metadata: dict[str, str] """ @@ -708,7 +708,7 @@ class ShareItem(Model): 'snapshot': {'key': 'Snapshot', 'type': 'str', 'xml': {'name': 'Snapshot'}}, 'deleted': {'key': 'Deleted', 'type': 'bool', 'xml': {'name': 'Deleted'}}, 'version': {'key': 'Version', 'type': 'str', 'xml': {'name': 'Version'}}, - 'properties': {'key': 'Properties', 'type': 'ShareProperties', 'xml': {'name': 'Properties'}}, + 'properties': {'key': 'Properties', 'type': 'SharePropertiesInternal', 'xml': {'name': 'Properties'}}, 'metadata': {'key': 'Metadata', 'type': '{str}', 'xml': {'name': 'Metadata'}}, } _xml_map = { @@ -716,7 +716,7 @@ class ShareItem(Model): } def __init__(self, **kwargs): - super(ShareItem, self).__init__(**kwargs) + super(ShareItemInternal, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.snapshot = kwargs.get('snapshot', None) self.deleted = kwargs.get('deleted', None) @@ -750,7 +750,7 @@ def __init__(self, **kwargs): self.permission = kwargs.get('permission', None) -class ShareProperties(Model): +class SharePropertiesInternal(Model): """Properties of a share. All required parameters must be populated in order to send to Azure. @@ -787,6 +787,11 @@ class ShareProperties(Model): :param lease_duration: Possible values include: 'infinite', 'fixed' :type lease_duration: str or ~azure.storage.fileshare.models.LeaseDurationType + :param enabled_protocols: + :type enabled_protocols: str + :param root_squash: Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or ~azure.storage.fileshare.models.ShareRootSquash """ _validation = { @@ -811,12 +816,14 @@ class ShareProperties(Model): 'lease_status': {'key': 'LeaseStatus', 'type': 'LeaseStatusType', 'xml': {'name': 'LeaseStatus'}}, 'lease_state': {'key': 'LeaseState', 'type': 'LeaseStateType', 'xml': {'name': 'LeaseState'}}, 'lease_duration': {'key': 'LeaseDuration', 'type': 'LeaseDurationType', 'xml': {'name': 'LeaseDuration'}}, + 'enabled_protocols': {'key': 'EnabledProtocols', 'type': 'str', 'xml': {'name': 'EnabledProtocols'}}, + 'root_squash': {'key': 'RootSquash', 'type': 'ShareRootSquash', 'xml': {'name': 'RootSquash'}}, } _xml_map = { } def __init__(self, **kwargs): - super(ShareProperties, self).__init__(**kwargs) + super(SharePropertiesInternal, self).__init__(**kwargs) self.last_modified = kwargs.get('last_modified', None) self.etag = kwargs.get('etag', None) self.quota = kwargs.get('quota', None) @@ -832,6 +839,8 @@ def __init__(self, **kwargs): self.lease_status = kwargs.get('lease_status', None) self.lease_state = kwargs.get('lease_state', None) self.lease_duration = kwargs.get('lease_duration', None) + self.enabled_protocols = kwargs.get('enabled_protocols', None) + self.root_squash = kwargs.get('root_squash', None) class ShareProtocolSettings(Model): diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py index 6ee27de4a049..52af754c7447 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py @@ -553,7 +553,7 @@ class ListSharesResponse(Model): :param max_results: :type max_results: int :param share_items: - :type share_items: list[~azure.storage.fileshare.models.ShareItem] + :type share_items: list[~azure.storage.fileshare.models.ShareItemInternal] :param next_marker: Required. :type next_marker: str """ @@ -568,7 +568,7 @@ class ListSharesResponse(Model): 'prefix': {'key': 'Prefix', 'type': 'str', 'xml': {'name': 'Prefix'}}, 'marker': {'key': 'Marker', 'type': 'str', 'xml': {'name': 'Marker'}}, 'max_results': {'key': 'MaxResults', 'type': 'int', 'xml': {'name': 'MaxResults'}}, - 'share_items': {'key': 'ShareItems', 'type': '[ShareItem]', 'xml': {'name': 'Shares', 'itemsName': 'Shares', 'wrapped': True}}, + 'share_items': {'key': 'ShareItems', 'type': '[ShareItemInternal]', 'xml': {'name': 'Shares', 'itemsName': 'Shares', 'wrapped': True}}, 'next_marker': {'key': 'NextMarker', 'type': 'str', 'xml': {'name': 'NextMarker'}}, } _xml_map = { @@ -679,7 +679,7 @@ def __init__(self, *, ranges=None, clear_ranges=None, **kwargs) -> None: self.clear_ranges = clear_ranges -class ShareItem(Model): +class ShareItemInternal(Model): """A listed Azure Storage share item. All required parameters must be populated in order to send to Azure. @@ -693,7 +693,7 @@ class ShareItem(Model): :param version: :type version: str :param properties: Required. - :type properties: ~azure.storage.fileshare.models.ShareProperties + :type properties: ~azure.storage.fileshare.models.SharePropertiesInternal :param metadata: :type metadata: dict[str, str] """ @@ -708,7 +708,7 @@ class ShareItem(Model): 'snapshot': {'key': 'Snapshot', 'type': 'str', 'xml': {'name': 'Snapshot'}}, 'deleted': {'key': 'Deleted', 'type': 'bool', 'xml': {'name': 'Deleted'}}, 'version': {'key': 'Version', 'type': 'str', 'xml': {'name': 'Version'}}, - 'properties': {'key': 'Properties', 'type': 'ShareProperties', 'xml': {'name': 'Properties'}}, + 'properties': {'key': 'Properties', 'type': 'SharePropertiesInternal', 'xml': {'name': 'Properties'}}, 'metadata': {'key': 'Metadata', 'type': '{str}', 'xml': {'name': 'Metadata'}}, } _xml_map = { @@ -716,7 +716,7 @@ class ShareItem(Model): } def __init__(self, *, name: str, properties, snapshot: str=None, deleted: bool=None, version: str=None, metadata=None, **kwargs) -> None: - super(ShareItem, self).__init__(**kwargs) + super(ShareItemInternal, self).__init__(**kwargs) self.name = name self.snapshot = snapshot self.deleted = deleted @@ -750,7 +750,7 @@ def __init__(self, *, permission: str, **kwargs) -> None: self.permission = permission -class ShareProperties(Model): +class SharePropertiesInternal(Model): """Properties of a share. All required parameters must be populated in order to send to Azure. @@ -787,6 +787,11 @@ class ShareProperties(Model): :param lease_duration: Possible values include: 'infinite', 'fixed' :type lease_duration: str or ~azure.storage.fileshare.models.LeaseDurationType + :param enabled_protocols: + :type enabled_protocols: str + :param root_squash: Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or ~azure.storage.fileshare.models.ShareRootSquash """ _validation = { @@ -811,12 +816,14 @@ class ShareProperties(Model): 'lease_status': {'key': 'LeaseStatus', 'type': 'LeaseStatusType', 'xml': {'name': 'LeaseStatus'}}, 'lease_state': {'key': 'LeaseState', 'type': 'LeaseStateType', 'xml': {'name': 'LeaseState'}}, 'lease_duration': {'key': 'LeaseDuration', 'type': 'LeaseDurationType', 'xml': {'name': 'LeaseDuration'}}, + 'enabled_protocols': {'key': 'EnabledProtocols', 'type': 'str', 'xml': {'name': 'EnabledProtocols'}}, + 'root_squash': {'key': 'RootSquash', 'type': 'ShareRootSquash', 'xml': {'name': 'RootSquash'}}, } _xml_map = { } - def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: int=None, provisioned_ingress_mbps: int=None, provisioned_egress_mbps: int=None, next_allowed_quota_downgrade_time=None, deleted_time=None, remaining_retention_days: int=None, access_tier: str=None, access_tier_change_time=None, access_tier_transition_state: str=None, lease_status=None, lease_state=None, lease_duration=None, **kwargs) -> None: - super(ShareProperties, self).__init__(**kwargs) + def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: int=None, provisioned_ingress_mbps: int=None, provisioned_egress_mbps: int=None, next_allowed_quota_downgrade_time=None, deleted_time=None, remaining_retention_days: int=None, access_tier: str=None, access_tier_change_time=None, access_tier_transition_state: str=None, lease_status=None, lease_state=None, lease_duration=None, enabled_protocols: str=None, root_squash=None, **kwargs) -> None: + super(SharePropertiesInternal, self).__init__(**kwargs) self.last_modified = last_modified self.etag = etag self.quota = quota @@ -832,6 +839,8 @@ def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: in self.lease_status = lease_status self.lease_state = lease_state self.lease_duration = lease_duration + self.enabled_protocols = enabled_protocols + self.root_squash = root_squash class ShareProtocolSettings(Model): diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py index 64cc52ac5761..077dfbe10301 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._config = config self.restype = "share" - def create(self, timeout=None, metadata=None, quota=None, access_tier=None, cls=None, **kwargs): + def create(self, timeout=None, metadata=None, quota=None, access_tier=None, enabled_protocols=None, root_squash=None, cls=None, **kwargs): """Creates a new share under the specified account. If the share with the same name already exists, the operation fails. @@ -55,6 +55,13 @@ def create(self, timeout=None, metadata=None, quota=None, access_tier=None, cls= values include: 'TransactionOptimized', 'Hot', 'Cool' :type access_tier: str or ~azure.storage.fileshare.models.ShareAccessTier + :param enabled_protocols: Protocols to enable on the share. + :type enabled_protocols: str + :param root_squash: Root squash to set on the share. Only valid for + NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or + ~azure.storage.fileshare.models.ShareRootSquash :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) @@ -85,6 +92,10 @@ def create(self, timeout=None, metadata=None, quota=None, access_tier=None, cls= if access_tier is not None: header_parameters['x-ms-access-tier'] = self._serialize.header("access_tier", access_tier, 'str') header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + if enabled_protocols is not None: + header_parameters['x-ms-enabled-protocols'] = self._serialize.header("enabled_protocols", enabled_protocols, 'str') + if root_squash is not None: + header_parameters['x-ms-root-squash'] = self._serialize.header("root_squash", root_squash, 'ShareRootSquash') # Construct and send request request = self._client.put(url, query_parameters, header_parameters) @@ -185,6 +196,8 @@ def get_properties(self, sharesnapshot=None, timeout=None, lease_access_conditio 'x-ms-access-tier': self._deserialize('str', response.headers.get('x-ms-access-tier')), 'x-ms-access-tier-change-time': self._deserialize('rfc-1123', response.headers.get('x-ms-access-tier-change-time')), 'x-ms-access-tier-transition-state': self._deserialize('str', response.headers.get('x-ms-access-tier-transition-state')), + 'x-ms-enabled-protocols': self._deserialize('str', response.headers.get('x-ms-enabled-protocols')), + 'x-ms-root-squash': self._deserialize(models.ShareRootSquash, response.headers.get('x-ms-root-squash')), 'x-ms-error-code': self._deserialize('str', response.headers.get('x-ms-error-code')), } return cls(response, None, response_headers) @@ -877,7 +890,7 @@ def get_permission(self, file_permission_key, timeout=None, cls=None, **kwargs): return deserialized get_permission.metadata = {'url': '/{shareName}'} - def set_properties(self, timeout=None, quota=None, access_tier=None, lease_access_conditions=None, cls=None, **kwargs): + def set_properties(self, timeout=None, quota=None, access_tier=None, root_squash=None, lease_access_conditions=None, cls=None, **kwargs): """Sets properties for the specified share. :param timeout: The timeout parameter is expressed in seconds. For @@ -891,6 +904,11 @@ def set_properties(self, timeout=None, quota=None, access_tier=None, lease_acces values include: 'TransactionOptimized', 'Hot', 'Cool' :type access_tier: str or ~azure.storage.fileshare.models.ShareAccessTier + :param root_squash: Root squash to set on the share. Only valid for + NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', + 'AllSquash' + :type root_squash: str or + ~azure.storage.fileshare.models.ShareRootSquash :param lease_access_conditions: Additional parameters for the operation :type lease_access_conditions: @@ -930,6 +948,8 @@ def set_properties(self, timeout=None, quota=None, access_tier=None, lease_acces header_parameters['x-ms-share-quota'] = self._serialize.header("quota", quota, 'int', minimum=1) if access_tier is not None: header_parameters['x-ms-access-tier'] = self._serialize.header("access_tier", access_tier, 'str') + if root_squash is not None: + header_parameters['x-ms-root-squash'] = self._serialize.header("root_squash", root_squash, 'ShareRootSquash') if lease_id is not None: header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", lease_id, 'str') diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py index 6ef707dd11c9..61ca5b37e14a 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2020-02-10" +VERSION = "2020-04-08" 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 d7621a6b50d3..e72ffdf3ac74 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 @@ -6,6 +6,8 @@ # pylint: disable=too-few-public-methods, too-many-instance-attributes # pylint: disable=super-init-not-called, too-many-lines +from enum import Enum + from azure.core.paging import PageIterator from ._parser import _parse_datetime_from_str from ._shared.response_handlers import return_context_and_deserialized, process_storage_error @@ -332,6 +334,10 @@ class ShareProperties(DictMixin): :ivar int remaining_retention_days: To indicate how many remaining days the deleted share will be kept. This is a service returned value, and the value will be set when list shared including deleted ones. + :ivar ~azure.storage.fileshare.models.ShareRootSquash or str root_squash: + Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. + :ivar list(str) protocols: + Indicates the protocols enabled on the share. The protocol can be either SMB or NFS. """ def __init__(self, **kwargs): @@ -351,7 +357,9 @@ def __init__(self, **kwargs): self.provisioned_ingress_mbps = kwargs.get('x-ms-share-provisioned-ingress-mbps') self.provisioned_iops = kwargs.get('x-ms-share-provisioned-iops') self.lease = LeaseProperties(**kwargs) - + self.protocols = [protocol.strip() for protocol in kwargs.get('x-ms-enabled-protocols', None).split(',')]\ + if kwargs.get('x-ms-enabled-protocols', None) else None + self.root_squash = kwargs.get('x-ms-root-squash', None) @classmethod def _from_generated(cls, generated): props = cls() @@ -371,6 +379,10 @@ def _from_generated(cls, generated): props.provisioned_ingress_mbps = generated.properties.provisioned_ingress_mbps props.provisioned_iops = generated.properties.provisioned_iops props.lease = LeaseProperties._from_generated(generated) # pylint: disable=protected-access + props.protocols = [protocol.strip() for protocol in generated.properties.enabled_protocols.split(',')]\ + if generated.properties.enabled_protocols else None + props.root_squash = generated.properties.root_squash + return props @@ -706,6 +718,12 @@ def _from_generated(cls, generated): return props +class ShareProtocols(str, Enum): + """Enabled protocols on the share""" + SMB = "SMB" + NFS = "NFS" + + class CopyProperties(DictMixin): """File Copy Properties. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py index fc02b90481be..d8d7d26f1046 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_serialize.py @@ -16,6 +16,7 @@ '2019-07-07', '2019-12-12', '2020-02-10', + '2020-04-08' ] diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py index 65dcba747370..9b1a47f829d1 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py @@ -34,6 +34,8 @@ from ._directory_client import ShareDirectoryClient from ._file_client import ShareFileClient from ._lease import ShareLeaseClient +from ._models import ShareProtocols + if TYPE_CHECKING: from ._models import ShareProperties, AccessPolicy @@ -314,6 +316,13 @@ def create_share(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. + :keyword protocols: + Protocols to enable on the share. Only one protocol can be enabled on the share. + :paramtype protocols: str or ~azure.storage.fileshare.ShareProtocols + :keyword root_squash: + Root squash to set on the share. + Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. + :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash :returns: Share-updated property dict (Etag and last modified). :rtype: dict(str, Any) @@ -330,6 +339,12 @@ def create_share(self, **kwargs): quota = kwargs.pop('quota', None) access_tier = kwargs.pop('access_tier', None) timeout = kwargs.pop('timeout', None) + root_squash = kwargs.pop('root_squash', None) + protocols = kwargs.pop('protocols', None) + if protocols and protocols not in ['NFS', 'SMB', ShareProtocols.SMB, ShareProtocols.NFS]: + raise ValueError("The enabled protocol must be set to either SMB or NFS.") + if root_squash and protocols not in ['NFS', ShareProtocols.NFS]: + raise ValueError("The 'root_squash' keyword can only be used on NFS enabled shares.") headers = kwargs.pop('headers', {}) headers.update(add_metadata_headers(metadata)) # type: ignore @@ -339,6 +354,8 @@ def create_share(self, **kwargs): metadata=metadata, quota=quota, access_tier=access_tier, + root_squash=root_squash, + enabled_protocols=protocols, cls=return_response_headers, headers=headers, **kwargs) @@ -509,6 +526,10 @@ def set_share_properties(self, **kwargs): Must be greater than 0, and less than or equal to 5TB. :keyword int timeout: The timeout parameter is expressed in seconds. + :keyword root_squash: + Root squash to set on the share. + Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. + :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash :returns: Share-updated property dict (Etag and last modified). :rtype: dict(str, Any) @@ -524,13 +545,15 @@ def set_share_properties(self, **kwargs): timeout = kwargs.pop('timeout', None) access_tier = kwargs.pop('access_tier', None) quota = kwargs.pop('quota', None) - if all(parameter is None for parameter in [access_tier, quota]): + root_squash = kwargs.pop('root_squash', None) + if all(parameter is None for parameter in [access_tier, quota, root_squash]): raise ValueError("set_share_properties should be called with at least one parameter.") try: return self._client.share.set_properties( # type: ignore timeout=timeout, quota=quota, access_tier=access_tier, + root_squash=root_squash, cls=return_response_headers, **kwargs) except StorageErrorException as error: diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py index 966fd55d3533..fd9d92a19e6c 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py @@ -30,7 +30,7 @@ from ._directory_client_async import ShareDirectoryClient from ._file_client_async import ShareFileClient from ..aio._lease_async import ShareLeaseClient - +from .._models import ShareProtocols if TYPE_CHECKING: from .._models import ShareProperties, AccessPolicy @@ -185,6 +185,13 @@ async def create_share(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. + :keyword protocols: + Protocols to enable on the share. Only one protocol can be enabled on the share. + :paramtype protocols: str or ~azure.storage.fileshare.ShareProtocols + :keyword root_squash: + Root squash to set on the share. + Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash'. + :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash :returns: Share-updated property dict (Etag and last modified). :rtype: dict(str, Any) @@ -201,6 +208,12 @@ async def create_share(self, **kwargs): quota = kwargs.pop('quota', None) access_tier = kwargs.pop('access_tier', None) timeout = kwargs.pop('timeout', None) + root_squash = kwargs.pop('root_squash', None) + protocols = kwargs.pop('protocols', None) + if protocols and protocols not in ['NFS', 'SMB', ShareProtocols.SMB, ShareProtocols.NFS]: + raise ValueError("The enabled protocol must be set to either SMB or NFS.") + if root_squash and protocols not in ['NFS', ShareProtocols.NFS]: + raise ValueError("The 'root_squash' keyword can only be used on NFS enabled shares.") headers = kwargs.pop('headers', {}) headers.update(add_metadata_headers(metadata)) # type: ignore @@ -210,6 +223,8 @@ async def create_share(self, **kwargs): metadata=metadata, quota=quota, access_tier=access_tier, + root_squash=root_squash, + enabled_protocols=protocols, cls=return_response_headers, headers=headers, **kwargs) @@ -378,6 +393,10 @@ async def set_share_properties(self, **kwargs): Must be greater than 0, and less than or equal to 5TB. :keyword int timeout: The timeout parameter is expressed in seconds. + :keyword root_squash: + Root squash to set on the share. + Only valid for NFS shares. Possible values include: 'NoRootSquash', 'RootSquash', 'AllSquash' + :paramtype root_squash: str or ~azure.storage.fileshare.ShareRootSquash :returns: Share-updated property dict (Etag and last modified). :rtype: dict(str, Any) @@ -393,13 +412,15 @@ async def set_share_properties(self, **kwargs): timeout = kwargs.pop('timeout', None) access_tier = kwargs.pop('access_tier', None) quota = kwargs.pop('quota', None) - if all(parameter is None for parameter in [access_tier, quota]): + root_squash = kwargs.pop('root_squash', None) + if all(parameter is None for parameter in [access_tier, quota, root_squash]): raise ValueError("set_share_properties should be called with at least one parameter.") try: return await self._client.share.set_properties( # type: ignore timeout=timeout, quota=quota, access_tier=access_tier, + root_squash=root_squash, cls=return_response_headers, **kwargs) except StorageErrorException as error: diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml index e4ebab379047..41dc19188d41 100644 --- a/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml @@ -11,9 +11,9 @@ interactions: Content-Length: - '0' 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.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT x-ms-meta: - '{''hello'': ''world'', ''number'': ''42''}' x-ms-meta-hello: @@ -21,7 +21,7 @@ interactions: x-ms-meta-number: - '42' x-ms-version: - - '2019-02-02' + - '2020-04-08' method: PUT uri: https://storagename.file.core.windows.net/share70e61121?restype=share response: @@ -31,15 +31,15 @@ interactions: content-length: - '0' date: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT etag: - - '"0x8D79A163C646EB2"' + - '"0x8D88279A3C13C42"' last-modified: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2020-04-08' status: code: 201 message: Created @@ -53,11 +53,11 @@ 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.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT x-ms-version: - - '2019-02-02' + - '2020-04-08' method: GET uri: https://storagename.file.core.windows.net/share70e61121?restype=share response: @@ -67,15 +67,19 @@ interactions: content-length: - '0' date: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT etag: - - '"0x8D79A163C646EB2"' + - '"0x8D88279A3C13C42"' last-modified: - - Wed, 15 Jan 2020 23:54:18 GMT + - Fri, 06 Nov 2020 17:30:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 vary: - Origin + x-ms-access-tier: + - TransactionOptimized + x-ms-access-tier-change-time: + - Fri, 06 Nov 2020 17:30:22 GMT x-ms-has-immutability-policy: - 'false' x-ms-has-legal-hold: @@ -87,7 +91,7 @@ interactions: x-ms-share-quota: - '5120' x-ms-version: - - '2019-02-02' + - '2020-04-08' status: code: 200 message: OK @@ -101,24 +105,128 @@ 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.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:54:19 GMT + - Fri, 06 Nov 2020 17:30:23 GMT x-ms-version: - - '2019-02-02' + - '2020-04-08' method: GET uri: https://storagename.file.core.windows.net/?include=snapshots&comp=list response: body: string: "\uFEFFshare70e61121Wed, - 15 Jan 2020 23:54:18 GMT\"0x8D79A163C646EB2\"5120share1816f1171Fri, + 11 Sep 2020 00:43:37 GMT\"0x8D855EBB87CFF33\"5120TransactionOptimizedFri, + 11 Sep 2020 00:43:37 GMT$account-encryption-keyfalseshare182b3117dFri, + 11 Sep 2020 00:44:44 GMT\"0x8D855EBE0710239\"5120TransactionOptimizedFri, + 11 Sep 2020 00:44:44 GMT$account-encryption-keyfalseshare336d1532Fri, + 11 Sep 2020 00:02:03 GMT\"0x8D855E5EA1BA89C\"5120TransactionOptimizedFri, + 11 Sep 2020 00:02:03 GMT$account-encryption-keyfalseshare50ad1060Tue, + 29 Sep 2020 22:27:37 GMT\"0x8D864C6DE6E6B78\"5120TransactionOptimizedTue, + 29 Sep 2020 22:27:37 GMT$account-encryption-keyfalseshare602310dcThu, + 10 Sep 2020 23:45:57 GMT\"0x8D855E3AA5BA817\"5120TransactionOptimizedThu, + 10 Sep 2020 23:45:57 GMT$account-encryption-keyfalseshare70e61121Fri, + 06 Nov 2020 17:30:22 GMT\"0x8D88279A3C13C42\"5120TransactionOptimizedFri, + 06 Nov 2020 17:30:22 GMT$account-encryption-keyfalseshare801b1156Thu, + 10 Sep 2020 23:48:33 GMT\"0x8D855E4070545FC\"5120TransactionOptimizedThu, + 10 Sep 2020 23:48:33 GMT$account-encryption-keyfalsesharea7a1477Thu, + 10 Sep 2020 23:48:04 GMT\"0x8D855E3F609C583\"5120TransactionOptimizedThu, + 10 Sep 2020 23:48:04 GMT$account-encryption-keyfalseshareba3e12f12020-09-28T14:03:31.0000000ZMon, + 28 Sep 2020 14:03:31 GMT\"0x8D863B748689793\"5120$account-encryption-keyfalseshareba3e12f1Mon, + 28 Sep 2020 14:03:31 GMT\"0x8D863B748689793\"5120TransactionOptimizedMon, + 28 Sep 2020 14:03:31 GMT$account-encryption-keyfalsesharec80148eFri, + 11 Sep 2020 00:25:51 GMT\"0x8D855E93D722BB0\"5120TransactionOptimizedFri, + 11 Sep 2020 00:03:40 GMT$account-encryption-keyfalsesharecb2f1317Fri, + 11 Sep 2020 00:59:09 GMT\"0x8D855EDE422992F\"5120TransactionOptimizedFri, + 11 Sep 2020 00:59:09 GMT$account-encryption-keyfalsesharee121138eFri, + 11 Sep 2020 00:00:54 GMT\"0x8D855E5C0C0BD1C\"5120TransactionOptimizedFri, + 11 Sep 2020 00:00:53 GMT$account-encryption-keyfalsesharee52d0d77Thu, + 10 Sep 2020 23:47:27 GMT\"0x8D855E3DFBB5CB3\"5120TransactionOptimizedThu, + 10 Sep 2020 23:47:20 GMT$account-encryption-keyfalsesharerestorecb2f1317Thu, + 10 Sep 2020 22:44:32 GMT\"0x8D855DB159313DC\"5120TransactionOptimizedThu, + 10 Sep 2020 22:44:32 GMT$account-encryption-keyfalsesharesamples5Tue, + 15 Sep 2020 19:39:56 GMT\"0x8D859AF1FEB001F\"5120TransactionOptimizedTue, + 15 Sep 2020 19:39:55 GMT$account-encryption-keyfalsesharesamples6Tue, + 15 Sep 2020 19:43:57 GMT\"0x8D859AFAFBA3E88\"5120TransactionOptimizedTue, + 15 Sep 2020 19:43:57 GMT$account-encryption-keyfalsesharesamples7Tue, + 15 Sep 2020 19:44:49 GMT\"0x8D859AFCEB7CC2D\"5120TransactionOptimizedTue, + 15 Sep 2020 19:44:49 GMT$account-encryption-keyfalsetest-share-1200db32-dbe6-47c3-8fdc-badfe55a17f7Wed, + 05 Aug 2020 19:06:51 GMT\"0x8D83972B5D1302D\"5120TransactionOptimizedWed, + 05 Aug 2020 19:06:51 GMT$account-encryption-keyfalsetest-share-1c02c6e2-910b-4118-9cc7-3e906d0f6a31Wed, + 05 Aug 2020 19:06:49 GMT\"0x8D83972B5025718\"5120TransactionOptimizedWed, + 05 Aug 2020 19:06:49 GMT$account-encryption-keyfalsetest-share-22baebbe-ef2b-4735-8a37-d5cfb01e5b3aWed, + 05 Aug 2020 17:24:15 GMT\"0x8D8396460C3E165\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:15 GMT$account-encryption-keyfalsetest-share-26ae488a-f23e-4b65-aa5b-f273d6179074Wed, + 05 Aug 2020 19:06:50 GMT\"0x8D83972B592F011\"5120TransactionOptimizedWed, + 05 Aug 2020 19:06:50 GMT$account-encryption-keyfalsetest-share-49d22d21-4363-478e-8f26-1357ef6bd183Wed, + 05 Aug 2020 17:24:21 GMT\"0x8D8396464063943\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:21 GMT$account-encryption-keyfalsetest-share-56abb3eb-0fe3-47ec-802c-288e9eb1c680Wed, + 05 Aug 2020 17:24:17 GMT\"0x8D8396461D987E1\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:16 GMT$account-encryption-keyfalsetest-share-6ddb1225-7c7a-40c8-9c79-0ade2aedc604Wed, + 05 Aug 2020 17:24:19 GMT\"0x8D83964633A2718\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:19 GMT$account-encryption-keyfalsetest-share-82dc1679-40d4-49f1-adfa-bb6a853a0b52Wed, + 05 Aug 2020 19:06:50 GMT\"0x8D83972B538E3FD\"5120TransactionOptimizedWed, + 05 Aug 2020 19:06:50 GMT$account-encryption-keyfalsetest-share-8903864e-96ec-44f5-8912-837a9f23cbb5Wed, + 05 Aug 2020 00:04:00 GMT\"0x8D838D30E563856\"5120TransactionOptimizedWed, + 05 Aug 2020 00:04:00 GMT$account-encryption-keyfalsetest-share-bc25d6be-e54a-4d6f-9c39-9003c3c9e67aWed, + 05 Aug 2020 17:24:18 GMT\"0x8D8396462815131\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:18 GMT$account-encryption-keyfalsetest-share-d5852df4-944a-48b9-8552-eea5bfd94b6bWed, + 05 Aug 2020 17:24:20 GMT\"0x8D8396463BD465A\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:20 GMT$account-encryption-keyfalsetest-share-fa7d1a1f-d065-4d58-bb12-a59f22106473Wed, + 05 Aug 2020 17:24:18 GMT\"0x8D839646251B45A\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:18 GMT$account-encryption-keyfalsetest-share-fcc35a78-e231-4233-a311-d48ee9bb2df7Wed, + 05 Aug 2020 17:24:16 GMT\"0x8D83964610EBC77\"5120TransactionOptimizedWed, + 05 Aug 2020 17:24:16 GMT$account-encryption-keyfalsetest16185160bFri, + 11 Sep 2020 13:51:30 GMT\"0x8D85659C98711F1\"5120TransactionOptimizedFri, + 11 Sep 2020 13:51:30 GMT$account-encryption-keyfalsetest1bd1a12ddTue, + 29 Sep 2020 22:34:36 GMT\"0x8D864C7D8628CD4\"5120TransactionOptimizedTue, + 29 Sep 2020 22:34:36 GMT$account-encryption-keyfalsetest2bd1a12ddTue, + 29 Sep 2020 22:38:12 GMT\"0x8D864C858E9FC21\"5120TransactionOptimizedTue, + 29 Sep 2020 22:38:12 GMT$account-encryption-keyfalsetest403e0ff4Fri, + 11 Sep 2020 13:48:01 GMT\"0x8D856594D05BB2E\"5120TransactionOptimizedFri, + 11 Sep 2020 13:48:01 GMT$account-encryption-keyfalsetest49161594Fri, + 11 Sep 2020 13:44:29 GMT\"0x8D85658CEB83E6D\"5120TransactionOptimizedFri, + 11 Sep 2020 13:44:29 GMT$account-encryption-keyfalsetest50ad1060Tue, + 29 Sep 2020 22:31:15 GMT\"0x8D864C760543D56\"5120TransactionOptimizedTue, + 29 Sep 2020 22:31:14 GMT$account-encryption-keyfalsetest600515ffFri, + 11 Sep 2020 13:52:29 GMT\"0x8D85659ECC7BFF5\"5120TransactionOptimizedFri, + 11 Sep 2020 13:52:29 GMT$account-encryption-keyfalsetest602310dcFri, + 11 Sep 2020 01:46:55 GMT\"0x8D855F490678FD9\"5120TransactionOptimizedFri, + 11 Sep 2020 01:46:55 GMT$account-encryption-keyfalsetest6185160bFri, + 11 Sep 2020 13:50:04 GMT\"0x8D85659960A4A9F\"5120TransactionOptimizedFri, + 11 Sep 2020 13:50:03 GMT$account-encryption-keyfalsetest801b1156Fri, + 11 Sep 2020 01:43:39 GMT\"0x8D855F41B7485A5\"5120TransactionOptimizedFri, + 11 Sep 2020 01:43:39 GMT$account-encryption-keyfalsetest816f1171Fri, + 11 Sep 2020 01:44:03 GMT\"0x8D855F429A8569E\"5120TransactionOptimizedFri, + 11 Sep 2020 01:44:03 GMT$account-encryption-keyfalsetest82b3117dFri, + 11 Sep 2020 01:44:09 GMT\"0x8D855F42D9DFD7A\"5120TransactionOptimizedFri, + 11 Sep 2020 01:44:09 GMT$account-encryption-keyfalsetest8fc916f4Fri, + 11 Sep 2020 13:48:35 GMT\"0x8D8565961566D0E\"5120TransactionOptimizedFri, + 11 Sep 2020 13:48:35 GMT$account-encryption-keyfalsetesta7a1477Fri, + 11 Sep 2020 01:42:27 GMT\"0x8D855F3F0B3CE4D\"5120TransactionOptimizedFri, + 11 Sep 2020 01:42:27 GMT$account-encryption-keyfalsetestcb2f1317Fri, + 11 Sep 2020 01:35:53 GMT\"0x8D855F305C89D8C\"5120TransactionOptimizedFri, + 11 Sep 2020 01:35:53 GMT$account-encryption-keyfalsetestcf0d1359Fri, + 11 Sep 2020 13:46:53 GMT\"0x8D856592431D1AA\"5120TransactionOptimizedFri, + 11 Sep 2020 13:46:53 GMT$account-encryption-keyfalsetestdfa11382Fri, + 11 Sep 2020 01:43:51 GMT\"0x8D855F422BEA24C\"5120TransactionOptimizedFri, + 11 Sep 2020 01:43:51 GMT$account-encryption-keyfalseteste121138eFri, + 11 Sep 2020 01:43:45 GMT\"0x8D855F41F52C3FB\"5120TransactionOptimizedFri, + 11 Sep 2020 01:43:45 GMT$account-encryption-keyfalseteste52d0d77Fri, + 11 Sep 2020 01:42:19 GMT\"0x8D855F3EC19CB5C\"5120TransactionOptimizedFri, + 11 Sep 2020 01:42:19 GMT$account-encryption-keyfalsetestf3ff13d3Fri, + 11 Sep 2020 13:49:19 GMT\"0x8D856597B1CC145\"5120TransactionOptimizedFri, + 11 Sep 2020 13:49:19 GMT$account-encryption-keyfalsetestf55313eeFri, + 11 Sep 2020 13:53:58 GMT\"0x8D8565A21BA7745\"5120TransactionOptimizedFri, + 11 Sep 2020 13:53:58 GMT$account-encryption-keyfalsetestf69713faFri, + 11 Sep 2020 13:54:36 GMT\"0x8D8565A3813B91A\"5120TransactionOptimizedFri, + 11 Sep 2020 13:54:35 GMT$account-encryption-keyfalse" headers: content-type: - application/xml date: - - Wed, 15 Jan 2020 23:54:19 GMT + - Fri, 06 Nov 2020 17:30:22 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -126,7 +234,7 @@ interactions: vary: - Origin x-ms-version: - - '2019-02-02' + - '2020-04-08' status: code: 200 message: OK @@ -142,13 +250,228 @@ interactions: Content-Length: - '0' 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.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 15 Jan 2020 23:54:19 GMT + - Fri, 06 Nov 2020 17:30:23 GMT x-ms-delete-snapshots: - include x-ms-version: - - '2019-02-02' + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share1816f1171?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb59e-401a-0068-1062-b4bc52000000\nTime:2020-11-06T17:30:23.1034670Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:22 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:23 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share182b3117d?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a0-401a-0068-1162-b4bc52000000\nTime:2020-11-06T17:30:23.2835939Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:23 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share336d1532?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a1-401a-0068-1262-b4bc52000000\nTime:2020-11-06T17:30:23.4627205Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share50ad1060?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a2-401a-0068-1362-b4bc52000000\nTime:2020-11-06T17:30:23.6098241Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share602310dc?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a3-401a-0068-1462-b4bc52000000\nTime:2020-11-06T17:30:23.7749408Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' method: DELETE uri: https://storagename.file.core.windows.net/share70e61121?restype=share response: @@ -158,12 +481,2033 @@ interactions: content-length: - '0' date: - - Wed, 15 Jan 2020 23:54:19 GMT + - Fri, 06 Nov 2020 17:30:23 GMT server: - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2020-04-08' status: code: 202 message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share801b1156?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a5-401a-0068-1662-b4bc52000000\nTime:2020-11-06T17:30:24.0841590Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharea7a1477?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a6-401a-0068-1762-b4bc52000000\nTime:2020-11-06T17:30:24.2622855Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:23 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/shareba3e12f1?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a7-401a-0068-1862-b4bc52000000\nTime:2020-11-06T17:30:24.4213981Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:24 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:24 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/shareba3e12f1?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a8-401a-0068-1962-b4bc52000000\nTime:2020-11-06T17:30:24.5955217Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:24 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharec80148e?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5a9-401a-0068-1a62-b4bc52000000\nTime:2020-11-06T17:30:24.7616410Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:24 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharecb2f1317?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ab-401a-0068-1b62-b4bc52000000\nTime:2020-11-06T17:30:24.9327613Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:24 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharee121138e?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ac-401a-0068-1c62-b4bc52000000\nTime:2020-11-06T17:30:25.1148905Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:24 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharee52d0d77?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ad-401a-0068-1d62-b4bc52000000\nTime:2020-11-06T17:30:25.2770042Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharerestorecb2f1317?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ae-401a-0068-1e62-b4bc52000000\nTime:2020-11-06T17:30:25.4521271Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharesamples5?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5af-401a-0068-1f62-b4bc52000000\nTime:2020-11-06T17:30:25.6172438Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharesamples6?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5b0-401a-0068-2062-b4bc52000000\nTime:2020-11-06T17:30:25.7793580Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/sharesamples7?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5b1-401a-0068-2162-b4bc52000000\nTime:2020-11-06T17:30:25.9354675Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-1200db32-dbe6-47c3-8fdc-badfe55a17f7?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5b7-401a-0068-2462-b4bc52000000\nTime:2020-11-06T17:30:26.0975821Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-1c02c6e2-910b-4118-9cc7-3e906d0f6a31?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5b8-401a-0068-2562-b4bc52000000\nTime:2020-11-06T17:30:26.2526909Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:25 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-22baebbe-ef2b-4735-8a37-d5cfb01e5b3a?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5b9-401a-0068-2662-b4bc52000000\nTime:2020-11-06T17:30:26.4148055Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:26 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-26ae488a-f23e-4b65-aa5b-f273d6179074?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ba-401a-0068-2762-b4bc52000000\nTime:2020-11-06T17:30:26.5719162Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-49d22d21-4363-478e-8f26-1357ef6bd183?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5bb-401a-0068-2862-b4bc52000000\nTime:2020-11-06T17:30:26.7440370Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-56abb3eb-0fe3-47ec-802c-288e9eb1c680?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5bc-401a-0068-2962-b4bc52000000\nTime:2020-11-06T17:30:26.9151579Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-6ddb1225-7c7a-40c8-9c79-0ade2aedc604?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5bd-401a-0068-2a62-b4bc52000000\nTime:2020-11-06T17:30:27.1032900Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-82dc1679-40d4-49f1-adfa-bb6a853a0b52?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c0-401a-0068-2b62-b4bc52000000\nTime:2020-11-06T17:30:27.2664053Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:26 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-8903864e-96ec-44f5-8912-837a9f23cbb5?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c2-401a-0068-2c62-b4bc52000000\nTime:2020-11-06T17:30:27.4345233Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:27 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-bc25d6be-e54a-4d6f-9c39-9003c3c9e67a?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c3-401a-0068-2d62-b4bc52000000\nTime:2020-11-06T17:30:27.5946364Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-d5852df4-944a-48b9-8552-eea5bfd94b6b?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c4-401a-0068-2e62-b4bc52000000\nTime:2020-11-06T17:30:27.7507464Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-fa7d1a1f-d065-4d58-bb12-a59f22106473?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c5-401a-0068-2f62-b4bc52000000\nTime:2020-11-06T17:30:27.9278711Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test-share-fcc35a78-e231-4233-a311-d48ee9bb2df7?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c8-401a-0068-3262-b4bc52000000\nTime:2020-11-06T17:30:28.0689705Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test16185160b?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5c9-401a-0068-3362-b4bc52000000\nTime:2020-11-06T17:30:28.2170748Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:27 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test1bd1a12dd?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ca-401a-0068-3462-b4bc52000000\nTime:2020-11-06T17:30:28.3911974Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:28 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test2bd1a12dd?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5cb-401a-0068-3562-b4bc52000000\nTime:2020-11-06T17:30:28.5703232Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test403e0ff4?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5cc-401a-0068-3662-b4bc52000000\nTime:2020-11-06T17:30:28.7334380Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test49161594?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5cd-401a-0068-3762-b4bc52000000\nTime:2020-11-06T17:30:28.8975536Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test50ad1060?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5ce-401a-0068-3862-b4bc52000000\nTime:2020-11-06T17:30:29.0936926Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test600515ff?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5cf-401a-0068-3962-b4bc52000000\nTime:2020-11-06T17:30:29.2468000Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:28 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test602310dc?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d0-401a-0068-3a62-b4bc52000000\nTime:2020-11-06T17:30:29.3929025Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:29 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test6185160b?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d1-401a-0068-3b62-b4bc52000000\nTime:2020-11-06T17:30:29.5930434Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test801b1156?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d2-401a-0068-3c62-b4bc52000000\nTime:2020-11-06T17:30:29.7751721Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test816f1171?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d4-401a-0068-3d62-b4bc52000000\nTime:2020-11-06T17:30:29.9442912Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test82b3117d?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d5-401a-0068-3e62-b4bc52000000\nTime:2020-11-06T17:30:30.0983998Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/test8fc916f4?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d6-401a-0068-3f62-b4bc52000000\nTime:2020-11-06T17:30:30.2625149Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:29 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testa7a1477?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d7-401a-0068-4062-b4bc52000000\nTime:2020-11-06T17:30:30.4376387Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:30 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:30 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testcb2f1317?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d8-401a-0068-4162-b4bc52000000\nTime:2020-11-06T17:30:30.6037557Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:30 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:31 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testcf0d1359?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5d9-401a-0068-4262-b4bc52000000\nTime:2020-11-06T17:30:30.7718741Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:30 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:31 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testdfa11382?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5da-401a-0068-4362-b4bc52000000\nTime:2020-11-06T17:30:30.9580052Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:30 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:31 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/teste121138e?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5db-401a-0068-4462-b4bc52000000\nTime:2020-11-06T17:30:31.1141157Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:30 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:31 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/teste52d0d77?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5dc-401a-0068-4562-b4bc52000000\nTime:2020-11-06T17:30:31.3302701Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:31 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:31 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testf3ff13d3?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5dd-401a-0068-4662-b4bc52000000\nTime:2020-11-06T17:30:31.5784459Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:31 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:32 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testf55313ee?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5de-401a-0068-4762-b4bc52000000\nTime:2020-11-06T17:30:31.7375585Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:31 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 06 Nov 2020 17:30:32 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testf69713fa?restype=share + response: + body: + string: "\uFEFFLeaseIdMissingThere + is currently a lease on the file share and no lease ID was specified in the + request.\nRequestId:db5fb5df-401a-0068-4862-b4bc52000000\nTime:2020-11-06T17:30:31.8996741Z" + headers: + content-length: + - '273' + content-type: + - application/xml + date: + - Fri, 06 Nov 2020 17:30:31 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - LeaseIdMissing + x-ms-version: + - '2020-04-08' + status: + code: 412 + message: There is currently a lease on the file share and no lease ID was specified + in the request. version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_protocol.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_protocol.yaml new file mode 100644 index 000000000000..ff99364f86b9 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_protocol.yaml @@ -0,0 +1,190 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:44 GMT + x-ms-enabled-protocols: + - NFS + x-ms-root-squash: + - RootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare271cd1152?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:44 GMT + etag: + - '"0x8D888221607DB9F"' + last-modified: + - Fri, 13 Nov 2020 22:18:45 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:44 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/testshare271cd1152?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:44 GMT + etag: + - '"0x8D888221607DB9F"' + last-modified: + - Fri, 13 Nov 2020 22:18:45 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-access-tier: + - Premium + x-ms-enabled-protocols: + - NFS + x-ms-has-immutability-policy: + - 'false' + x-ms-has-legal-hold: + - 'false' + x-ms-root-squash: + - RootSquash + x-ms-share-next-allowed-quota-downgrade-time: + - Fri, 13 Nov 2020 22:18:45 GMT + x-ms-share-provisioned-egress-mbps: + - '66' + x-ms-share-provisioned-ingress-mbps: + - '44' + x-ms-share-provisioned-iops: + - '500' + x-ms-share-quota: + - '100' + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:44 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/testshare271cd1152?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:44 GMT + etag: + - '"0x8D888221607DB9F"' + last-modified: + - Fri, 13 Nov 2020 22:18:45 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-access-tier: + - Premium + x-ms-enabled-protocols: + - NFS + x-ms-has-immutability-policy: + - 'false' + x-ms-has-legal-hold: + - 'false' + x-ms-root-squash: + - RootSquash + x-ms-share-next-allowed-quota-downgrade-time: + - Fri, 13 Nov 2020 22:18:45 GMT + x-ms-share-provisioned-egress-mbps: + - '66' + x-ms-share-provisioned-ingress-mbps: + - '44' + x-ms-share-provisioned-iops: + - '500' + x-ms-share-quota: + - '100' + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:44 GMT + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare271cd1152?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:44 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_root_squash_and_protocols.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_root_squash_and_protocols.yaml new file mode 100644 index 000000000000..19ffed122290 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_root_squash_and_protocols.yaml @@ -0,0 +1,236 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:06 GMT + x-ms-enabled-protocols: + - NFS + x-ms-root-squash: + - AllSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare1c4ad1829?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:21:07 GMT + etag: + - '"0x8D888226AFCADD2"' + last-modified: + - Fri, 13 Nov 2020 22:21:07 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:07 GMT + x-ms-enabled-protocols: + - SMB + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare2c4ad1829?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:21:07 GMT + etag: + - '"0x8D888226B1C22A1"' + last-modified: + - Fri, 13 Nov 2020 22:21:08 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:07 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/?include=&comp=list + response: + body: + string: "\uFEFFtestshare1c4ad1829Fri, + 13 Nov 2020 22:21:07 GMT\"0x8D888226AFCADD2\"100NFSAllSquashPremium5004466Fri, + 13 Nov 2020 22:21:07 GMT$account-encryption-keyfalsetestshare2c4ad1829Fri, + 13 Nov 2020 22:21:08 GMT\"0x8D888226B1C22A1\"100SMBPremium5004466Fri, + 13 Nov 2020 22:21:08 GMT$account-encryption-keyfalse" + headers: + content-type: + - application/xml + date: + - Fri, 13 Nov 2020 22:21:07 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:07 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/?include=snapshots&comp=list + response: + body: + string: "\uFEFFtestshare1c4ad1829Fri, + 13 Nov 2020 22:21:07 GMT\"0x8D888226AFCADD2\"100NFSAllSquashPremium5004466Fri, + 13 Nov 2020 22:21:07 GMT$account-encryption-keyfalsetestshare2c4ad1829Fri, + 13 Nov 2020 22:21:08 GMT\"0x8D888226B1C22A1\"100SMBPremium5004466Fri, + 13 Nov 2020 22:21:08 GMT$account-encryption-keyfalse" + headers: + content-type: + - application/xml + date: + - Fri, 13 Nov 2020 22:21:07 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:07 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare1c4ad1829?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:21:07 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:21:07 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare2c4ad1829?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:21:07 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_properties_with_root_squash.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_properties_with_root_squash.yaml new file mode 100644 index 000000000000..27acf4b30c10 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_properties_with_root_squash.yaml @@ -0,0 +1,274 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:53 GMT + x-ms-enabled-protocols: + - NFS + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share1503d161c?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:54 GMT + etag: + - '"0x8D888221BA28AAD"' + last-modified: + - Fri, 13 Nov 2020 22:18:54 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:53 GMT + x-ms-enabled-protocols: + - NFS + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share2503d161c?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:54 GMT + etag: + - '"0x8D888221BC2C301"' + last-modified: + - Fri, 13 Nov 2020 22:18:54 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-root-squash: + - NoRootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share1503d161c?restype=share&comp=properties + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:54 GMT + etag: + - '"0x8D888221BD7F4AB"' + last-modified: + - Fri, 13 Nov 2020 22:18:55 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-root-squash: + - RootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share2503d161c?restype=share&comp=properties + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:54 GMT + etag: + - '"0x8D888221BEA2084"' + last-modified: + - Fri, 13 Nov 2020 22:18:55 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/share1503d161c?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:54 GMT + etag: + - '"0x8D888221BD7F4AB"' + last-modified: + - Fri, 13 Nov 2020 22:18:55 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-access-tier: + - Premium + x-ms-enabled-protocols: + - NFS + x-ms-has-immutability-policy: + - 'false' + x-ms-has-legal-hold: + - 'false' + x-ms-root-squash: + - NoRootSquash + x-ms-share-next-allowed-quota-downgrade-time: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-share-provisioned-egress-mbps: + - '66' + x-ms-share-provisioned-ingress-mbps: + - '44' + x-ms-share-provisioned-iops: + - '500' + x-ms-share-quota: + - '100' + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/share2503d161c?restype=share + response: + body: + string: '' + headers: + date: + - Fri, 13 Nov 2020 22:18:55 GMT + etag: + - '"0x8D888221BEA2084"' + last-modified: + - Fri, 13 Nov 2020 22:18:55 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-access-tier: + - Premium + x-ms-enabled-protocols: + - NFS + x-ms-has-immutability-policy: + - 'false' + x-ms-has-legal-hold: + - 'false' + x-ms-root-squash: + - RootSquash + x-ms-share-next-allowed-quota-downgrade-time: + - Fri, 13 Nov 2020 22:18:54 GMT + x-ms-share-provisioned-egress-mbps: + - '66' + x-ms-share-provisioned-ingress-mbps: + - '44' + x-ms-share-provisioned-iops: + - '500' + x-ms-share-quota: + - '100' + x-ms-version: + - '2020-04-08' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_protocol.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_protocol.yaml new file mode 100644 index 000000000000..cad0ee53dc3a --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_protocol.yaml @@ -0,0 +1,89 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:04 GMT + x-ms-enabled-protocols: + - NFS + x-ms-root-squash: + - RootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare2e33413cf?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:05 GMT + etag: '"0x8D88821FE5E635D"' + last-modified: Fri, 13 Nov 2020 22:18:05 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 201 + message: Created + url: https://seancanarypremiumfile2.file.core.windows.net/testshare2e33413cf?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:04 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/testshare2e33413cf?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:05 GMT + etag: '"0x8D88821FE5E635D"' + last-modified: Fri, 13 Nov 2020 22:18:05 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-access-tier: Premium + x-ms-enabled-protocols: NFS + x-ms-has-immutability-policy: 'false' + x-ms-has-legal-hold: 'false' + x-ms-root-squash: RootSquash + x-ms-share-next-allowed-quota-downgrade-time: Fri, 13 Nov 2020 22:18:05 GMT + x-ms-share-provisioned-egress-mbps: '66' + x-ms-share-provisioned-ingress-mbps: '44' + x-ms-share-provisioned-iops: '500' + x-ms-share-quota: '100' + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/testshare2e33413cf?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:04 GMT + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare2e33413cf?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:05 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile2.file.core.windows.net/testshare2e33413cf?restype=share +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_root_squash_and_protocols.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_root_squash_and_protocols.yaml new file mode 100644 index 000000000000..7f3424c56b7e --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_root_squash_and_protocols.yaml @@ -0,0 +1,172 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:32 GMT + x-ms-enabled-protocols: + - NFS + x-ms-root-squash: + - AllSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare15df31aa6?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:33 GMT + etag: '"0x8D888220F26CF6C"' + last-modified: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 201 + message: Created + url: https://seancanarypremiumfile2.file.core.windows.net/testshare15df31aa6?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:32 GMT + x-ms-enabled-protocols: + - SMB + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/testshare25df31aa6?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:33 GMT + etag: '"0x8D888220F38FB50"' + last-modified: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 201 + message: Created + url: https://seancanarypremiumfile2.file.core.windows.net/testshare25df31aa6?restype=share +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:33 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/?include=&comp=list + response: + body: + string: "\uFEFFtestshare15df31aa6Fri, + 13 Nov 2020 22:18:33 GMT\"0x8D888220F26CF6C\"100NFSAllSquashPremium5004466Fri, + 13 Nov 2020 22:18:33 GMT$account-encryption-keyfalsetestshare25df31aa6Fri, + 13 Nov 2020 22:18:33 GMT\"0x8D888220F38FB50\"100SMBPremium5004466Fri, + 13 Nov 2020 22:18:33 GMT$account-encryption-keyfalse" + headers: + content-type: application/xml + date: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/?include=&comp=list +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:33 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/?include=snapshots&comp=list + response: + body: + string: "\uFEFFtestshare15df31aa6Fri, + 13 Nov 2020 22:18:33 GMT\"0x8D888220F26CF6C\"100NFSAllSquashPremium5004466Fri, + 13 Nov 2020 22:18:33 GMT$account-encryption-keyfalsetestshare25df31aa6Fri, + 13 Nov 2020 22:18:33 GMT\"0x8D888220F38FB50\"100SMBPremium5004466Fri, + 13 Nov 2020 22:18:33 GMT$account-encryption-keyfalse" + headers: + content-type: application/xml + date: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/?include=snapshots&comp=list +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:33 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare15df31aa6?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile2.file.core.windows.net/testshare15df31aa6?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:33 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/testshare25df31aa6?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:33 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile2.file.core.windows.net/testshare25df31aa6?restype=share +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_properties_with_root_squash.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_properties_with_root_squash.yaml new file mode 100644 index 000000000000..6a40cbd9b32a --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_properties_with_root_squash.yaml @@ -0,0 +1,262 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:24 GMT + x-ms-enabled-protocols: + - NFS + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share1dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A7DB04D"' + last-modified: Fri, 13 Nov 2020 22:18:25 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 201 + message: Created + url: https://seancanarypremiumfile2.file.core.windows.net/share1dd031899?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-enabled-protocols: + - NFS + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share2dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A88AED7"' + last-modified: Fri, 13 Nov 2020 22:18:25 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 201 + message: Created + url: https://seancanarypremiumfile2.file.core.windows.net/share2dd031899?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-root-squash: + - NoRootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share1dd031899?restype=share&comp=properties + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A94325A"' + last-modified: Fri, 13 Nov 2020 22:18:26 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/share1dd031899?restype=share&comp=properties +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-root-squash: + - RootSquash + x-ms-version: + - '2020-04-08' + method: PUT + uri: https://storagename.file.core.windows.net/share2dd031899?restype=share&comp=properties + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A9DD11B"' + last-modified: Fri, 13 Nov 2020 22:18:26 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/share2dd031899?restype=share&comp=properties +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/share1dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A94325A"' + last-modified: Fri, 13 Nov 2020 22:18:26 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-access-tier: Premium + x-ms-enabled-protocols: NFS + x-ms-has-immutability-policy: 'false' + x-ms-has-legal-hold: 'false' + x-ms-root-squash: NoRootSquash + x-ms-share-next-allowed-quota-downgrade-time: Fri, 13 Nov 2020 22:18:25 GMT + x-ms-share-provisioned-egress-mbps: '66' + x-ms-share-provisioned-ingress-mbps: '44' + x-ms-share-provisioned-iops: '500' + x-ms-share-quota: '100' + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/share1dd031899?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/share2dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + etag: '"0x8D888220A9DD11B"' + last-modified: Fri, 13 Nov 2020 22:18:26 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-access-tier: Premium + x-ms-enabled-protocols: NFS + x-ms-has-immutability-policy: 'false' + x-ms-has-legal-hold: 'false' + x-ms-root-squash: RootSquash + x-ms-share-next-allowed-quota-downgrade-time: Fri, 13 Nov 2020 22:18:25 GMT + x-ms-share-provisioned-egress-mbps: '66' + x-ms-share-provisioned-ingress-mbps: '44' + x-ms-share-provisioned-iops: '500' + x-ms-share-quota: '100' + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/share2dd031899?restype=share +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-version: + - '2020-04-08' + method: GET + uri: https://storagename.file.core.windows.net/?include=snapshots&comp=list + response: + body: + string: "\uFEFFshare1dd031899Fri, + 13 Nov 2020 22:18:26 GMT\"0x8D888220A94325A\"100NFSNoRootSquashPremium5004466Fri, + 13 Nov 2020 22:18:25 GMT$account-encryption-keyfalseshare2dd031899Fri, + 13 Nov 2020 22:18:26 GMT\"0x8D888220A9DD11B\"100NFSRootSquashPremium5004466Fri, + 13 Nov 2020 22:18:25 GMT$account-encryption-keyfalse" + headers: + content-type: application/xml + date: Fri, 13 Nov 2020 22:18:25 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 200 + message: OK + url: https://seancanarypremiumfile2.file.core.windows.net/?include=snapshots&comp=list +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share1dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile2.file.core.windows.net/share1dd031899?restype=share +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-file-share/12.3.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 13 Nov 2020 22:18:25 GMT + x-ms-delete-snapshots: + - include + x-ms-version: + - '2020-04-08' + method: DELETE + uri: https://storagename.file.core.windows.net/share2dd031899?restype=share + response: + body: + string: '' + headers: + date: Fri, 13 Nov 2020 22:18:25 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-04-08' + status: + code: 202 + message: Accepted + url: https://seancanarypremiumfile2.file.core.windows.net/share2dd031899?restype=share +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/test_share.py b/sdk/storage/azure-storage-file-share/tests/test_share.py index 0e408a125e82..03410e40e142 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share.py @@ -25,7 +25,8 @@ ShareDirectoryClient, ShareFileClient, ShareClient, - generate_share_sas) + generate_share_sas, + ShareRootSquash, ShareProtocols) from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -62,10 +63,10 @@ def _get_share_reference(self, prefix=TEST_SHARE_PREFIX): self.test_shares.append(share_name) return share - def _create_share(self, prefix=TEST_SHARE_PREFIX): + def _create_share(self, prefix=TEST_SHARE_PREFIX, **kwargs): share_client = self._get_share_reference(prefix) try: - share_client.create_share() + share_client.create_share(**kwargs) except: pass return share_client @@ -828,6 +829,62 @@ def test_set_share_properties(self, resource_group, location, storage_account, s self.assertEqual(share2_tier, "Cool") self._delete_shares() + @GlobalStorageAccountPreparer() + def test_create_share_with_protocol(self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + + # Act + share_client = self._get_share_reference("testshare2") + with self.assertRaises(ValueError): + share_client.create_share(protocols="SMB", root_squash=ShareRootSquash.all_squash) + share_client.create_share(protocols="NFS", root_squash=ShareRootSquash.root_squash) + share_enabled_protocol = share_client.get_share_properties().protocols + share_root_squash = share_client.get_share_properties().root_squash + + # Assert + self.assertEqual(share_enabled_protocol, ["NFS"]) + self.assertEqual(share_root_squash, ShareRootSquash.root_squash) + share_client.delete_share() + + @GlobalStorageAccountPreparer() + def test_set_share_properties_with_root_squash(self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + share1 = self._create_share("share1", protocols=ShareProtocols.NFS) + share2 = self._create_share("share2", protocols=ShareProtocols.NFS) + + share1.set_share_properties(root_squash="NoRootSquash") + share2.set_share_properties(root_squash=ShareRootSquash.root_squash) + + # Act + share1_props = share1.get_share_properties() + share2_props = share2.get_share_properties() + + # # Assert + self.assertEqual(share1_props.root_squash, ShareRootSquash.no_root_squash) + self.assertEqual(share1_props.protocols, ['NFS']) + self.assertEqual(share2_props.root_squash, ShareRootSquash.root_squash) + self.assertEqual(share2_props.protocols, ['NFS']) + + @GlobalStorageAccountPreparer() + def test_list_shares_with_root_squash_and_protocols( + self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + self._create_share(prefix="testshare1", protocols="NFS", root_squash=ShareRootSquash.all_squash) + self._create_share(prefix="testshare2", protocols=ShareProtocols.SMB) + # Act + shares = list(self.fsc.list_shares()) + share1_props = shares[0] + share2_props = shares[1] + + # Assert + self.assertIsNotNone(shares) + self.assertGreaterEqual(len(shares), 2) + self.assertEqual(share1_props.root_squash, ShareRootSquash.all_squash) + self.assertEqual(share1_props.protocols, ["NFS"]) + self.assertEqual(share2_props.root_squash, None) + self.assertEqual(share2_props.protocols, ["SMB"]) + self._delete_shares() + @GlobalResourceGroupPreparer() @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') def test_get_share_properties_for_premium_account(self, resource_group, location, storage_account, storage_account_key): diff --git a/sdk/storage/azure-storage-file-share/tests/test_share_async.py b/sdk/storage/azure-storage-file-share/tests/test_share_async.py index 8765cee58fca..eae49c46b29c 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share_async.py @@ -24,12 +24,13 @@ ShareSasPermissions, ShareAccessTier, generate_share_sas, + ShareRootSquash, ShareProtocols ) from azure.storage.fileshare.aio import ( ShareServiceClient, ShareDirectoryClient, ShareFileClient, - ShareClient + ShareClient, ) from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer @@ -85,10 +86,10 @@ def _get_share_reference(self, prefix=TEST_SHARE_PREFIX): self.test_shares.append(share) return share - async def _create_share(self, prefix=TEST_SHARE_PREFIX): + async def _create_share(self, prefix=TEST_SHARE_PREFIX, **kwargs): share_client = self._get_share_reference(prefix) try: - await share_client.create_share() + await share_client.create_share(**kwargs) except: pass return share_client @@ -907,6 +908,70 @@ async def test_set_share_properties_async(self, resource_group, location, storag self.assertEqual(share2_tier, "Cool") await self._delete_shares() + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_create_share_with_protocol(self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + + # Act + share_client = self._get_share_reference("testshare2") + with self.assertRaises(ValueError): + await share_client.create_share(protocols="SMB", root_squash=ShareRootSquash.all_squash) + await share_client.create_share(protocols="NFS", root_squash=ShareRootSquash.root_squash) + props = await share_client.get_share_properties() + share_enabled_protocol = props.protocols + share_root_squash = props.root_squash + + # Assert + self.assertEqual(share_enabled_protocol, ["NFS"]) + self.assertEqual(share_root_squash, ShareRootSquash.root_squash) + await share_client.delete_share() + + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_set_share_properties_with_root_squash(self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + share1 = await self._create_share("share1", protocols=ShareProtocols.NFS) + share2 = await self._create_share("share2", protocols=ShareProtocols.NFS) + + await share1.set_share_properties(root_squash="NoRootSquash") + + await share2.set_share_properties(root_squash=ShareRootSquash.root_squash) + + # Act + props1 = await share1.get_share_properties() + share1_root_squash = props1.root_squash + props2 = await share2.get_share_properties() + share2_root_squash = props2.root_squash + + # Assert + self.assertEqual(share1_root_squash, ShareRootSquash.no_root_squash) + self.assertEqual(share2_root_squash, ShareRootSquash.root_squash) + await self._delete_shares() + + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_list_shares_with_root_squash_and_protocols( + self, resource_group, location, storage_account, storage_account_key): + self._setup(storage_account, storage_account_key) + await self._create_share(prefix="testshare1", protocols="NFS", root_squash=ShareRootSquash.all_squash) + await self._create_share(prefix="testshare2", protocols=ShareProtocols.SMB) + # Act + shares = [] + async for s in self.fsc.list_shares(): + shares.append(s) + share1_props = shares[0] + share2_props = shares[1] + + # Assert + self.assertIsNotNone(shares) + self.assertGreaterEqual(len(shares), 2) + self.assertEqual(share1_props.root_squash, ShareRootSquash.all_squash) + self.assertEqual(share1_props.protocols, ["NFS"]) + self.assertEqual(share2_props.root_squash, None) + self.assertEqual(share2_props.protocols, ["SMB"]) + await self._delete_shares() + @GlobalResourceGroupPreparer() @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') @AsyncStorageTestCase.await_prepared_test