From cc4c0777038260b9ffe26b3ceb1bb9b2739e3ee5 Mon Sep 17 00:00:00 2001 From: zezha-msft Date: Fri, 7 Jun 2019 00:51:19 -0700 Subject: [PATCH] Added APIs to set and get access control properties for paths --- azure-storage-blob/ChangeLog.md | 2 +- .../azure/storage/blob/_deserialization.py | 10 + .../azure/storage/blob/baseblobservice.py | 180 ++++++- .../azure/storage/blob/models.py | 22 + .../blob/{test_directory.py => test_path.py} | 105 +++- ...directory_with_hierarchical_namespace.yaml | 245 --------- ...ectory_without_hierarchical_namespace.yaml | 499 ------------------ ...directory_with_hierarchical_namespace.yaml | 45 -- ...ectory_without_hierarchical_namespace.yaml | 48 -- ...directory_with_hierarchical_namespace.yaml | 269 ++++++++++ ...ectory_without_hierarchical_namespace.yaml | 499 ++++++++++++++++++ ...s_control_with_hierarchical_namespace.yaml | 148 ++++++ ...directory_with_hierarchical_namespace.yaml | 45 ++ ...ectory_without_hierarchical_namespace.yaml | 48 ++ 14 files changed, 1285 insertions(+), 880 deletions(-) rename tests/blob/{test_directory.py => test_path.py} (76%) delete mode 100644 tests/recordings/test_directory.test_create_delete_directory_with_hierarchical_namespace.yaml delete mode 100644 tests/recordings/test_directory.test_create_delete_directory_without_hierarchical_namespace.yaml delete mode 100644 tests/recordings/test_directory.test_rename_directory_with_hierarchical_namespace.yaml delete mode 100644 tests/recordings/test_directory.test_rename_directory_without_hierarchical_namespace.yaml create mode 100644 tests/recordings/test_path.test_create_delete_directory_with_hierarchical_namespace.yaml create mode 100644 tests/recordings/test_path.test_create_delete_directory_without_hierarchical_namespace.yaml create mode 100644 tests/recordings/test_path.test_get_set_access_control_with_hierarchical_namespace.yaml create mode 100644 tests/recordings/test_path.test_rename_directory_with_hierarchical_namespace.yaml create mode 100644 tests/recordings/test_path.test_rename_directory_without_hierarchical_namespace.yaml diff --git a/azure-storage-blob/ChangeLog.md b/azure-storage-blob/ChangeLog.md index 84d3dbb3..cf51eff7 100644 --- a/azure-storage-blob/ChangeLog.md +++ b/azure-storage-blob/ChangeLog.md @@ -4,7 +4,7 @@ ## Version XX.XX.XX -- Added support for directory operations: create, rename, and delete. +- Added support for path operations: create and delete directory, rename path, get and set path access control. ## Version 2.0.1: diff --git a/azure-storage-blob/azure/storage/blob/_deserialization.py b/azure-storage-blob/azure/storage/blob/_deserialization.py index ff42da20..4d5729ba 100644 --- a/azure-storage-blob/azure/storage/blob/_deserialization.py +++ b/azure-storage-blob/azure/storage/blob/_deserialization.py @@ -37,6 +37,7 @@ BlobPrefix, AccountInformation, UserDelegationKey, + PathProperties, ) from ._encryption import _decrypt_blob from azure.storage.common.models import _list @@ -559,3 +560,12 @@ def _convert_xml_to_user_delegation_key(response): def _parse_continuation_token(response): marker = response.headers.get('x-ms-continuation') return marker if marker is not '' else None + + +def _parse_path_permission_and_acl(response): + props = PathProperties() + props.owner = response.headers.get('x-ms-owner') + props.group = response.headers.get('x-ms-group') + props.permissions = response.headers.get('x-ms-permissions') + props.acl = response.headers.get('x-ms-acl') + return props diff --git a/azure-storage-blob/azure/storage/blob/baseblobservice.py b/azure-storage-blob/azure/storage/blob/baseblobservice.py index 1700df04..86f92b49 100644 --- a/azure-storage-blob/azure/storage/blob/baseblobservice.py +++ b/azure-storage-blob/azure/storage/blob/baseblobservice.py @@ -72,6 +72,7 @@ _parse_account_information, _convert_xml_to_user_delegation_key, _parse_continuation_token, + _parse_path_permission_and_acl, ) from ._download_chunking import _download_blob_chunks from ._error import ( @@ -1545,7 +1546,6 @@ def set_blob_service_properties( ''' if all(parameter is None for parameter in [logging, hour_metrics, minute_metrics, cors, target_version, delete_retention_policy, static_website]): - raise ValueError("set_blob_service_properties should be called with at least one parameter") request = HTTPRequest() @@ -3549,19 +3549,19 @@ def delete_directory(self, container_name, directory_path, fail_not_exist=False, else: return True, self._perform_request(request, parser=_parse_continuation_token) - def rename_directory(self, container_name, new_directory_path, source_directory_path, - mode=None, marker=None, lease_id=None, source_lease_id=None, - metadata=None, source_if_modified_since=None, source_if_unmodified_since=None, - source_if_match=None, source_if_none_match=None, timeout=None): + def rename_path(self, container_name, new_path, source_path, + mode=None, marker=None, lease_id=None, source_lease_id=None, + metadata=None, source_if_modified_since=None, source_if_unmodified_since=None, + source_if_match=None, source_if_none_match=None, timeout=None): """ - Rename a directory which can contain other directories or blobs. + Rename a blob or directory(which can contain other directories or blobs). :param str container_name: Name of existing container. - :param str new_directory_path: - New path for source_directory_path. Ex: 'dirfoo/dirsubfoo'. - :param str source_directory_path: - Directory to be renamed. Ex: 'dirfoo/dirbar'. + :param str new_path: + New path for source_path. Ex: 'dirfoo/dirsubfoo'. + :param str source_path: + Path to be renamed. Ex: 'dirfoo/dirbar'. :param mode: Optional. Valid only when namespace is enabled. This parameter determines the behavior of the rename operation. @@ -3573,13 +3573,13 @@ def rename_directory(self, container_name, new_directory_path, source_directory_ a continuation token is returned. When a continuation token is returned, it must be specified in a subsequent invocation of the rename operation to continue renaming the directory. :param str lease_id: - Optional. A lease ID for the new_directory_path. - The new_directory_path must have an active lease and the lease ID must match. + Optional. A lease ID for the new_path. + The new_path must have an active lease and the lease ID must match. :param str source_lease_id: - Optional. A lease ID for the source_directory_path. - The source_directory_path must have an active lease and the lease ID must match. + Optional. A lease ID for the source_path. + The source_path must have an active lease and the lease ID must match. :param metadata: - Optional. A dict with name_value pairs to associate with the directory as metadata. + Optional. A dict with name_value pairs to associate with the path as metadata. Example:{'Category':'test'}. If metadata is specified, it will overwrite the existing metadata; otherwise, the existing metadata will be preserved. @@ -3603,21 +3603,21 @@ def rename_directory(self, container_name, new_directory_path, source_directory_ A continuation marker if applicable. Otherwise return None. :rtype: str """ - _validate_not_none('source_directory_path', source_directory_path) - _validate_not_none('new_directory_path', new_directory_path) + _validate_not_none('source_path', source_path) + _validate_not_none('new_path', new_path) request = HTTPRequest() # TODO remove endpoint swapping after service update request.host_locations = self._swap_blob_endpoints(self._get_host_locations()) request.method = 'PUT' - request.path = _get_path(container_name, new_directory_path) + request.path = _get_path(container_name, new_path) request.query = { 'mode': mode, 'continuation': _to_str(marker), 'timeout': _int_to_str(timeout), } request.headers = { - 'x-ms-rename-source': _get_path(container_name, source_directory_path), + 'x-ms-rename-source': _get_path(container_name, source_path), 'x-ms-lease-id': _to_str(lease_id), 'x-ms-source-lease-id': _to_str(source_lease_id), 'x-ms-source-if-modified-since': _datetime_to_utc_string(source_if_modified_since), @@ -3629,6 +3629,148 @@ def rename_directory(self, container_name, new_directory_path, source_directory_ _add_file_or_directory_properties_header(metadata, request) return self._perform_request(request, parser=_parse_continuation_token) + def get_path_access_control(self, container_name, path, user_principle_names=False, + lease_id=None, if_modified_since=None, if_unmodified_since=None, + if_match=None, if_none_match=None, timeout=None): + """ + Retrieve the access control properties of a path(directory or blob). + + :param str container_name: + Name of existing container. + :param str path: + Path of the directory/blob. + :param user_principle_names: + Valid only when Hierarchical Namespace is enabled for the account. + If "true", the user identity values returned for owner, group, and acl will be transformed + from Azure Active Directory Object IDs to User Principal Names. + If "false", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translated + because they do not have unique friendly names. + :param str lease_id: + Required if the path has an active lease. + :param datetime if_modified_since: + A date and time value. Specify this header to perform the operation only if the resource + has been modified since the specified date and time. + :param datetime if_unmodified_since: + A date and time value. Specify this header to perform the operation only if the resource + has not been modified since the specified date and time. + :param datetime if_match: + An ETag value. Specify this header to perform the operation + only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + :param datetime if_none_match: + An ETag value or the special wildcard ("*") value. + Specify this header to perform the operation only if the resource's ETag + does not match the value specified. The ETag must be specified in quotes. + :param int timeout: + The timeout parameter is expressed in seconds. + :return: ETag and last modified time of the new directory. + :rtype: :class:`~azure.storage.blob.models.ResourceProperties` + """ + _validate_not_none('path', path) + + request = HTTPRequest() + # TODO remove endpoint swapping after service update + request.host_locations = self._swap_blob_endpoints(self._get_host_locations()) + request.method = 'HEAD' + request.path = _get_path(container_name, path) + request.query = { + 'action': 'getAccessControl', + 'upn': _to_str(user_principle_names), + 'timeout': _int_to_str(timeout), + } + request.headers = { + 'x-ms-lease-id': _to_str(lease_id), + 'If-Modified-Since': _datetime_to_utc_string(if_modified_since), + 'If-Unmodified-Since': _datetime_to_utc_string(if_unmodified_since), + 'If-Match': _to_str(if_match), + 'If-None-Match': _to_str(if_none_match), + } + return self._perform_request(request, parser=_parse_path_permission_and_acl) + + def set_path_access_control(self, container_name, path, owner=None, group=None, permissions=None, + acl=None, lease_id=None, if_modified_since=None, if_unmodified_since=None, + if_match=None, if_none_match=None, timeout=None): + """ + Set the access control properties of a path(directory or blob). + + :param str container_name: + Name of existing container. + :param str path: + Path of the directory/blob. + :param str owner: + Sets the owner of the file or directory. + :param str group: + Sets the owning group of the file or directory. + :param str permissions: + Invalid in conjunction with acl. + Sets POSIX access permissions for the file owner, the file owning group, and others. + Each class may be granted read, write, or execute permission. + The sticky bit is also supported. Both symbolic (rwxrw-rw-) + and 4-digit octal notation (e.g. 0766) are supported. + :param str acl: + Invalid in conjunction with permissions. + Sets POSIX access control rights on files and directories. + The value is a comma-separated list of access control entries that fully replaces the existing + access control list (ACL). Each access control entry (ACE) consists of a scope, a type, + a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". + The scope must be "default" to indicate the ACE belongs to the default ACL for a directory; + otherwise scope is implicit and the ACE belongs to the access ACL. + There are four ACE types: "user" grants rights to the owner or a named user, + "group" grants rights to the owning group or a named group, + "mask" restricts rights granted to named users and the members of groups, + and "other" grants rights to all users not found in any of the other entries. + The user or group identifier is omitted for entries of type "mask" and "other". + The user or group identifier is also omitted for the owner and owning group. + The permission field is a 3-character sequence where the first character is 'r' to grant read access, + the second character is 'w' to grant write access, and the third character is 'x' + to grant execute permission. If access is not granted, the '-' character is used to denote + that the permission is denied. For example, the following ACL grants read, write, and execute rights to + the file owner and john.doe@contoso, the read right to the owning group, + and nothing to everyone else: "user::rwx,user:john.doe@contoso:rwx,group::r--,other::---,mask=rwx". + :param str lease_id: + Required if the path has an active lease. + :param datetime if_modified_since: + A date and time value. Specify this header to perform the operation only if the resource + has been modified since the specified date and time. + :param datetime if_unmodified_since: + A date and time value. Specify this header to perform the operation only if the resource + has not been modified since the specified date and time. + :param datetime if_match: + An ETag value. Specify this header to perform the operation + only if the resource's ETag matches the value specified. The ETag must be specified in quotes. + :param datetime if_none_match: + An ETag value or the special wildcard ("*") value. + Specify this header to perform the operation only if the resource's ETag + does not match the value specified. The ETag must be specified in quotes. + :param int timeout: + The timeout parameter is expressed in seconds. + :return: ETag and last modified time of the new directory. + :rtype: :class:`~azure.storage.blob.models.ResourceProperties` + """ + _validate_not_none('path', path) + + request = HTTPRequest() + # TODO remove endpoint swapping after service update + request.host_locations = self._swap_blob_endpoints(self._get_host_locations()) + request.method = 'PATCH' + request.path = _get_path(container_name, path) + request.query = { + 'action': 'setAccessControl', + 'timeout': _int_to_str(timeout), + } + request.headers = { + 'x-ms-owner': _to_str(owner), + 'x-ms-group': _to_str(group), + 'x-ms-permissions': _to_str(permissions), + 'x-ms-acl': _to_str(acl), + 'x-ms-lease-id': _to_str(lease_id), + 'If-Modified-Since': _datetime_to_utc_string(if_modified_since), + 'If-Unmodified-Since': _datetime_to_utc_string(if_unmodified_since), + 'If-Match': _to_str(if_match), + 'If-None-Match': _to_str(if_none_match), + } + return self._perform_request(request, parser=_parse_base_properties) + # ----------------------------Helpers for directory manipulations---------------------------- # @staticmethod def _swap_blob_endpoints(host_locations): diff --git a/azure-storage-blob/azure/storage/blob/models.py b/azure-storage-blob/azure/storage/blob/models.py index 1bd3874a..5a8b8a73 100644 --- a/azure-storage-blob/azure/storage/blob/models.py +++ b/azure-storage-blob/azure/storage/blob/models.py @@ -823,3 +823,25 @@ def __init__(self): self.signed_service = None self.signed_version = None self.value = None + + +class PathProperties(object): + """ + Represent a path's properties(only permissions and acl at the moment). + The path can be either a directory or a file. + + :ivar string owner: + Represents the owner of the path. + :ivar string group: + Represents the group of the path. + :ivar string permissions: + Represents the permissions of the path. + :ivar string acl: + Represents the acl of the path. + """ + + def __init__(self): + self.owner = None + self.group = None + self.permissions = None + self.acl = None diff --git a/tests/blob/test_directory.py b/tests/blob/test_path.py similarity index 76% rename from tests/blob/test_directory.py rename to tests/blob/test_path.py index 6992c6e2..c4e325d5 100644 --- a/tests/blob/test_directory.py +++ b/tests/blob/test_path.py @@ -29,9 +29,9 @@ ) -class StorageDirectoryTest(StorageTestCase): +class StoragePathTest(StorageTestCase): def setUp(self): - super(StorageDirectoryTest, self).setUp() + super(StoragePathTest, self).setUp() self.bs = self._create_storage_service(BlockBlobService, self.settings) self.bs_namespace = self._create_storage_service_with_hierarchical_namespace(BlockBlobService, self.settings) @@ -48,7 +48,7 @@ def tearDown(self): if not self.is_playback(): self.bs.delete_container(self.container_name) self.bs_namespace._delete_file_system(self.container_name) - return super(StorageDirectoryTest, self).tearDown() + return super(StoragePathTest, self).tearDown() def _get_directory_reference(self, suffix=""): return self.get_resource_name("directorytest" + suffix) @@ -160,6 +160,14 @@ def create_directory_with_permission_implementation(self, blob_service, hierarch self.assertIsNotNone(props.etag) self.assertIsNotNone(props.last_modified) + # Verify if permissions are set + props = blob_service.get_path_access_control(self.container_name, directory_name) + self.assertIsNotNone(props) + self.assertIsNotNone(props.owner) + self.assertIsNotNone(props.permissions) + self.assertIsNotNone(props.group) + self.assertIsNotNone(props.acl) + # Cleanup blob_service.delete_directory(self.container_name, directory_name) @@ -299,7 +307,7 @@ def rename_directory_simple_test_implementation(self, blob_service): new_directory_name = self._get_directory_reference("new") # Act - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name) + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name) # Assert self.assertIsNone(marker) @@ -318,7 +326,7 @@ def rename_directory_marker_test_implementation(self, blob_service): self._create_sub_dirs(blob_service, directory_name, num_of_sub_dir=1000) # Act - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name) + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name) # Assert self.assertIsNotNone(marker) @@ -327,8 +335,8 @@ def rename_directory_marker_test_implementation(self, blob_service): # Continue the rename count = 0 while marker is not None: - new_marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - marker=marker) + new_marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name, + marker=marker) self.assertNotEqual(marker, new_marker) marker = new_marker count += 1 @@ -343,12 +351,12 @@ def rename_directory_access_conditions_test_implementation(self, blob_service): # if_match fails with self.assertRaises(AzureHttpError): - blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_match='0x111111111111111') + blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_match='0x111111111111111') # if_match succeeds - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_match=props.etag) + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_match=props.etag) self.assertIsNone(marker) # Arrange @@ -356,12 +364,12 @@ def rename_directory_access_conditions_test_implementation(self, blob_service): # if_none_match fails with self.assertRaises(AzureHttpError): - blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_none_match=props.etag) + blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_none_match=props.etag) # if_none_match succeeds - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_none_match='0x111111111111111') + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_none_match='0x111111111111111') self.assertIsNone(marker) # Arrange @@ -369,12 +377,12 @@ def rename_directory_access_conditions_test_implementation(self, blob_service): # if_modified_since fails with self.assertRaises(AzureHttpError): - blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_modified_since=props.last_modified) + blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_modified_since=props.last_modified) # if_modified_since succeeds - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_modified_since=props.last_modified - datetime.timedelta( + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_modified_since=props.last_modified - datetime.timedelta( minutes=1)) self.assertIsNone(marker) @@ -383,11 +391,62 @@ def rename_directory_access_conditions_test_implementation(self, blob_service): # if_unmodified_since fails with self.assertRaises(AzureHttpError): - blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_unmodified_since=props.last_modified - datetime.timedelta( + blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_unmodified_since=props.last_modified - datetime.timedelta( minutes=1)) # if_unmodified_since succeeds - marker = blob_service.rename_directory(self.container_name, new_directory_name, directory_name, - source_if_unmodified_since=props.last_modified) + marker = blob_service.rename_path(self.container_name, new_directory_name, directory_name, + source_if_unmodified_since=props.last_modified) self.assertIsNone(marker) + + @record + def test_get_set_access_control_with_hierarchical_namespace(self): + # Arrange + directory_name = self._get_directory_reference() + props = self.bs_namespace.create_directory(self.container_name, directory_name,) + self.assertIsNotNone(props.etag) + self.assertIsNotNone(props.last_modified) + + # Act: get acl + props = self.bs_namespace.get_path_access_control( + self.container_name, directory_name, user_principle_names=True) + # validate the default values are being returned + self.assertIsNotNone(props) + self.assertIsNotNone(props.owner) + self.assertIsNotNone(props.permissions) + self.assertIsNotNone(props.group) + self.assertIsNotNone(props.acl) + + # Act: set acl + test_owner = self.settings.ACTIVE_DIRECTORY_APPLICATION_ID + test_group = self.settings.ACTIVE_DIRECTORY_APPLICATION_ID + test_acl = 'user::rwx,group::r--,other::r--' + props = self.bs_namespace.set_path_access_control(self.container_name, directory_name, + owner=test_owner, group=test_group, acl=test_acl) + self.assertIsNotNone(props.etag) + self.assertIsNotNone(props.last_modified) + + # Assert + props = self.bs_namespace.get_path_access_control(self.container_name, directory_name, user_principle_names=True) + self.assertIsNotNone(props) + self.assertEqual(props.owner, test_owner) + self.assertEqual(props.group, test_group) + self.assertEqual(props.acl, test_acl) + + # Act: set permissions + test_owner = self.settings.ACTIVE_DIRECTORY_APPLICATION_ID + test_group = self.settings.ACTIVE_DIRECTORY_APPLICATION_ID + test_permissions = 'rwxrw-rw-' + props = self.bs_namespace.set_path_access_control(self.container_name, directory_name, + owner=test_owner, group=test_group, + permissions=test_permissions) + self.assertIsNotNone(props.etag) + self.assertIsNotNone(props.last_modified) + + # Assert + props = self.bs_namespace.get_path_access_control(self.container_name, directory_name) + self.assertIsNotNone(props) + self.assertEqual(props.owner, test_owner) + self.assertEqual(props.group, test_group) + self.assertEqual(props.permissions, test_permissions) diff --git a/tests/recordings/test_directory.test_create_delete_directory_with_hierarchical_namespace.yaml b/tests/recordings/test_directory.test_create_delete_directory_with_hierarchical_namespace.yaml deleted file mode 100644 index b3aa214c..00000000 --- a/tests/recordings/test_directory.test_create_delete_directory_with_hierarchical_namespace.yaml +++ /dev/null @@ -1,245 +0,0 @@ -interactions: -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8d17ae72-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:10 GMT'] - x-ms-properties: ['foo=YmFy,mama=bWlh'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:11 GMT'] - ETag: ['"0x8D6297571A4A833"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:11 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff34-001f-00a9-0c5e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e0badec-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - ETag: ['"0x8D62975724499BF"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff35-001f-00a9-0d5e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e123e46-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff36-001f-00a9-0e5e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e17878e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=True - response: - body: {string: '{"error":{"code":"PathNotFound","message":"The specified path - does not exist.\nRequestId:3e5fff37-001f-00a9-0f5e-5b38ea000000\nTime:2018-10-03T21:16:12.5240091Z"}}'} - headers: - Content-Length: ['163'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [PathNotFound] - x-ms-request-id: [3e5fff37-001f-00a9-0f5e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 404, message: The specified path does not exist.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e1ccd7a-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=True - response: - body: {string: '{"error":{"code":"PathNotFound","message":"The specified path - does not exist.\nRequestId:3e5fff38-001f-00a9-105e-5b38ea000000\nTime:2018-10-03T21:16:12.5570393Z"}}'} - headers: - Content-Length: ['163'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [PathNotFound] - x-ms-request-id: [3e5fff38-001f-00a9-105e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 404, message: The specified path does not exist.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e21d572-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-permissions: [rwxrw-rw-] - x-ms-umask: ['0022'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - ETag: ['"0x8D6297572596435"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff39-001f-00a9-115e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e270466-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff3a-001f-00a9-125e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e2c548e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - ETag: ['"0x8D629757263E4A5"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff3b-001f-00a9-135e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e316122-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21/directorytest1c491d21?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - ETag: ['"0x8D6297572694BF7"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff3c-001f-00a9-145e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e36d1ca-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=False - response: - body: {string: '{"error":{"code":"DirectoryNotEmpty","message":"The recursive - query parameter value must be true to delete a non-empty directory.\nRequestId:3e5fff3d-001f-00a9-155e-5b38ea000000\nTime:2018-10-03T21:16:12.7272015Z"}}'} - headers: - Content-Length: ['215'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [DirectoryNotEmpty] - x-ms-request-id: [3e5fff3d-001f-00a9-155e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 409, message: The recursive query parameter value must be true - to delete a non-empty directory.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [8e3bee80-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer1c491d21/directorytest1c491d21?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:12 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3e5fff3e-001f-00a9-165e-5b38ea000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/recordings/test_directory.test_create_delete_directory_without_hierarchical_namespace.yaml b/tests/recordings/test_directory.test_create_delete_directory_without_hierarchical_namespace.yaml deleted file mode 100644 index 8a583703..00000000 --- a/tests/recordings/test_directory.test_create_delete_directory_without_hierarchical_namespace.yaml +++ /dev/null @@ -1,499 +0,0 @@ -interactions: -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [953e54a2-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:24 GMT'] - x-ms-properties: ['foo=YmFy,mama=bWlh'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:23 GMT'] - ETag: ['"0x8D6297579AE2EAC"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:24 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cb7-201f-0001-2f5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [961ac356-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:25 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - ETag: ['"0x8D629757A58510E"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cb8-201f-0001-305e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [962c08aa-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cb9-201f-0001-315e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [964aecfc-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"PathNotFound","message":"The specified path - does not exist.\nRequestId:695e3cba-201f-0001-325e-5bcde7000000\nTime:2018-10-03T21:16:26.3077942Z"}}'} - headers: - Content-Length: ['163'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [PathNotFound] - x-ms-request-id: [695e3cba-201f-0001-325e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 404, message: The specified path does not exist.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [965ad63a-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"PathNotFound","message":"The specified path - does not exist.\nRequestId:695e3cbb-201f-0001-335e-5bcde7000000\nTime:2018-10-03T21:16:26.4138003Z"}}'} - headers: - Content-Length: ['163'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [PathNotFound] - x-ms-request-id: [695e3cbb-201f-0001-335e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 404, message: The specified path does not exist.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96697be0-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-permissions: [rwxrw-rw-] - x-ms-umask: ['0022'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: '{"error":{"code":"UnsupportedHeader","message":"One of the headers - specified in the request is not supported.\nRequestId:695e3cbc-201f-0001-345e-5bcde7000000\nTime:2018-10-03T21:16:26.5047893Z"}}'} - headers: - Content-Length: ['195'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [UnsupportedHeader] - x-ms-request-id: [695e3cbc-201f-0001-345e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 400, message: One of the headers specified in the request is not - supported.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96775490-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - ETag: ['"0x8D629757AB39149"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cbd-201f-0001-355e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [968777e4-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - ETag: ['"0x8D629757AC40B29"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cbe-201f-0001-365e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [969728b0-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=False - response: - body: {string: '{"error":{"code":"DirectoryNotEmpty","message":"The recursive - query parameter value must be true to delete a non-empty directory.\nRequestId:695e3cbf-201f-0001-375e-5bcde7000000\nTime:2018-10-03T21:16:26.8158344Z"}}'} - headers: - Content-Length: ['215'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [DirectoryNotEmpty] - x-ms-request-id: [695e3cbf-201f-0001-375e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 409, message: The recursive query parameter value must be true - to delete a non-empty directory.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96a6d558-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc0-201f-0001-385e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96b62332-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:26 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - ETag: ['"0x8D629757AF29517"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc1-201f-0001-395e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Match: ['0x111111111111111'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96c5ac6c-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified - using HTTP conditional header(s) is not met.\nRequestId:695e3cc2-201f-0001-3a5e-5bcde7000000\nTime:2018-10-03T21:16:27.1268204Z"}}'} - headers: - Content-Length: ['200'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [ConditionNotMet] - x-ms-request-id: [695e3cc2-201f-0001-3a5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 412, message: The condition specified using HTTP conditional header(s) - is not met.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Match: ['"0x8D629757AF29517"'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96d6955e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc3-201f-0001-3b5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96e6129a-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - ETag: ['"0x8D629757B227FC4"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc4-201f-0001-3c5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-None-Match: ['"0x8D629757B227FC4"'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [96f59f6c-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified - using HTTP conditional header(s) is not met.\nRequestId:695e3cc5-201f-0001-3d5e-5bcde7000000\nTime:2018-10-03T21:16:27.4248079Z"}}'} - headers: - Content-Length: ['200'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [ConditionNotMet] - x-ms-request-id: [695e3cc5-201f-0001-3d5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 412, message: The condition specified using HTTP conditional header(s) - is not met.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-None-Match: ['0x111111111111111'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [97039d2e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc6-201f-0001-3e5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [9712af30-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - ETag: ['"0x8D629757B4EE606"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc7-201f-0001-3f5e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Modified-Since: ['Wed, 03 Oct 2018 21:16:27 GMT'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [9721ff76-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified - using HTTP conditional header(s) is not met.\nRequestId:695e3cc8-201f-0001-405e-5bcde7000000\nTime:2018-10-03T21:16:27.7207932Z"}}'} - headers: - Content-Length: ['200'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [ConditionNotMet] - x-ms-request-id: [695e3cc8-201f-0001-405e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 412, message: The condition specified using HTTP conditional header(s) - is not met.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Modified-Since: ['Wed, 03 Oct 2018 21:15:27 GMT'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [9730eaa4-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cc9-201f-0001-415e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [973ffe9a-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - ETag: ['"0x8D629757B7C3750"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3cca-201f-0001-425e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Unmodified-Since: ['Wed, 03 Oct 2018 21:15:27 GMT'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [974f369e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified - using HTTP conditional header(s) is not met.\nRequestId:695e3ccb-201f-0001-435e-5bcde7000000\nTime:2018-10-03T21:16:28.0117962Z"}}'} - headers: - Content-Length: ['200'] - Content-Type: [application/json;charset=utf-8] - Date: ['Wed, 03 Oct 2018 21:16:27 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-error-code: [ConditionNotMet] - x-ms-request-id: [695e3ccb-201f-0001-435e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 412, message: The condition specified using HTTP conditional header(s) - is not met.} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - If-Unmodified-Since: ['Wed, 03 Oct 2018 21:16:27 GMT'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [975d2fb0-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:28 GMT'] - x-ms-version: ['2018-06-17'] - method: DELETE - uri: https://storagename.dfs.core.windows.net/utcontainer79611e79/directorytest79611e79?recursive=True - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:28 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [695e3ccc-201f-0001-445e-5bcde7000000] - x-ms-version: ['2018-06-17'] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/recordings/test_directory.test_rename_directory_with_hierarchical_namespace.yaml b/tests/recordings/test_directory.test_rename_directory_with_hierarchical_namespace.yaml deleted file mode 100644 index 309c41c7..00000000 --- a/tests/recordings/test_directory.test_rename_directory_with_hierarchical_namespace.yaml +++ /dev/null @@ -1,45 +0,0 @@ -interactions: -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [98df3342-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:30 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer5bc51a53/directorytest5bc51a53?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:30 GMT'] - ETag: ['"0x8D629757D814599"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:31 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [a041ac47-901f-0006-5d5e-5b1a7a000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [995bcb6e-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:31 GMT'] - x-ms-rename-source: [/utcontainer5bc51a53/directorytest5bc51a53] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer5bc51a53/directorytestnew5bc51a53 - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:30 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [a041ac48-901f-0006-5e5e-5b1a7a000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -version: 1 diff --git a/tests/recordings/test_directory.test_rename_directory_without_hierarchical_namespace.yaml b/tests/recordings/test_directory.test_rename_directory_without_hierarchical_namespace.yaml deleted file mode 100644 index dd00e27b..00000000 --- a/tests/recordings/test_directory.test_rename_directory_without_hierarchical_namespace.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [9a2dee50-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:32 GMT'] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainerb0731bab/directorytestb0731bab?resource=directory - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:32 GMT'] - ETag: ['"0x8D629757E92ED44"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:33 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-request-id: [3eb87f4f-301f-0022-685e-5b5724000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [Azure-Storage/1.3.0-1.3.1 (Python CPython 3.7.0; Darwin 17.7.0)] - x-ms-client-request-id: [9a65caf0-c751-11e8-a389-f218981b70f8] - x-ms-date: ['Wed, 03 Oct 2018 21:16:33 GMT'] - x-ms-rename-source: [/utcontainerb0731bab/directorytestb0731bab] - x-ms-version: ['2018-06-17'] - method: PUT - uri: https://storagename.dfs.core.windows.net/utcontainerb0731bab/directorytestnewb0731bab - response: - body: {string: ''} - headers: - Content-Length: ['0'] - Date: ['Wed, 03 Oct 2018 21:16:32 GMT'] - ETag: ['"0x8D629757EA31AA2"'] - Last-Modified: ['Wed, 03 Oct 2018 21:16:33 GMT'] - Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] - x-ms-continuation: [''] - x-ms-request-id: [3eb87f50-301f-0022-695e-5b5724000000] - x-ms-version: ['2018-06-17'] - status: {code: 201, message: Created} -version: 1 diff --git a/tests/recordings/test_path.test_create_delete_directory_with_hierarchical_namespace.yaml b/tests/recordings/test_path.test_create_delete_directory_with_hierarchical_namespace.yaml new file mode 100644 index 00000000..973eceef --- /dev/null +++ b/tests/recordings/test_path.test_create_delete_directory_with_hierarchical_namespace.yaml @@ -0,0 +1,269 @@ +interactions: +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5ac99418-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:04 GMT'] + x-ms-properties: ['foo=YmFy,mama=bWlh'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:04 GMT'] + ETag: ['"0x8D6EB203F4B965D"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:05 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc2e-c01f-0073-5509-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bb335c8-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + ETag: ['"0x8D6EB203FEC3A49"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc30-c01f-0073-5609-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bbadb98-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc31-c01f-0073-5709-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bc16e86-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=True + response: + body: {string: '{"error":{"code":"PathNotFound","message":"The specified path + does not exist.\nRequestId:debfcc32-c01f-0073-5809-1d9dc1000000\nTime:2019-06-07T08:15:06.4272058Z"}}'} + headers: + Content-Length: ['163'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [PathNotFound] + x-ms-request-id: [debfcc32-c01f-0073-5809-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 404, message: The specified path does not exist.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bc7ad50-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=True + response: + body: {string: '{"error":{"code":"PathNotFound","message":"The specified path + does not exist.\nRequestId:debfcc33-c01f-0073-5909-1d9dc1000000\nTime:2019-06-07T08:15:06.4792549Z"}}'} + headers: + Content-Length: ['163'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [PathNotFound] + x-ms-request-id: [debfcc33-c01f-0073-5909-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 404, message: The specified path does not exist.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bcfa546-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-permissions: [rwxrw-rw-] + x-ms-umask: ['0022'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + ETag: ['"0x8D6EB2040073815"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc34-c01f-0073-5a09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bd60b5c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: HEAD + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?action=getAccessControl&upn=False + response: + body: {string: ''} + headers: + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + ETag: ['"0x8D6EB2040073815"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-acl: ['user::rwx,group::r--,other::r--'] + x-ms-group: [$superuser] + x-ms-owner: [$superuser] + x-ms-permissions: [rwxr--r--] + x-ms-request-id: [debfcc35-c01f-0073-5b09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5bdc313a-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc36-c01f-0073-5c09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5be2b2d0-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + ETag: ['"0x8D6EB20401A8AE2"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc37-c01f-0073-5d09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5be931be-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9/directorytest88341af9?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:05 GMT'] + ETag: ['"0x8D6EB2040211ECC"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc38-c01f-0073-5e09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5befa92c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=False + response: + body: {string: '{"error":{"code":"DirectoryNotEmpty","message":"The recursive + query parameter value must be true to delete a non-empty directory.\nRequestId:debfcc39-c01f-0073-5f09-1d9dc1000000\nTime:2019-06-07T08:15:06.7314948Z"}}'} + headers: + Content-Length: ['215'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [DirectoryNotEmpty] + x-ms-request-id: [debfcc39-c01f-0073-5f09-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 409, message: The recursive query parameter value must be true + to delete a non-empty directory.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5c465a24-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:07 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer88341af9/directorytest88341af9?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:06 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [debfcc3a-c01f-0073-6009-1d9dc1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/recordings/test_path.test_create_delete_directory_without_hierarchical_namespace.yaml b/tests/recordings/test_path.test_create_delete_directory_without_hierarchical_namespace.yaml new file mode 100644 index 00000000..e65a432a --- /dev/null +++ b/tests/recordings/test_path.test_create_delete_directory_without_hierarchical_namespace.yaml @@ -0,0 +1,499 @@ +interactions: +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5cbf9fe2-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:08 GMT'] + x-ms-properties: ['foo=YmFy,mama=bWlh'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:08 GMT'] + ETag: ['"0x8D6EB20412E0CA4"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:08 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785ba9-201f-0054-4f09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5d964592-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + ETag: ['"0x8D6EB2041CE925D"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785baa-201f-0054-5009-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5d9d6df4-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bab-201f-0054-5109-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5da4b172-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"PathNotFound","message":"The specified path + does not exist.\nRequestId:ca785bac-201f-0054-5209-1d25a1000000\nTime:2019-06-07T08:15:09.6398978Z"}}'} + headers: + Content-Length: ['163'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [PathNotFound] + x-ms-request-id: [ca785bac-201f-0054-5209-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 404, message: The specified path does not exist.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5db1db18-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"PathNotFound","message":"The specified path + does not exist.\nRequestId:ca785bad-201f-0054-5309-1d25a1000000\nTime:2019-06-07T08:15:09.7930440Z"}}'} + headers: + Content-Length: ['163'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [PathNotFound] + x-ms-request-id: [ca785bad-201f-0054-5309-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 404, message: The specified path does not exist.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5dc944b0-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-permissions: [rwxrw-rw-] + x-ms-umask: ['0022'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: '{"error":{"code":"UnsupportedHeader","message":"One of the headers + specified in the request is not supported.\nRequestId:ca785bae-201f-0054-5409-1d25a1000000\nTime:2019-06-07T08:15:09.8380875Z"}}'} + headers: + Content-Length: ['195'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [UnsupportedHeader] + x-ms-request-id: [ca785bae-201f-0054-5409-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 400, message: One of the headers specified in the request is not + supported.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5dcffc42-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + ETag: ['"0x8D6EB204207FFC4"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785baf-201f-0054-5509-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5dd6c680-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + ETag: ['"0x8D6EB20420FF0F0"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb0-201f-0054-5609-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5ddeb412-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=False + response: + body: {string: '{"error":{"code":"DirectoryNotEmpty","message":"The recursive + query parameter value must be true to delete a non-empty directory.\nRequestId:ca785bb1-201f-0054-5709-1d25a1000000\nTime:2019-06-07T08:15:09.9832265Z"}}'} + headers: + Content-Length: ['215'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [DirectoryNotEmpty] + x-ms-request-id: [ca785bb1-201f-0054-5709-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 409, message: The recursive query parameter value must be true + to delete a non-empty directory.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5de9c9ce-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb2-201f-0054-5809-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5df190e6-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + ETag: ['"0x8D6EB20422A0F02"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb3-201f-0054-5909-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Match: ['0x111111111111111'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5df8e38c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified + using HTTP conditional header(s) is not met.\nRequestId:ca785bb4-201f-0054-5a09-1d25a1000000\nTime:2019-06-07T08:15:10.1453817Z"}}'} + headers: + Content-Length: ['200'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:09 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [ConditionNotMet] + x-ms-request-id: [ca785bb4-201f-0054-5a09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 412, message: The condition specified using HTTP conditional header(s) + is not met.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Match: ['"0x8D6EB20422A0F02"'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5dfecd4c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb5-201f-0054-5b09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e06a788-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB20423ED493"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb6-201f-0054-5c09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-None-Match: ['"0x8D6EB20423ED493"'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e0d6ae6-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified + using HTTP conditional header(s) is not met.\nRequestId:ca785bb7-201f-0054-5d09-1d25a1000000\nTime:2019-06-07T08:15:10.2865164Z"}}'} + headers: + Content-Length: ['200'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [ConditionNotMet] + x-ms-request-id: [ca785bb7-201f-0054-5d09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 412, message: The condition specified using HTTP conditional header(s) + is not met.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-None-Match: ['0x111111111111111'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e14784a-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb8-201f-0054-5e09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e1b7b2c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB2042539A25"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bb9-201f-0054-5f09-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Modified-Since: ['Fri, 07 Jun 2019 08:15:10 GMT'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e2263d8-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified + using HTTP conditional header(s) is not met.\nRequestId:ca785bba-201f-0054-6009-1d25a1000000\nTime:2019-06-07T08:15:10.4226467Z"}}'} + headers: + Content-Length: ['200'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [ConditionNotMet] + x-ms-request-id: [ca785bba-201f-0054-6009-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 412, message: The condition specified using HTTP conditional header(s) + is not met.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Modified-Since: ['Fri, 07 Jun 2019 08:14:10 GMT'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e294680-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bbb-201f-0054-6109-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e324bae-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB20426A5BFE"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bbc-201f-0054-6209-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Unmodified-Since: ['Fri, 07 Jun 2019 08:14:10 GMT'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e394288-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: '{"error":{"code":"ConditionNotMet","message":"The condition specified + using HTTP conditional header(s) is not met.\nRequestId:ca785bbd-201f-0054-6309-1d25a1000000\nTime:2019-06-07T08:15:10.5737914Z"}}'} + headers: + Content-Length: ['200'] + Content-Type: [application/json;charset=utf-8] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-error-code: [ConditionNotMet] + x-ms-request-id: [ca785bbd-201f-0054-6309-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 412, message: The condition specified using HTTP conditional header(s) + is not met.} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + If-Unmodified-Since: ['Fri, 07 Jun 2019 08:15:10 GMT'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e404718-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + x-ms-version: ['2018-11-09'] + method: DELETE + uri: https://storagename.dfs.core.windows.net/utcontainerded41c51/directorytestded41c51?recursive=True + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [ca785bbe-201f-0054-6409-1d25a1000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/recordings/test_path.test_get_set_access_control_with_hierarchical_namespace.yaml b/tests/recordings/test_path.test_get_set_access_control_with_hierarchical_namespace.yaml new file mode 100644 index 00000000..07b3792e --- /dev/null +++ b/tests/recordings/test_path.test_get_set_access_control_with_hierarchical_namespace.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5e9559a6-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB2042E11FB9"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:11 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [e3759a78-301f-0088-1109-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5eb3cf80-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + x-ms-version: ['2018-11-09'] + method: HEAD + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?action=getAccessControl&upn=True + response: + body: {string: ''} + headers: + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB2042E11FB9"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:11 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-acl: ['user::rwx,group::r-x,other::---'] + x-ms-group: [$superuser] + x-ms-owner: [$superuser] + x-ms-permissions: [rwxr-x---] + x-ms-request-id: [e3759a79-301f-0088-1209-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-acl: ['user::rwx,group::r--,other::r--'] + x-ms-client-request-id: [5eba1ce6-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + x-ms-group: [68390a19-a643-458b-b726-408abf67b4fc] + x-ms-owner: [68390a19-a643-458b-b726-408abf67b4fc] + x-ms-version: ['2018-11-09'] + method: PATCH + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?action=setAccessControl + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:10 GMT'] + ETag: ['"0x8D6EB2042F2FCEE"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:11 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-namespace-enabled: ['true'] + x-ms-request-id: [e3759a7a-301f-0088-1309-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5ec1881e-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + x-ms-version: ['2018-11-09'] + method: HEAD + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?action=getAccessControl&upn=True + response: + body: {string: ''} + headers: + Date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + ETag: ['"0x8D6EB2042F2FCEE"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:11 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-acl: ['user::rwx,group::r--,other::r--'] + x-ms-group: [68390a19-a897-236b-b453-488abf67b4fc] + x-ms-owner: [68390a19-a897-236b-b453-488abf67b4fc] + x-ms-permissions: [rwxr--r--] + x-ms-request-id: [e3759a7b-301f-0088-1409-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5f3e7a04-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:12 GMT'] + x-ms-group: [68390a19-a643-458b-b726-408abf67b4fc] + x-ms-owner: [68390a19-a643-458b-b726-408abf67b4fc] + x-ms-permissions: [rwxrw-rw-] + x-ms-version: ['2018-11-09'] + method: PATCH + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?action=setAccessControl + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + ETag: ['"0x8D6EB204376F9D9"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:12 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-namespace-enabled: ['true'] + x-ms-request-id: [e3759a7c-301f-0088-1509-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Connection: [keep-alive] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5f4577dc-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:12 GMT'] + x-ms-version: ['2018-11-09'] + method: HEAD + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainer6f6f1a9b/directorytest6f6f1a9b?action=getAccessControl&upn=False + response: + body: {string: ''} + headers: + Date: ['Fri, 07 Jun 2019 08:15:11 GMT'] + ETag: ['"0x8D6EB204376F9D9"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:12 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-acl: ['user::rwx,group::rw-,other::rw-'] + x-ms-group: [68390a19-a897-236b-b453-488abf67b4fc] + x-ms-owner: [68390a19-a897-236b-b453-488abf67b4fc] + x-ms-permissions: [rwxrw-rw-] + x-ms-request-id: [e3759a7d-301f-0088-1609-1d55db000000] + x-ms-version: ['2018-11-09'] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/recordings/test_path.test_rename_directory_with_hierarchical_namespace.yaml b/tests/recordings/test_path.test_rename_directory_with_hierarchical_namespace.yaml new file mode 100644 index 00000000..7f12d450 --- /dev/null +++ b/tests/recordings/test_path.test_rename_directory_with_hierarchical_namespace.yaml @@ -0,0 +1,45 @@ +interactions: +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [5ffa8ea6-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:13 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainerd6c8182b/directorytestd6c8182b?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:12 GMT'] + ETag: ['"0x8D6EB204445FE49"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:13 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [f705f907-a01f-0086-0b09-1db9d0000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [60177dea-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:13 GMT'] + x-ms-rename-source: [/utcontainerd6c8182b/directorytestd6c8182b] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://hierarchicalnamespacestoragename.dfs.core.windows.net/utcontainerd6c8182b/directorytestnewd6c8182b + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:12 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [f705f908-a01f-0086-0c09-1db9d0000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +version: 1 diff --git a/tests/recordings/test_path.test_rename_directory_without_hierarchical_namespace.yaml b/tests/recordings/test_path.test_rename_directory_without_hierarchical_namespace.yaml new file mode 100644 index 00000000..b97ff891 --- /dev/null +++ b/tests/recordings/test_path.test_rename_directory_without_hierarchical_namespace.yaml @@ -0,0 +1,48 @@ +interactions: +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [60a2c83c-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:14 GMT'] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainer250d1983/directorytest250d1983?resource=directory + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:04 GMT'] + ETag: ['"0x8D6EB2044EE96D3"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:14 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-request-id: [837b7f11-501f-0014-6e09-1d0c4f000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.0; Darwin 18.6.0)] + x-ms-client-request-id: [60bd33c0-88fc-11e9-b296-acde48001122] + x-ms-date: ['Fri, 07 Jun 2019 08:15:14 GMT'] + x-ms-rename-source: [/utcontainer250d1983/directorytest250d1983] + x-ms-version: ['2018-11-09'] + method: PUT + uri: https://storagename.dfs.core.windows.net/utcontainer250d1983/directorytestnew250d1983 + response: + body: {string: ''} + headers: + Content-Length: ['0'] + Date: ['Fri, 07 Jun 2019 08:15:04 GMT'] + ETag: ['"0x8D6EB2044F6AF18"'] + Last-Modified: ['Fri, 07 Jun 2019 08:15:14 GMT'] + Server: [Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0] + x-ms-continuation: [''] + x-ms-request-id: [837b7f12-501f-0014-6f09-1d0c4f000000] + x-ms-version: ['2018-11-09'] + status: {code: 201, message: Created} +version: 1