From 46204e5630e6c3126231764e66b8083d5451f0be Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Mon, 26 Sep 2022 10:47:33 +0800 Subject: [PATCH 1/7] hns soft delete --- .../storage/blobs/blob_container_client.hpp | 1 + .../inc/azure/storage/blobs/rest_client.hpp | 20 + .../azure-storage-blobs/src/rest_client.cpp | 24 + .../azure-storage-blobs/swagger/README.md | 26 + .../datalake/datalake_file_system_client.hpp | 25 + .../files/datalake/datalake_options.hpp | 25 + .../files/datalake/datalake_responses.hpp | 48 ++ .../src/datalake_file_system_client.cpp | 67 +++ .../src/datalake_responses.cpp | 6 + .../src/private/datalake_constants.hpp | 1 + .../ut/datalake_file_system_client_test.cpp | 141 +++++ ...FileSystemClientTest.ListDeletedPaths.json | 334 +++++++++++ ...DataLakeFileSystemClientTest.Undelete.json | 563 ++++++++++++++++++ 13 files changed, 1281 insertions(+) create mode 100644 sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json create mode 100644 sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp index 74a4de2dc5..f77b34b94c 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_container_client.hpp @@ -338,6 +338,7 @@ namespace Azure { namespace Storage { namespace Blobs { friend class BlobServiceClient; friend class BlobLeaseClient; friend class BlobContainerBatch; + friend class Files::DataLake::DataLakeFileSystemClient; }; }}} // namespace Azure::Storage::Blobs diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp index 2cb58be985..b2108123da 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp @@ -50,6 +50,21 @@ namespace Azure { namespace Storage { namespace Blobs { const std::string& ToString() const { return m_value; } AZ_STORAGE_BLOBS_DLLEXPORT const static EncryptionAlgorithmType Aes256; + private: + std::string m_value; + }; + /** + * @brief Include this parameter to specify one or more datasets to include in the response. + */ + class ListBlobsShowOnlyType final { + public: + ListBlobsShowOnlyType() = default; + explicit ListBlobsShowOnlyType(std::string value) : m_value(std::move(value)) {} + bool operator==(const ListBlobsShowOnlyType& other) const { return m_value == other.m_value; } + bool operator!=(const ListBlobsShowOnlyType& other) const { return !(*this == other); } + const std::string& ToString() const { return m_value; } + AZ_STORAGE_BLOBS_DLLEXPORT const static ListBlobsShowOnlyType Deleted; + private: std::string m_value; }; @@ -1365,6 +1380,10 @@ namespace Azure { namespace Storage { namespace Blobs { * Type of the blob. */ Models::BlobType BlobType; + /** + * The deletion ID associated with the deleted path. + */ + Nullable DeletionId; }; } // namespace _detail /** @@ -3447,6 +3466,7 @@ namespace Azure { namespace Storage { namespace Blobs { Nullable Marker; Nullable MaxResults; Nullable Include; + Nullable ShowOnly; }; static Response ListBlobsByHierarchy( Core::Http::_internal::HttpPipeline& pipeline, diff --git a/sdk/storage/azure-storage-blobs/src/rest_client.cpp b/sdk/storage/azure-storage-blobs/src/rest_client.cpp index 29eb40f9f3..bf961141ac 100644 --- a/sdk/storage/azure-storage-blobs/src/rest_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/rest_client.cpp @@ -99,6 +99,7 @@ std::string ListBlobsIncludeFlagsToString( namespace Azure { namespace Storage { namespace Blobs { namespace Models { const EncryptionAlgorithmType EncryptionAlgorithmType::Aes256("AES256"); + const ListBlobsShowOnlyType ListBlobsShowOnlyType::Deleted("deleted"); const BlockType BlockType::Committed("Committed"); const BlockType BlockType::Uncommitted("Uncommitted"); const BlockType BlockType::Latest("Latest"); @@ -2310,6 +2311,7 @@ namespace Azure { namespace Storage { namespace Blobs { kHasVersionsOnly, kContentLength, kBlobType, + kDeletionId, }; const std::unordered_map XmlTagEnumMap{ {"EnumerationResults", XmlTagEnum::kEnumerationResults}, @@ -2370,6 +2372,7 @@ namespace Azure { namespace Storage { namespace Blobs { {"HasVersionsOnly", XmlTagEnum::kHasVersionsOnly}, {"Content-Length", XmlTagEnum::kContentLength}, {"BlobType", XmlTagEnum::kBlobType}, + {"DeletionId", XmlTagEnum::kDeletionId}, }; std::vector xmlPath; Models::_detail::BlobItem vectorElement1; @@ -2807,6 +2810,13 @@ namespace Azure { namespace Storage { namespace Blobs { { vectorElement1.BlobType = Models::BlobType(node.Value); } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kDeletionId) + { + vectorElement1.DeletionId = node.Value; + } } else if (node.Type == _internal::XmlNodeType::Attribute) { @@ -2908,6 +2918,11 @@ namespace Azure { namespace Storage { namespace Blobs { ListBlobsIncludeFlagsToString(options.Include.Value()))); } request.SetHeader("x-ms-version", "2021-04-10"); + if (options.ShowOnly.HasValue() && !options.ShowOnly.Value().empty()) + { + request.GetUrl().AppendQueryParameter( + "showonly", _internal::UrlEncodeQueryParameter(options.ShowOnly.Value())); + } auto pRawResponse = pipeline.Send(request, context); auto httpStatusCode = pRawResponse->GetStatusCode(); if (httpStatusCode != Core::Http::HttpStatusCode::Ok) @@ -2981,6 +2996,7 @@ namespace Azure { namespace Storage { namespace Blobs { kHasVersionsOnly, kContentLength, kBlobType, + kDeletionId, kBlobPrefix, }; const std::unordered_map XmlTagEnumMap{ @@ -3043,6 +3059,7 @@ namespace Azure { namespace Storage { namespace Blobs { {"HasVersionsOnly", XmlTagEnum::kHasVersionsOnly}, {"Content-Length", XmlTagEnum::kContentLength}, {"BlobType", XmlTagEnum::kBlobType}, + {"DeletionId", XmlTagEnum::kDeletionId}, {"BlobPrefix", XmlTagEnum::kBlobPrefix}, }; std::vector xmlPath; @@ -3488,6 +3505,13 @@ namespace Azure { namespace Storage { namespace Blobs { { vectorElement1.BlobType = Models::BlobType(node.Value); } + else if ( + xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults + && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlob + && xmlPath[3] == XmlTagEnum::kDeletionId) + { + vectorElement1.DeletionId = node.Value; + } else if ( xmlPath.size() == 4 && xmlPath[0] == XmlTagEnum::kEnumerationResults && xmlPath[1] == XmlTagEnum::kBlobs && xmlPath[2] == XmlTagEnum::kBlobPrefix diff --git a/sdk/storage/azure-storage-blobs/swagger/README.md b/sdk/storage/azure-storage-blobs/swagger/README.md index 494f44eafb..b3daaedfc2 100644 --- a/sdk/storage/azure-storage-blobs/swagger/README.md +++ b/sdk/storage/azure-storage-blobs/swagger/README.md @@ -273,6 +273,15 @@ directive: {"value": "legalhold", "name": "LegalHold"}, {"value": "deletedwithversions", "name": "DeletedWithVersions"} ]; + $["ListBlobsShowOnly"]= { + "name": "showonly", + "x-ms-client-name": "ShowOnly", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Include this parameter to specify one or more datasets to include in the response." + }; $.DeleteSnapshots["x-ms-enum"]["name"] = "DeleteSnapshotsOption"; $.DeleteSnapshots["x-ms-enum"]["values"] = [{"value": "include", "name": "IncludeSnapshots"},{"value":"only", "name": "OnlySnapshots"}]; $.BlobExpiryOptions["x-ms-enum"]["name"] = "ScheduleBlobExpiryOriginType"; @@ -303,6 +312,17 @@ directive: "x-ms-export": true, "description": "The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-encryption-key header is provided." }; + $.ListBlobsShowOnly = { + "type": "string", + "enum": ["deleted"], + "x-ms-enum": { + "name": "ListBlobsShowOnlyType", + "modelAsString": false, + "values": [{"value": "__placeHolder", "name": "__placeHolder"}, {"value": "deleted", "name": "Deleted"}] + }, + "x-ms-export": true, + "description": "Include this parameter to specify one or more datasets to include in the response." + }; $.BlockType = { "type": "string", "enum": ["Committed", "Uncommitted", "Latest"], @@ -829,6 +849,7 @@ directive: $.BlobItemInternal.properties["BlobType"] = $.BlobPropertiesInternal.properties["BlobType"]; $.BlobItemInternal.properties["BlobType"]["x-ms-xml"] = {"name": "Properties/BlobType"}; delete $.BlobPropertiesInternal.properties["BlobType"]; + $.BlobItemInternal.properties["DeletionId"] = {"type": "string"}; $.BlobItemInternal.required.push("BlobType", "BlobSize"); $.BlobItemInternal.properties["Name"].description = "Blob name."; $.BlobItemInternal.properties["Deleted"].description = "Indicates whether this blob was deleted."; @@ -837,6 +858,7 @@ directive: $.BlobItemInternal.properties["IsCurrentVersion"].description = "Indicates if this is the current version of the blob."; $.BlobItemInternal.properties["BlobType"].description = "Type of the blob."; $.BlobItemInternal.properties["HasVersionsOnly"].description = "Indicates that this root blob has been deleted, but it has versions that are active."; + $.BlobItemInternal.properties["DeletionId"].description = "The deletion ID associated with the deleted path."; $.BlobPropertiesInternal.properties["Etag"]["x-ms-client-name"] = "ETag"; $.BlobPropertiesInternal["x-ms-client-name"] = "BlobItemDetails"; @@ -916,6 +938,10 @@ directive: delete $.ListBlobsHierarchySegmentResponse.properties["Segment"]; delete $.ListBlobsHierarchySegmentResponse.required; $.ListBlobsHierarchySegmentResponse.properties["NextMarker"]["x-nullable"] = true; + - from: swagger-document + where: $["x-ms-paths"]["/{containerName}?restype=container&comp=list&hierarchy"].get.parameters + transform: > + $.push({"$ref": "#/parameters/ListBlobsShowOnly"}); ``` ### DownloadBlob diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp index 9a7430e1c1..0e0eade022 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp @@ -239,6 +239,31 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { const RenameDirectoryOptions& options = RenameDirectoryOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; + /** + * @brief Gets the paths that have recently been soft deleted in this file system. + * @param options Optional parameters to list deleted paths. + * @param context Context for cancelling long running operations. + * @return Azure::Response The client targets the restored path. + * @remark This request is sent to Blob endpoint. + */ + ListDeletedPathsPagedResponse ListDeletedPaths( + const ListDeletedPathsOptions& options = ListDeletedPathsOptions(), + const Azure::Core::Context& context = Azure::Core::Context()) const; + + /** + * @brief Restores a soft deleted path. + * @param deletedPath The path of the deleted path. + * @param deletionId The deletion ID associated with the soft deleted path. You can get soft + * deleted paths and their assocaited deletion IDs with ListDeletedPaths. + * @param context Context for cancelling long running operations. + * @return Azure::Response The client targets the restored path. + * @remark This request is sent to Blob endpoint. + */ + Azure::Response Undelete( + const std::string& deletedPath, + const std::string& deletionId, + const Azure::Core::Context& context = Azure::Core::Context()) const; + private: Azure::Core::Url m_fileSystemUrl; Blobs::BlobContainerClient m_blobContainerClient; diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp index fc8e69a015..bc91f599de 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp @@ -191,6 +191,31 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Nullable PageSizeHint; }; + /** + * @brief Optional parameters for #Azure::Storage::Files::DataLake::FileSystemClient::ListPaths. + */ + struct ListDeletedPathsOptions final + { + /** + * Gets the paths that have recently been soft deleted in this file system. + */ + Azure::Nullable PathPrefix; + + /** + * The number of paths returned with each invocation is limited. If the number of paths to be + * returned exceeds this limit, a continuation token is returned in the response header + * x-ms-continuation. When a continuation token is returned in the response, it must be + * specified in a subsequent invocation of the list operation to continue listing the paths. + */ + Azure::Nullable ContinuationToken; + + /** + * An optional value that specifies the maximum number of items to return. If omitted or greater + * than 5,000, the response will include up to 5,000 items. + */ + Azure::Nullable PageSizeHint; + }; + /** * @brief Optional parameters for * #Azure::Storage::Files::DataLake::FileSystemClient::GetAccessPolicy. diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index bc076a4cae..2ddfbe8cca 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -443,6 +443,32 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { using SetPathPermissionsResult = SetPathAccessControlListResult; + /** + * @brief A path that has been soft deleted. + */ + struct PathDeletedItem final + { + /** + * The name of the path. + */ + std::string Name; + + /** + * The deletion ID associated with the deleted path. + */ + Azure::Nullable DeletionId; + + /** + * When the path was deleted. + */ + Azure::Nullable DeletedOn; + + /** + * The number of days left before the soft deleted path will be permanently deleted. + */ + Azure::Nullable RemainingRetentionDays; + }; + // FileClient models: using UploadFileFromResult = Blobs::Models::UploadBlockBlobResult; @@ -712,6 +738,28 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { friend class Azure::Core::PagedResponse; }; + /** + * @brief Response type for + * #Azure::Storage::Files::DataLake::DataLakeFileSystemClient::ListDeletedPaths. + */ + class ListDeletedPathsPagedResponse final + : public Azure::Core::PagedResponse { + public: + /** + * Path items. + */ + std::vector DeletedPaths; + + private: + void OnNextPage(const Azure::Core::Context& context); + + std::shared_ptr m_fileSystemClient; + ListDeletedPathsOptions m_operationOptions; + + friend class DataLakeFileSystemClient; + friend class Azure::Core::PagedResponse; + }; + /** * @brief Response type for * #Azure::Storage::Files::DataLake::DataLakePathClient::SetAccessControlListRecursive. diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index 38c6668b2b..161984a74d 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -425,4 +425,71 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { std::move(renamedDirectoryClient), std::move(result.RawResponse)); } + ListDeletedPathsPagedResponse DataLakeFileSystemClient::ListDeletedPaths( + const ListDeletedPathsOptions& options, + const Azure::Core::Context& context) const + { + Blobs::_detail::BlobContainerClient::ListBlobContainerBlobsByHierarchyOptions + protocolLayerOptions; + protocolLayerOptions.Prefix = options.PathPrefix; + protocolLayerOptions.MaxResults = options.PageSizeHint; + protocolLayerOptions.Marker = options.ContinuationToken; + protocolLayerOptions.ShowOnly = Blobs::Models::ListBlobsShowOnlyType::Deleted.ToString(); + auto result = Blobs::_detail::BlobContainerClient::ListBlobsByHierarchy( + *m_pipeline, m_blobContainerClient.m_blobContainerUrl, protocolLayerOptions, context); + + ListDeletedPathsPagedResponse pagedResponse; + for (auto& item : result.Value.Items) + { + Models::PathDeletedItem pathDeletedItem; + if (item.Name.Encoded) + { + pathDeletedItem.Name = Core::Url::Decode(item.Name.Content); + } + else + { + pathDeletedItem.Name = std::move(item.Name.Content); + } + pathDeletedItem.DeletedOn = item.Details.DeletedOn; + pathDeletedItem.DeletionId = item.DeletionId; + pathDeletedItem.RemainingRetentionDays = item.Details.RemainingRetentionDays.Value(); + + pagedResponse.DeletedPaths.push_back(pathDeletedItem); + } + pagedResponse.m_operationOptions = options; + pagedResponse.m_fileSystemClient = std::make_shared(*this); + pagedResponse.CurrentPageToken = options.ContinuationToken.ValueOr(std::string()); + pagedResponse.NextPageToken = result.Value.ContinuationToken; + pagedResponse.RawResponse = std::move(result.RawResponse); + + return pagedResponse; + } + + Azure::Response DataLakeFileSystemClient::Undelete( + const std::string& deletedPath, + const std::string& deletionId, + const Azure::Core::Context& context) const + { + std::string undeleteSource = std::string("?") + _detail::DataLakeDeletionId + "=" + deletionId; + + auto blobUrl = m_blobContainerClient.m_blobContainerUrl; + blobUrl.AppendPath(_internal::UrlEncodePath(deletedPath)); + + _detail::PathClient::UndeletePathOptions options; + options.UndeleteSource = undeleteSource; + auto result = _detail::PathClient::Undelete(*m_pipeline, blobUrl, options, context); + + if (result.Value.ResourceType.HasValue() + && result.Value.ResourceType.Value() == Models::PathResourceType::Directory.ToString()) + { + return Azure::Response( + std::move(GetDirectoryClient(deletedPath)), std::move(result.RawResponse)); + } + else + { + return Azure::Response( + std::move(GetFileClient(deletedPath)), std::move(result.RawResponse)); + } + } + }}}} // namespace Azure::Storage::Files::DataLake diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_responses.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_responses.cpp index 7e3291beae..0ef5a9d612 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_responses.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_responses.cpp @@ -93,6 +93,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { *this = m_onNextPageFunc(NextPageToken.Value(), context); } + void ListDeletedPathsPagedResponse::OnNextPage(const Azure::Core::Context& context) + { + m_operationOptions.ContinuationToken = NextPageToken; + *this = m_fileSystemClient->ListDeletedPaths(m_operationOptions, context); + } + void SetPathAccessControlListRecursivePagedResponse::OnNextPage( const Azure::Core::Context& context) { diff --git a/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp b/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp index 19102b1003..a0be960f7d 100644 --- a/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp +++ b/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp @@ -11,5 +11,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam constexpr static const char* DataLakePathNotFound = "PathNotFound"; constexpr static const char* DataLakePathAlreadyExists = "PathAlreadyExists"; constexpr static const char* DataLakeIsDirectoryKey = "hdi_isFolder"; + constexpr static const char* DataLakeDeletionId = "deletionid"; }}}}} // namespace Azure::Storage::Files::DataLake::_detail diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp index d299436ebc..70ae0b9d8a 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp @@ -821,4 +821,145 @@ namespace Azure { namespace Storage { namespace Test { m_fileSystemClient->GetDirectoryClient(destinationDirectoryName).GetProperties()); } + TEST_F(DataLakeFileSystemClientTest, ListDeletedPaths) + { + const std::string deletedFilename = GetTestNameLowerCase() + "_file_deleted"; + const std::string nonDeletedFilename = GetTestNameLowerCase() + "_file"; + const std::string deletedDirectoryName = GetTestNameLowerCase() + "_dir_deleted"; + const std::string nonDeletedDirectoryName = GetTestNameLowerCase() + "_dir"; + + auto deletedFileClient = m_fileSystemClient->GetFileClient(deletedFilename); + auto nonDeletedFileClient = m_fileSystemClient->GetFileClient(nonDeletedFilename); + auto deletedDirectoryClient = m_fileSystemClient->GetDirectoryClient(deletedDirectoryName); + auto nonDeletedDirectoryClient + = m_fileSystemClient->GetDirectoryClient(nonDeletedDirectoryName); + + deletedFileClient.Create(); + deletedFileClient.Delete(); + nonDeletedFileClient.Create(); + deletedDirectoryClient.Create(); + deletedDirectoryClient.DeleteEmpty(); + nonDeletedDirectoryClient.Create(); + + { + auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + EXPECT_EQ(2, paths.size()); + EXPECT_EQ(deletedDirectoryName, paths[0].Name); + EXPECT_TRUE(paths[0].DeletionId.HasValue()); + EXPECT_TRUE(paths[0].DeletedOn.HasValue()); + EXPECT_TRUE(paths[0].RemainingRetentionDays.HasValue()); + EXPECT_EQ(deletedFilename, paths[1].Name); + EXPECT_TRUE(paths[1].DeletionId.HasValue()); + EXPECT_TRUE(paths[1].DeletedOn.HasValue()); + EXPECT_TRUE(paths[1].RemainingRetentionDays.HasValue()); + } + // List max result + { + Files::DataLake::ListDeletedPathsOptions options; + options.PageSizeHint = 1; + std::vector paths; + for (auto pageResult = m_fileSystemClient->ListDeletedPaths(options); pageResult.HasPage(); + pageResult.MoveToNextPage()) + { + paths.insert(paths.end(), pageResult.DeletedPaths.begin(), pageResult.DeletedPaths.end()); + EXPECT_EQ(1, pageResult.DeletedPaths.size()); + } + EXPECT_EQ(2, paths.size()); + } + // prefix works + { + const std::string directoryName = GetTestNameLowerCase() + "_prefix"; + const std::string filename = "file"; + + auto directoryClient = m_fileSystemClient->GetDirectoryClient(directoryName); + directoryClient.Create(); + auto fileClient = directoryClient.GetFileClient(filename); + fileClient.Create(); + fileClient.Delete(); + + Files::DataLake::ListDeletedPathsOptions options; + options.PathPrefix = directoryName; + auto paths = m_fileSystemClient->ListDeletedPaths(options).DeletedPaths; + EXPECT_EQ(1, paths.size()); + EXPECT_EQ(directoryName + "/" + filename, paths[0].Name); + EXPECT_TRUE(paths[0].DeletionId.HasValue()); + EXPECT_TRUE(paths[0].DeletedOn.HasValue()); + EXPECT_TRUE(paths[0].RemainingRetentionDays.HasValue()); + } + } + + TEST_F(DataLakeFileSystemClientTest, Undelete) + { + const std::string directoryName = GetTestNameLowerCase() + "_dir"; + const std::string subFileName = "sub_file"; + + auto directoryClient = m_fileSystemClient->GetDirectoryClient(directoryName); + directoryClient.Create(); + auto subFileClient = m_fileSystemClient->GetFileClient(directoryName + "/" + subFileName); + subFileClient.Create(); + std::shared_ptr properties + = std::make_shared( + directoryClient.GetProperties().Value); + std::shared_ptr subFileProperties + = std::make_shared( + subFileClient.GetProperties().Value); + + // recursive works + { + directoryClient.DeleteRecursive(); + + auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + const std::string deletionId = paths[0].DeletionId.Value(); + + auto restoredClient = m_fileSystemClient->Undelete(directoryName, deletionId).Value; + + paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + EXPECT_EQ(0, paths.size()); + std::shared_ptr restoredProperties; + EXPECT_NO_THROW( + restoredProperties = std::make_shared( + restoredClient.GetProperties().Value)); + EXPECT_TRUE(restoredProperties->IsDirectory); + EXPECT_EQ(properties->ETag, restoredProperties->ETag); + std::shared_ptr restoredSubFileProperties; + EXPECT_NO_THROW( + restoredSubFileProperties = std::make_shared( + subFileClient.GetProperties().Value)); + EXPECT_TRUE(!restoredSubFileProperties->IsDirectory); + EXPECT_EQ(subFileProperties->ETag, restoredSubFileProperties->ETag); + } + // not recursive works + { + subFileClient.Delete(); + directoryClient.DeleteEmpty(); + + auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + std::string deletionId = paths[0].DeletionId.Value(); + + // restore directory + auto restoredClient = m_fileSystemClient->Undelete(directoryName, deletionId).Value; + paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + EXPECT_EQ(1, paths.size()); // not restore subFile + std::shared_ptr restoredProperties; + EXPECT_NO_THROW( + restoredProperties = std::make_shared( + restoredClient.GetProperties().Value)); + EXPECT_TRUE(restoredProperties->IsDirectory); + EXPECT_EQ(properties->ETag, restoredProperties->ETag); + EXPECT_THROW(subFileClient.GetProperties(), StorageException); + + // restore file + deletionId = paths[0].DeletionId.Value(); + restoredClient + = m_fileSystemClient->Undelete(directoryName + "/" + subFileName, deletionId).Value; + paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + EXPECT_EQ(0, paths.size()); + EXPECT_NO_THROW( + restoredProperties = std::make_shared( + restoredClient.GetProperties().Value)); + EXPECT_TRUE(!restoredProperties->IsDirectory); + EXPECT_EQ(subFileProperties->ETag, restoredProperties->ETag); + } + } + }}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json new file mode 100644 index 0000000000..74b5e43b23 --- /dev/null +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json @@ -0,0 +1,334 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "3cf7aba9-e437-4ab4-4cee-72198097ba87", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:05 GMT", + "etag": "\"0x8DA9F69420DBD38\"", + "last-modified": "Mon, 26 Sep 2022 02:46:05 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3cf7aba9-e437-4ab4-4cee-72198097ba87", + "x-ms-request-id": "be97020f-a01e-0044-7052-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "b7421dc7-604f-4384-5ed0-afb925935d7b", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:06 GMT", + "etag": "\"0x8DA9F6942E67873\"", + "last-modified": "Mon, 26 Sep 2022 02:46:06 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "b7421dc7-604f-4384-5ed0-afb925935d7b", + "x-ms-request-id": "efa84174-001f-002f-4552-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_file_deleted?resource=file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "f78b80df-1699-4e67-5b29-409d5369b4e1", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:07 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f78b80df-1699-4e67-5b29-409d5369b4e1", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339672719386", + "x-ms-request-id": "efa841dd-001f-002f-2d52-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_file_deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "f424b64d-385d-4d4d-7ccf-43a2dc19a05d", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:07 GMT", + "etag": "\"0x8DA9F694366BCBC\"", + "last-modified": "Mon, 26 Sep 2022 02:46:07 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f424b64d-385d-4d4d-7ccf-43a2dc19a05d", + "x-ms-request-id": "efa8426f-001f-002f-3f52-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_file?resource=file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "f33aa0ba-f5e5-421f-61d3-35514d46d8dc", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:07 GMT", + "etag": "\"0x8DA9F694396EC98\"", + "last-modified": "Mon, 26 Sep 2022 02:46:08 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "f33aa0ba-f5e5-421f-61d3-35514d46d8dc", + "x-ms-request-id": "efa842c1-001f-002f-1152-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_dir_deleted?resource=directory" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "ab005b41-2432-4c3a-7f61-e413a866fe5e", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:08 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "ab005b41-2432-4c3a-7f61-e413a866fe5e", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339683639968", + "x-ms-request-id": "efa842f9-001f-002f-4952-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_dir_deleted?recursive=false" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "7c115f85-8848-4fa5-5f43-501b10d8b217", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:08 GMT", + "etag": "\"0x8DA9F6943FBB25C\"", + "last-modified": "Mon, 26 Sep 2022 02:46:08 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "7c115f85-8848-4fa5-5f43-501b10d8b217", + "x-ms-request-id": "efa84337-001f-002f-0752-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_dir?resource=directory" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "678b1629-04fe-4a90-7f3d-dd8736383def", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "listdeletedpaths_dir_deleted133086339683639968trueMon, 26 Sep 2022 02:46:08 GMTMon, 26 Sep 2022 02:46:08 GMTMon, 03 Oct 2022 02:46:08 GMT0x8DA9F694396EC98directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:08 GMT6listdeletedpaths_file_deleted133086339672719386trueMon, 26 Sep 2022 02:46:06 GMTMon, 26 Sep 2022 02:46:06 GMTMon, 03 Oct 2022 02:46:07 GMT0x8DA9F6942E67873file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:07 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:08 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "678b1629-04fe-4a90-7f3d-dd8736383def", + "x-ms-request-id": "be9715b0-a01e-0044-6652-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "d9fc970d-db09-4afa-59e2-67488a1a3c10", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "1listdeletedpaths_dir_deleted133086339683639968trueMon, 26 Sep 2022 02:46:08 GMTMon, 26 Sep 2022 02:46:08 GMTMon, 03 Oct 2022 02:46:08 GMT0x8DA9F694396EC98directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:08 GMT62!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "d9fc970d-db09-4afa-59e2-67488a1a3c10", + "x-ms-request-id": "be9716b5-a01e-0044-1a52-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&maxresults=1&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "e6d947cf-03a2-40d8-45dd-33b84985ca67", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "2!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh1listdeletedpaths_file_deleted133086339672719386trueMon, 26 Sep 2022 02:46:06 GMTMon, 26 Sep 2022 02:46:06 GMTMon, 03 Oct 2022 02:46:07 GMT0x8DA9F6942E67873file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:07 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "e6d947cf-03a2-40d8-45dd-33b84985ca67", + "x-ms-request-id": "be971796-a01e-0044-4952-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&marker=2!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh&maxresults=1&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "605b37e9-f77a-4c20-72ad-66b4f76acde6", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "etag": "\"0x8DA9F6944B11B15\"", + "last-modified": "Mon, 26 Sep 2022 02:46:09 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "605b37e9-f77a-4c20-72ad-66b4f76acde6", + "x-ms-request-id": "efa84415-001f-002f-6252-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_prefix?resource=directory" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "8face8d2-62ae-4e5c-4dd9-cf74aaf0d676", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "etag": "\"0x8DA9F6944E44615\"", + "last-modified": "Mon, 26 Sep 2022 02:46:10 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "8face8d2-62ae-4e5c-4dd9-cf74aaf0d676", + "x-ms-request-id": "efa84458-001f-002f-2252-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_prefix/file?resource=file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "135bf5f2-9e7c-471f-6f6e-07d47a1f763c", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:10 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "135bf5f2-9e7c-471f-6f6e-07d47a1f763c", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339706103860", + "x-ms-request-id": "efa8449a-001f-002f-6352-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_prefix/file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "9bae0a34-ab01-430d-6f8d-dd7537f288f8", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "listdeletedpaths_prefixlistdeletedpaths_prefix/file133086339706103860trueMon, 26 Sep 2022 02:46:10 GMTMon, 26 Sep 2022 02:46:10 GMTMon, 03 Oct 2022 02:46:10 GMT0x8DA9F6944E44615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:10 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:10 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "9bae0a34-ab01-430d-6f8d-dd7537f288f8", + "x-ms-request-id": "be971be9-a01e-0044-7e52-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&prefix=listdeletedpaths_prefix&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "dd33d50f-f5e5-4419-5d79-4b7ff37e0d33", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "dd33d50f-f5e5-4419-5d79-4b7ff37e0d33", + "x-ms-request-id": "be971ce1-a01e-0044-4352-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?restype=container" + } + ] +} diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json new file mode 100644 index 0000000000..5c4d0f9a93 --- /dev/null +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json @@ -0,0 +1,563 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "3cad7b55-ff79-4bc0-4268-7c528fb19c6c", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:11 GMT", + "etag": "\"0x8DA9F6945AFD651\"", + "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "3cad7b55-ff79-4bc0-4268-7c528fb19c6c", + "x-ms-request-id": "be971e13-a01e-0044-4552-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?restype=container" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "5cb27544-e997-4d95-711a-1d7a98da377a", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:11 GMT", + "etag": "\"0x8DA9F6945E73C6B\"", + "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "5cb27544-e997-4d95-711a-1d7a98da377a", + "x-ms-request-id": "efa8456b-001f-002f-3252-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?resource=directory" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "21683957-699c-4371-40a2-21512c38773c", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Created", + "STATUS_CODE": "201", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:11 GMT", + "etag": "\"0x8DA9F6946180615\"", + "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "21683957-699c-4371-40a2-21512c38773c", + "x-ms-request-id": "efa845a2-001f-002f-6952-d1df64000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file?resource=file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "8733f350-c41f-4c22-5d1e-4c32c9e18803", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:12 GMT", + "etag": "\"0x8DA9F6945E73C6B\"", + "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "8733f350-c41f-4c22-5d1e-4c32c9e18803", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-meta-hdi_isfolder": "true", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rwxr-x---", + "x-ms-request-id": "be972126-a01e-0044-7152-d15890000000", + "x-ms-resource-type": "directory", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "71cef13d-1316-4c6f-44d0-5e0982b42421", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:12 GMT", + "etag": "\"0x8DA9F6946180615\"", + "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "71cef13d-1316-4c6f-44d0-5e0982b42421", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rw-r-----", + "x-ms-request-id": "be972234-a01e-0044-6152-d15890000000", + "x-ms-resource-type": "file", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "8437c86a-db62-4f2d-550d-09b7da0ff15f", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:12 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "8437c86a-db62-4f2d-550d-09b7da0ff15f", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339731655099", + "x-ms-request-id": "efa84638-001f-002f-7f52-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?recursive=true" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "7cb07678-579e-4ff6-776a-630c4c33d1dd", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "undelete_dir133086339731655099trueMon, 26 Sep 2022 02:46:11 GMTMon, 26 Sep 2022 02:46:11 GMTMon, 03 Oct 2022 02:46:13 GMT0x8DA9F6945E73C6Bdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:13 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:13 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "7cb07678-579e-4ff6-776a-630c4c33d1dd", + "x-ms-request-id": "be972595-a01e-0044-5852-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "6a1bd4fd-0d48-4565-64b1-067fb49dbafd", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:13 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "6a1bd4fd-0d48-4565-64b1-067fb49dbafd", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-request-id": "be9726be-a01e-0044-5a52-d15890000000", + "x-ms-resource-type": "directory", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?comp=undelete" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "7d430631-477f-43bf-77da-8bd68ebd1e3c", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "7d430631-477f-43bf-77da-8bd68ebd1e3c", + "x-ms-request-id": "be9727a9-a01e-0044-3352-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "6b0a4f03-eb2a-4958-7501-63c82be232a5", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "etag": "\"0x8DA9F6945E73C6B\"", + "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "6b0a4f03-eb2a-4958-7501-63c82be232a5", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-meta-hdi_isfolder": "true", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rwxr-x---", + "x-ms-request-id": "be97286f-a01e-0044-6252-d15890000000", + "x-ms-resource-type": "directory", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "e1689ab3-4c7d-4be1-4efe-6c04a8c189b1", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "etag": "\"0x8DA9F6946180615\"", + "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "e1689ab3-4c7d-4be1-4efe-6c04a8c189b1", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rw-r-----", + "x-ms-request-id": "be972904-a01e-0044-6352-d15890000000", + "x-ms-resource-type": "file", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "fb78185e-df29-4510-6b27-b1d6b0a15f86", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "fb78185e-df29-4510-6b27-b1d6b0a15f86", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339751508187", + "x-ms-request-id": "efa8475f-001f-002f-0752-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "391fd26f-103b-4f27-4491-a77c0bbbf22e", + "x-ms-version": "2021-06-08" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:15 GMT", + "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "391fd26f-103b-4f27-4491-a77c0bbbf22e", + "x-ms-delete-type-permanent": "false", + "x-ms-deletion-id": "133086339755164192", + "x-ms-request-id": "efa84775-001f-002f-1d52-d1df64000000", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?recursive=false" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "1b6224da-559c-4c02-76f2-e6de847c0fa2", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "undelete_dir133086339755164192trueMon, 26 Sep 2022 02:46:11 GMTMon, 26 Sep 2022 02:46:11 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6945E73C6Bdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6undelete_dir/sub_file133086339751508187trueMon, 26 Sep 2022 02:46:12 GMTMon, 26 Sep 2022 02:46:12 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6946180615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:15 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "1b6224da-559c-4c02-76f2-e6de847c0fa2", + "x-ms-request-id": "be972ba0-a01e-0044-3952-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "01e99efb-5042-460e-45b0-1f09fd816f85", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "01e99efb-5042-460e-45b0-1f09fd816f85", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-request-id": "be972c47-a01e-0044-5452-d15890000000", + "x-ms-resource-type": "directory", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?comp=undelete" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "a916660c-1ea8-4196-7aab-cd5c8b1a692b", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "undelete_dir/sub_file133086339751508187trueMon, 26 Sep 2022 02:46:12 GMTMon, 26 Sep 2022 02:46:12 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6946180615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:16 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "a916660c-1ea8-4196-7aab-cd5c8b1a692b", + "x-ms-request-id": "be972d31-a01e-0044-2652-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "6878aea9-1d3b-499f-63ae-5fd9cd7f7671", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:16 GMT", + "etag": "\"0x8DA9F6945E73C6B\"", + "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "6878aea9-1d3b-499f-63ae-5fd9cd7f7671", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-meta-hdi_isfolder": "true", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rwxr-x---", + "x-ms-request-id": "be972de8-a01e-0044-4d52-d15890000000", + "x-ms-resource-type": "directory", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "4b88d4c2-bdde-43a5-54f7-8c707838740b", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "The specified blob does not exist.", + "STATUS_CODE": "404", + "date": "Mon, 26 Sep 2022 02:46:17 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "4b88d4c2-bdde-43a5-54f7-8c707838740b", + "x-ms-error-code": "BlobNotFound", + "x-ms-request-id": "be972e8d-a01e-0044-5f52-d15890000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "c13433c2-8de7-4780-5ed2-494949f17448", + "x-ms-version": "2021-06-08" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "c13433c2-8de7-4780-5ed2-494949f17448", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-request-id": "dbe8cfcf-501e-001d-6252-d1df13000000", + "x-ms-resource-type": "file", + "x-ms-version": "2021-06-08" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file?comp=undelete" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "893a7d50-e15e-4ee7-5dcd-e1fa0171de99", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Mon, 26 Sep 2022 02:46:18 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "893a7d50-e15e-4ee7-5dcd-e1fa0171de99", + "x-ms-request-id": "dbe8d163-501e-001d-5652-d1df13000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "73c87d75-1266-4ac5-74a5-e9f367b4871f", + "x-ms-version": "2021-04-10" + }, + "Method": "HEAD", + "Response": { + "BODY": "", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "accept-ranges": "bytes", + "content-length": "0", + "content-type": "application/octet-stream", + "date": "Mon, 26 Sep 2022 02:46:19 GMT", + "etag": "\"0x8DA9F6946180615\"", + "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-access-tier": "Hot", + "x-ms-access-tier-inferred": "true", + "x-ms-blob-type": "BlockBlob", + "x-ms-client-request-id": "73c87d75-1266-4ac5-74a5-e9f367b4871f", + "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-group": "$superuser", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-owner": "$superuser", + "x-ms-permissions": "rw-r-----", + "x-ms-request-id": "dbe8d284-501e-001d-5952-d1df13000000", + "x-ms-resource-type": "file", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "e2656417-78d2-489f-4905-57332b9a21e8", + "x-ms-version": "2021-04-10" + }, + "Method": "DELETE", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Mon, 26 Sep 2022 02:46:19 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "e2656417-78d2-489f-4905-57332b9a21e8", + "x-ms-request-id": "dbe8d365-501e-001d-2852-d1df13000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?restype=container" + } + ] +} From 044f697b249fdfb5ef6cfbae0826cb3ac128a73e Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Mon, 26 Sep 2022 11:36:38 +0800 Subject: [PATCH 2/7] fix bug --- .../inc/azure/storage/files/datalake/datalake_responses.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index 2ddfbe8cca..b6b5d4adc6 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -14,6 +14,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { class DataLakeServiceClient; + class DataLakeFileSystemClient; class DataLakePathClient; namespace Models { From a8f75be8da600c5406c99a25b32e2f217d88a750 Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Tue, 27 Sep 2022 11:02:15 +0800 Subject: [PATCH 3/7] resolve conversation & add get/set DataLakeService Properties --- .../inc/azure/storage/blobs/rest_client.hpp | 15 -- .../azure-storage-blobs/src/rest_client.cpp | 1 - .../azure-storage-blobs/swagger/README.md | 11 - .../datalake/datalake_file_system_client.hpp | 5 +- .../files/datalake/datalake_options.hpp | 12 +- .../files/datalake/datalake_responses.hpp | 13 +- .../datalake/datalake_service_client.hpp | 34 +++ .../src/datalake_file_system_client.cpp | 24 +- .../src/private/datalake_constants.hpp | 1 - .../ut/datalake_file_system_client_test.cpp | 76 +++--- .../test/ut/datalake_service_client_test.cpp | 212 +++++++++++++++ ...FileSystemClientTest.ListDeletedPaths.json | 164 ++++++------ ...DataLakeFileSystemClientTest.Undelete.json | 242 +++++++++--------- ...taLakeServiceClientTest.GetProperties.json | 25 ++ ...taLakeServiceClientTest.SetProperties.json | 88 +++++++ 15 files changed, 629 insertions(+), 294 deletions(-) create mode 100644 sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.GetProperties.json create mode 100644 sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.SetProperties.json diff --git a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp index b2108123da..1619af2717 100644 --- a/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp +++ b/sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp @@ -50,21 +50,6 @@ namespace Azure { namespace Storage { namespace Blobs { const std::string& ToString() const { return m_value; } AZ_STORAGE_BLOBS_DLLEXPORT const static EncryptionAlgorithmType Aes256; - private: - std::string m_value; - }; - /** - * @brief Include this parameter to specify one or more datasets to include in the response. - */ - class ListBlobsShowOnlyType final { - public: - ListBlobsShowOnlyType() = default; - explicit ListBlobsShowOnlyType(std::string value) : m_value(std::move(value)) {} - bool operator==(const ListBlobsShowOnlyType& other) const { return m_value == other.m_value; } - bool operator!=(const ListBlobsShowOnlyType& other) const { return !(*this == other); } - const std::string& ToString() const { return m_value; } - AZ_STORAGE_BLOBS_DLLEXPORT const static ListBlobsShowOnlyType Deleted; - private: std::string m_value; }; diff --git a/sdk/storage/azure-storage-blobs/src/rest_client.cpp b/sdk/storage/azure-storage-blobs/src/rest_client.cpp index bf961141ac..f49fb800c5 100644 --- a/sdk/storage/azure-storage-blobs/src/rest_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/rest_client.cpp @@ -99,7 +99,6 @@ std::string ListBlobsIncludeFlagsToString( namespace Azure { namespace Storage { namespace Blobs { namespace Models { const EncryptionAlgorithmType EncryptionAlgorithmType::Aes256("AES256"); - const ListBlobsShowOnlyType ListBlobsShowOnlyType::Deleted("deleted"); const BlockType BlockType::Committed("Committed"); const BlockType BlockType::Uncommitted("Uncommitted"); const BlockType BlockType::Latest("Latest"); diff --git a/sdk/storage/azure-storage-blobs/swagger/README.md b/sdk/storage/azure-storage-blobs/swagger/README.md index b3daaedfc2..efb40c7ee0 100644 --- a/sdk/storage/azure-storage-blobs/swagger/README.md +++ b/sdk/storage/azure-storage-blobs/swagger/README.md @@ -312,17 +312,6 @@ directive: "x-ms-export": true, "description": "The algorithm used to produce the encryption key hash. Currently, the only accepted value is \"AES256\". Must be provided if the x-ms-encryption-key header is provided." }; - $.ListBlobsShowOnly = { - "type": "string", - "enum": ["deleted"], - "x-ms-enum": { - "name": "ListBlobsShowOnlyType", - "modelAsString": false, - "values": [{"value": "__placeHolder", "name": "__placeHolder"}, {"value": "deleted", "name": "Deleted"}] - }, - "x-ms-export": true, - "description": "Include this parameter to specify one or more datasets to include in the response." - }; $.BlockType = { "type": "string", "enum": ["Committed", "Uncommitted", "Latest"], diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp index 0e0eade022..4e390b13b5 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_system_client.hpp @@ -254,14 +254,15 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @brief Restores a soft deleted path. * @param deletedPath The path of the deleted path. * @param deletionId The deletion ID associated with the soft deleted path. You can get soft - * deleted paths and their assocaited deletion IDs with ListDeletedPaths. + * deleted paths and their associated deletion IDs with ListDeletedPaths. * @param context Context for cancelling long running operations. * @return Azure::Response The client targets the restored path. * @remark This request is sent to Blob endpoint. */ - Azure::Response Undelete( + Azure::Response UndeletePath( const std::string& deletedPath, const std::string& deletionId, + const UndeletePathOptions& options = UndeletePathOptions(), const Azure::Core::Context& context = Azure::Core::Context()) const; private: diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp index bc91f599de..8c0a0d88e4 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp @@ -28,6 +28,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { using DownloadFileToOptions = Blobs::DownloadBlobToOptions; using GetUserDelegationKeyOptions = Blobs::GetUserDelegationKeyOptions; + using GetServicePropertiesOptions = Blobs::GetServicePropertiesOptions; + using SetServicePropertiesOptions = Blobs::SetServicePropertiesOptions; using EncryptionKey = Blobs::EncryptionKey; /** @@ -199,7 +201,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * Gets the paths that have recently been soft deleted in this file system. */ - Azure::Nullable PathPrefix; + Azure::Nullable Prefix; /** * The number of paths returned with each invocation is limited. If the number of paths to be @@ -216,6 +218,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { Azure::Nullable PageSizeHint; }; + /** + * @brief Optional parameters for + * #Azure::Storage::Files::DataLake::FileSystemClient::UndeletePath. + */ + struct UndeletePathOptions final + { + }; + /** * @brief Optional parameters for * #Azure::Storage::Files::DataLake::FileSystemClient::GetAccessPolicy. diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index b6b5d4adc6..aac2c78112 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -27,6 +27,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { // ServiceClient models: using UserDelegationKey = Blobs::Models::UserDelegationKey; + using RetentionPolicy = Blobs::Models::RetentionPolicy; + using AnalyticsLogging = Blobs::Models::AnalyticsLogging; + using Metrics = Blobs::Models::Metrics; + using CorsRule = Blobs::Models::CorsRule; + using StaticWebsite = Blobs::Models::StaticWebsite; + using DataLakeServiceProperties = Blobs::Models::BlobServiceProperties; + using SetServicePropertiesResult = Blobs::Models::SetServicePropertiesResult; /** * @brief The detailed information of a file system. @@ -457,17 +464,17 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * The deletion ID associated with the deleted path. */ - Azure::Nullable DeletionId; + std::string DeletionId; /** * When the path was deleted. */ - Azure::Nullable DeletedOn; + DateTime DeletedOn; /** * The number of days left before the soft deleted path will be permanently deleted. */ - Azure::Nullable RemainingRetentionDays; + int64_t RemainingRetentionDays; }; // FileClient models: diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp index 564c971d02..02737b49f9 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp @@ -109,6 +109,40 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { return m_blobServiceClient.GetUserDelegationKey(expiresOn, options, context); } + /** + * @brief Sets properties for a storage account's Blob service endpoint, including + * properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete + * settings. You can also use this operation to set the default request version for all incoming + * requests to the Blob service that do not have a version specified. + * + * @param properties The blob service properties. + * @param options Optional parameters to execute this function. + * @param context Context for cancelling long running operations. + * @return A SetServicePropertiesResult on successfully setting the properties. + */ + Azure::Response SetProperties( + Models::DataLakeServiceProperties properties, + const SetServicePropertiesOptions& options = SetServicePropertiesOptions(), + const Azure::Core::Context& context = Azure::Core::Context()) const + { + return m_blobServiceClient.SetProperties(properties, options, context); + } + + /** + * @brief Gets the properties of a storage account's blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * + * @param options Optional parameters to execute this function. + * @param context Context for cancelling long running operations. + * @return A BlobServiceProperties describing the service properties. + */ + Azure::Response GetProperties( + const GetServicePropertiesOptions& options = GetServicePropertiesOptions(), + const Azure::Core::Context& context = Azure::Core::Context()) const + { + return m_blobServiceClient.GetProperties(options, context); + } + private: Azure::Core::Url m_serviceUrl; Blobs::BlobServiceClient m_blobServiceClient; diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index 161984a74d..70278f9752 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -431,10 +431,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { Blobs::_detail::BlobContainerClient::ListBlobContainerBlobsByHierarchyOptions protocolLayerOptions; - protocolLayerOptions.Prefix = options.PathPrefix; + protocolLayerOptions.Prefix = options.Prefix; protocolLayerOptions.MaxResults = options.PageSizeHint; protocolLayerOptions.Marker = options.ContinuationToken; - protocolLayerOptions.ShowOnly = Blobs::Models::ListBlobsShowOnlyType::Deleted.ToString(); + protocolLayerOptions.ShowOnly = "deleted"; auto result = Blobs::_detail::BlobContainerClient::ListBlobsByHierarchy( *m_pipeline, m_blobContainerClient.m_blobContainerUrl, protocolLayerOptions, context); @@ -450,11 +450,11 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { pathDeletedItem.Name = std::move(item.Name.Content); } - pathDeletedItem.DeletedOn = item.Details.DeletedOn; - pathDeletedItem.DeletionId = item.DeletionId; + pathDeletedItem.DeletedOn = item.Details.DeletedOn.Value(); + pathDeletedItem.DeletionId = item.DeletionId.Value(); pathDeletedItem.RemainingRetentionDays = item.Details.RemainingRetentionDays.Value(); - pagedResponse.DeletedPaths.push_back(pathDeletedItem); + pagedResponse.DeletedPaths.push_back(std::move(pathDeletedItem)); } pagedResponse.m_operationOptions = options; pagedResponse.m_fileSystemClient = std::make_shared(*this); @@ -465,19 +465,23 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { return pagedResponse; } - Azure::Response DataLakeFileSystemClient::Undelete( + Azure::Response DataLakeFileSystemClient::UndeletePath( const std::string& deletedPath, const std::string& deletionId, + const UndeletePathOptions& options, const Azure::Core::Context& context) const { - std::string undeleteSource = std::string("?") + _detail::DataLakeDeletionId + "=" + deletionId; + (void)options; + /* cspell:disable-next-line */ + std::string undeleteSource = "?deletionid=" + deletionId; auto blobUrl = m_blobContainerClient.m_blobContainerUrl; blobUrl.AppendPath(_internal::UrlEncodePath(deletedPath)); - _detail::PathClient::UndeletePathOptions options; - options.UndeleteSource = undeleteSource; - auto result = _detail::PathClient::Undelete(*m_pipeline, blobUrl, options, context); + _detail::PathClient::UndeletePathOptions protocolLayerOptions; + protocolLayerOptions.UndeleteSource = undeleteSource; + auto result + = _detail::PathClient::Undelete(*m_pipeline, blobUrl, protocolLayerOptions, context); if (result.Value.ResourceType.HasValue() && result.Value.ResourceType.Value() == Models::PathResourceType::Directory.ToString()) diff --git a/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp b/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp index a0be960f7d..19102b1003 100644 --- a/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp +++ b/sdk/storage/azure-storage-files-datalake/src/private/datalake_constants.hpp @@ -11,6 +11,5 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { nam constexpr static const char* DataLakePathNotFound = "PathNotFound"; constexpr static const char* DataLakePathAlreadyExists = "PathAlreadyExists"; constexpr static const char* DataLakeIsDirectoryKey = "hdi_isFolder"; - constexpr static const char* DataLakeDeletionId = "deletionid"; }}}}} // namespace Azure::Storage::Files::DataLake::_detail diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp index 70ae0b9d8a..e42bd5d39d 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp @@ -842,16 +842,11 @@ namespace Azure { namespace Storage { namespace Test { nonDeletedDirectoryClient.Create(); { - auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; + std::vector paths; + EXPECT_NO_THROW(paths = std::move(m_fileSystemClient->ListDeletedPaths().DeletedPaths)); EXPECT_EQ(2, paths.size()); EXPECT_EQ(deletedDirectoryName, paths[0].Name); - EXPECT_TRUE(paths[0].DeletionId.HasValue()); - EXPECT_TRUE(paths[0].DeletedOn.HasValue()); - EXPECT_TRUE(paths[0].RemainingRetentionDays.HasValue()); EXPECT_EQ(deletedFilename, paths[1].Name); - EXPECT_TRUE(paths[1].DeletionId.HasValue()); - EXPECT_TRUE(paths[1].DeletedOn.HasValue()); - EXPECT_TRUE(paths[1].RemainingRetentionDays.HasValue()); } // List max result { @@ -878,13 +873,12 @@ namespace Azure { namespace Storage { namespace Test { fileClient.Delete(); Files::DataLake::ListDeletedPathsOptions options; - options.PathPrefix = directoryName; - auto paths = m_fileSystemClient->ListDeletedPaths(options).DeletedPaths; + options.Prefix = directoryName; + std::vector paths; + EXPECT_NO_THROW( + paths = std::move(m_fileSystemClient->ListDeletedPaths(options).DeletedPaths)); EXPECT_EQ(1, paths.size()); EXPECT_EQ(directoryName + "/" + filename, paths[0].Name); - EXPECT_TRUE(paths[0].DeletionId.HasValue()); - EXPECT_TRUE(paths[0].DeletedOn.HasValue()); - EXPECT_TRUE(paths[0].RemainingRetentionDays.HasValue()); } } @@ -897,36 +891,28 @@ namespace Azure { namespace Storage { namespace Test { directoryClient.Create(); auto subFileClient = m_fileSystemClient->GetFileClient(directoryName + "/" + subFileName); subFileClient.Create(); - std::shared_ptr properties - = std::make_shared( - directoryClient.GetProperties().Value); - std::shared_ptr subFileProperties - = std::make_shared( - subFileClient.GetProperties().Value); + Files::DataLake::Models::PathProperties properties = directoryClient.GetProperties().Value; + Files::DataLake::Models::PathProperties subFileProperties = subFileClient.GetProperties().Value; // recursive works { directoryClient.DeleteRecursive(); auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; - const std::string deletionId = paths[0].DeletionId.Value(); + const std::string deletionId = paths[0].DeletionId; - auto restoredClient = m_fileSystemClient->Undelete(directoryName, deletionId).Value; + auto restoredClient = m_fileSystemClient->UndeletePath(directoryName, deletionId).Value; paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; EXPECT_EQ(0, paths.size()); - std::shared_ptr restoredProperties; - EXPECT_NO_THROW( - restoredProperties = std::make_shared( - restoredClient.GetProperties().Value)); - EXPECT_TRUE(restoredProperties->IsDirectory); - EXPECT_EQ(properties->ETag, restoredProperties->ETag); - std::shared_ptr restoredSubFileProperties; - EXPECT_NO_THROW( - restoredSubFileProperties = std::make_shared( - subFileClient.GetProperties().Value)); - EXPECT_TRUE(!restoredSubFileProperties->IsDirectory); - EXPECT_EQ(subFileProperties->ETag, restoredSubFileProperties->ETag); + Files::DataLake::Models::PathProperties restoredProperties; + EXPECT_NO_THROW(restoredProperties = restoredClient.GetProperties().Value); + EXPECT_TRUE(restoredProperties.IsDirectory); + EXPECT_EQ(properties.ETag, restoredProperties.ETag); + Files::DataLake::Models::PathProperties restoredSubFileProperties; + EXPECT_NO_THROW(restoredSubFileProperties = subFileClient.GetProperties().Value); + EXPECT_TRUE(!restoredSubFileProperties.IsDirectory); + EXPECT_EQ(subFileProperties.ETag, restoredSubFileProperties.ETag); } // not recursive works { @@ -934,31 +920,27 @@ namespace Azure { namespace Storage { namespace Test { directoryClient.DeleteEmpty(); auto paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; - std::string deletionId = paths[0].DeletionId.Value(); + std::string deletionId = paths[0].DeletionId; // restore directory - auto restoredClient = m_fileSystemClient->Undelete(directoryName, deletionId).Value; + auto restoredClient = m_fileSystemClient->UndeletePath(directoryName, deletionId).Value; paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; EXPECT_EQ(1, paths.size()); // not restore subFile - std::shared_ptr restoredProperties; - EXPECT_NO_THROW( - restoredProperties = std::make_shared( - restoredClient.GetProperties().Value)); - EXPECT_TRUE(restoredProperties->IsDirectory); - EXPECT_EQ(properties->ETag, restoredProperties->ETag); + Files::DataLake::Models::PathProperties restoredProperties; + EXPECT_NO_THROW(restoredProperties = restoredClient.GetProperties().Value); + EXPECT_TRUE(restoredProperties.IsDirectory); + EXPECT_EQ(properties.ETag, restoredProperties.ETag); EXPECT_THROW(subFileClient.GetProperties(), StorageException); // restore file - deletionId = paths[0].DeletionId.Value(); + deletionId = paths[0].DeletionId; restoredClient - = m_fileSystemClient->Undelete(directoryName + "/" + subFileName, deletionId).Value; + = m_fileSystemClient->UndeletePath(directoryName + "/" + subFileName, deletionId).Value; paths = m_fileSystemClient->ListDeletedPaths().DeletedPaths; EXPECT_EQ(0, paths.size()); - EXPECT_NO_THROW( - restoredProperties = std::make_shared( - restoredClient.GetProperties().Value)); - EXPECT_TRUE(!restoredProperties->IsDirectory); - EXPECT_EQ(subFileProperties->ETag, restoredProperties->ETag); + EXPECT_NO_THROW(restoredProperties = restoredClient.GetProperties().Value); + EXPECT_FALSE(restoredProperties.IsDirectory); + EXPECT_EQ(subFileProperties.ETag, restoredProperties.ETag); } } diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_service_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_service_client_test.cpp index ca7458b166..8eb1ada010 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_service_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_service_client_test.cpp @@ -6,6 +6,66 @@ #include #include +namespace Azure { namespace Storage { namespace Blobs { namespace Models { + + bool operator==(const RetentionPolicy& lhs, const RetentionPolicy& rhs) + { + if (lhs.IsEnabled != rhs.IsEnabled) + { + return false; + } + if (lhs.Days.HasValue() != rhs.Days.HasValue()) + { + return false; + } + if (lhs.Days.HasValue() && rhs.Days.HasValue() && lhs.Days.Value() != rhs.Days.Value()) + { + return false; + } + return true; + } + + bool operator==(const CorsRule& lhs, const CorsRule& rhs) + { + return lhs.AllowedHeaders == rhs.AllowedHeaders && lhs.AllowedMethods == rhs.AllowedMethods + && lhs.AllowedOrigins == rhs.AllowedOrigins && lhs.ExposedHeaders == rhs.ExposedHeaders + && lhs.MaxAgeInSeconds == rhs.MaxAgeInSeconds; + } + + bool operator==(const StaticWebsite& lhs, const StaticWebsite& rhs) + { + if (lhs.IsEnabled != rhs.IsEnabled) + { + return false; + } + if (lhs.DefaultIndexDocumentPath.HasValue() != rhs.DefaultIndexDocumentPath.HasValue()) + { + return false; + } + if (lhs.DefaultIndexDocumentPath.HasValue() && rhs.DefaultIndexDocumentPath.HasValue() + && lhs.DefaultIndexDocumentPath.Value() != rhs.DefaultIndexDocumentPath.Value()) + { + return false; + } + if (lhs.DefaultIndexDocumentPath.HasValue() != rhs.DefaultIndexDocumentPath.HasValue()) + { + return false; + } + if (lhs.ErrorDocument404Path.HasValue() && rhs.ErrorDocument404Path.HasValue() + && lhs.ErrorDocument404Path.Value() != rhs.ErrorDocument404Path.Value()) + { + return false; + } + if (lhs.IndexDocument.HasValue() && rhs.IndexDocument.HasValue() + && lhs.IndexDocument.Value() != rhs.IndexDocument.Value()) + { + return false; + } + return true; + } + +}}}} // namespace Azure::Storage::Blobs::Models + namespace Azure { namespace Storage { namespace Test { const size_t FileSystemTestSize = 5; @@ -174,4 +234,156 @@ namespace Azure { namespace Storage { namespace Test { EXPECT_NO_THROW(datalakeServiceClient.ListFileSystems()); } + TEST_F(DataLakeServiceClientTest, GetProperties) + { + + auto ret = m_dataLakeServiceClient->GetProperties(); + auto properties = ret.Value; + auto logging = properties.Logging; + EXPECT_FALSE(logging.Version.empty()); + if (logging.RetentionPolicy.IsEnabled) + { + EXPECT_TRUE(logging.RetentionPolicy.Days.HasValue()); + } + auto hourMetrics = properties.HourMetrics; + if (hourMetrics.IsEnabled) + { + EXPECT_FALSE(hourMetrics.Version.empty()); + if (hourMetrics.RetentionPolicy.IsEnabled) + { + EXPECT_TRUE(hourMetrics.RetentionPolicy.Days.HasValue()); + } + } + auto minuteMetrics = properties.HourMetrics; + if (minuteMetrics.IsEnabled) + { + EXPECT_FALSE(minuteMetrics.Version.empty()); + if (minuteMetrics.RetentionPolicy.IsEnabled) + { + EXPECT_TRUE(minuteMetrics.RetentionPolicy.Days.HasValue()); + } + } + auto deleteRetentionPolicy = properties.DeleteRetentionPolicy; + if (deleteRetentionPolicy.IsEnabled) + { + EXPECT_TRUE(deleteRetentionPolicy.Days.HasValue()); + } + } + + TEST_F(DataLakeServiceClientTest, SetProperties) + { + + auto getServicePropertiesResult = m_dataLakeServiceClient->GetProperties().Value; + Files::DataLake::Models::DataLakeServiceProperties properties; + properties.Logging = getServicePropertiesResult.Logging; + properties.HourMetrics = getServicePropertiesResult.HourMetrics; + properties.MinuteMetrics = getServicePropertiesResult.MinuteMetrics; + properties.Cors = getServicePropertiesResult.Cors; + properties.DefaultServiceVersion = getServicePropertiesResult.DefaultServiceVersion; + properties.DeleteRetentionPolicy = getServicePropertiesResult.DeleteRetentionPolicy; + properties.StaticWebsite = getServicePropertiesResult.StaticWebsite; + + auto originalProperties = properties; + + properties.Logging.Delete = !properties.Logging.Delete; + properties.Logging.Read = !properties.Logging.Read; + properties.Logging.Write = !properties.Logging.Write; + properties.Logging.RetentionPolicy.IsEnabled = true; + properties.Logging.RetentionPolicy.Days = 3; + + properties.HourMetrics.IsEnabled = true; + properties.HourMetrics.RetentionPolicy.IsEnabled = true; + properties.HourMetrics.RetentionPolicy.Days = 4; + properties.HourMetrics.IncludeApis = true; + + properties.MinuteMetrics.IsEnabled = true; + properties.MinuteMetrics.RetentionPolicy.IsEnabled = true; + properties.MinuteMetrics.RetentionPolicy.Days = 4; + properties.MinuteMetrics.IncludeApis = true; + + properties.DefaultServiceVersion = Files::DataLake::_detail::ApiVersion; + + properties.StaticWebsite.IsEnabled = true; + properties.StaticWebsite.IndexDocument = "index.html"; + properties.StaticWebsite.ErrorDocument404Path = "404.html"; + properties.StaticWebsite.DefaultIndexDocumentPath.Reset(); + + Files::DataLake::Models::CorsRule corsRule; + corsRule.AllowedOrigins = "http://www.example1.com"; + corsRule.AllowedMethods = "GET,PUT"; + corsRule.AllowedHeaders = "x-ms-header1,x-ms-header2"; + corsRule.ExposedHeaders = "x-ms-header3"; + corsRule.MaxAgeInSeconds = 10; + properties.Cors.emplace_back(corsRule); + + corsRule.AllowedOrigins = "http://www.example2.com"; + corsRule.AllowedMethods = "DELETE"; + corsRule.AllowedHeaders = "x-ms-header1"; + corsRule.ExposedHeaders = "x-ms-header2,x-ms-header3"; + corsRule.MaxAgeInSeconds = 20; + properties.Cors.emplace_back(corsRule); + + properties.DeleteRetentionPolicy.IsEnabled = true; + properties.DeleteRetentionPolicy.Days = 7; + + EXPECT_NO_THROW(m_dataLakeServiceClient->SetProperties(properties)); + + // It takes some time before the new properties comes into effect. + using namespace std::chrono_literals; + TestSleep(10s); + auto downloadedProperties = m_dataLakeServiceClient->GetProperties().Value; + EXPECT_EQ(downloadedProperties.Logging.Version, properties.Logging.Version); + EXPECT_EQ(downloadedProperties.Logging.Delete, properties.Logging.Delete); + EXPECT_EQ(downloadedProperties.Logging.Read, properties.Logging.Read); + EXPECT_EQ(downloadedProperties.Logging.Write, properties.Logging.Write); + EXPECT_EQ(downloadedProperties.Logging.RetentionPolicy, properties.Logging.RetentionPolicy); + + EXPECT_EQ(downloadedProperties.HourMetrics.Version, properties.HourMetrics.Version); + EXPECT_EQ(downloadedProperties.HourMetrics.IsEnabled, properties.HourMetrics.IsEnabled); + EXPECT_EQ( + downloadedProperties.HourMetrics.IncludeApis.HasValue(), + properties.HourMetrics.IncludeApis.HasValue()); + if (downloadedProperties.HourMetrics.IncludeApis.HasValue() + == properties.HourMetrics.IncludeApis.HasValue()) + { + EXPECT_EQ( + downloadedProperties.HourMetrics.IncludeApis.Value(), + properties.HourMetrics.IncludeApis.Value()); + } + EXPECT_EQ( + downloadedProperties.HourMetrics.RetentionPolicy, properties.HourMetrics.RetentionPolicy); + + EXPECT_EQ(downloadedProperties.MinuteMetrics.Version, properties.MinuteMetrics.Version); + EXPECT_EQ(downloadedProperties.MinuteMetrics.IsEnabled, properties.MinuteMetrics.IsEnabled); + EXPECT_EQ( + downloadedProperties.MinuteMetrics.IncludeApis.HasValue(), + properties.MinuteMetrics.IncludeApis.HasValue()); + if (downloadedProperties.MinuteMetrics.IncludeApis.HasValue() + == properties.MinuteMetrics.IncludeApis.HasValue()) + { + EXPECT_EQ( + downloadedProperties.MinuteMetrics.IncludeApis.Value(), + properties.MinuteMetrics.IncludeApis.Value()); + } + EXPECT_EQ( + downloadedProperties.MinuteMetrics.RetentionPolicy, + properties.MinuteMetrics.RetentionPolicy); + + EXPECT_EQ( + downloadedProperties.DefaultServiceVersion.HasValue(), + properties.DefaultServiceVersion.HasValue()); + if (downloadedProperties.DefaultServiceVersion.HasValue()) + { + EXPECT_EQ( + downloadedProperties.DefaultServiceVersion.Value(), + properties.DefaultServiceVersion.Value()); + } + EXPECT_EQ(downloadedProperties.Cors, properties.Cors); + + EXPECT_EQ(downloadedProperties.StaticWebsite, properties.StaticWebsite); + + EXPECT_EQ(downloadedProperties.DeleteRetentionPolicy, properties.DeleteRetentionPolicy); + + auto res = m_dataLakeServiceClient->SetProperties(originalProperties); + } }}} // namespace Azure::Storage::Test diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json index 74b5e43b23..b0764dbbd4 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.ListDeletedPaths.json @@ -3,7 +3,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "3cf7aba9-e437-4ab4-4cee-72198097ba87", + "x-ms-client-request-id": "4852b7d9-3925-4652-42b3-dae71445ca10", "x-ms-version": "2021-04-10" }, "Method": "PUT", @@ -12,12 +12,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:05 GMT", - "etag": "\"0x8DA9F69420DBD38\"", - "last-modified": "Mon, 26 Sep 2022 02:46:05 GMT", + "date": "Tue, 27 Sep 2022 03:01:07 GMT", + "etag": "\"0x8DAA0348687215F\"", + "last-modified": "Tue, 27 Sep 2022 03:01:08 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3cf7aba9-e437-4ab4-4cee-72198097ba87", - "x-ms-request-id": "be97020f-a01e-0044-7052-d15890000000", + "x-ms-client-request-id": "4852b7d9-3925-4652-42b3-dae71445ca10", + "x-ms-request-id": "3803bf63-901e-0084-381d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?restype=container" @@ -25,7 +25,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "b7421dc7-604f-4384-5ed0-afb925935d7b", + "x-ms-client-request-id": "9597f3b2-8051-4fae-7a42-af04abd14058", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -34,12 +34,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:06 GMT", - "etag": "\"0x8DA9F6942E67873\"", - "last-modified": "Mon, 26 Sep 2022 02:46:06 GMT", + "date": "Tue, 27 Sep 2022 03:01:09 GMT", + "etag": "\"0x8DAA03487668E60\"", + "last-modified": "Tue, 27 Sep 2022 03:01:09 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b7421dc7-604f-4384-5ed0-afb925935d7b", - "x-ms-request-id": "efa84174-001f-002f-4552-d1df64000000", + "x-ms-client-request-id": "9597f3b2-8051-4fae-7a42-af04abd14058", + "x-ms-request-id": "4c4b6f94-201f-0028-7d1d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -48,7 +48,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "f78b80df-1699-4e67-5b29-409d5369b4e1", + "x-ms-client-request-id": "283a24d9-c672-4a35-469d-38c6ddff5a3a", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -57,12 +57,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:07 GMT", + "date": "Tue, 27 Sep 2022 03:01:10 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f78b80df-1699-4e67-5b29-409d5369b4e1", + "x-ms-client-request-id": "283a24d9-c672-4a35-469d-38c6ddff5a3a", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339672719386", - "x-ms-request-id": "efa841dd-001f-002f-2d52-d1df64000000", + "x-ms-deletion-id": "133087212699969504", + "x-ms-request-id": "4c4b6faf-201f-0028-181d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_file_deleted" @@ -70,7 +70,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "f424b64d-385d-4d4d-7ccf-43a2dc19a05d", + "x-ms-client-request-id": "fd92820d-a84c-4005-553c-236f35238574", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -79,12 +79,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:07 GMT", - "etag": "\"0x8DA9F694366BCBC\"", - "last-modified": "Mon, 26 Sep 2022 02:46:07 GMT", + "date": "Tue, 27 Sep 2022 03:01:10 GMT", + "etag": "\"0x8DAA03487DB1A28\"", + "last-modified": "Tue, 27 Sep 2022 03:01:10 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f424b64d-385d-4d4d-7ccf-43a2dc19a05d", - "x-ms-request-id": "efa8426f-001f-002f-3f52-d1df64000000", + "x-ms-client-request-id": "fd92820d-a84c-4005-553c-236f35238574", + "x-ms-request-id": "4c4b6fd9-201f-0028-421d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -93,7 +93,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "f33aa0ba-f5e5-421f-61d3-35514d46d8dc", + "x-ms-client-request-id": "98d837bb-2268-465e-5f0d-dd46d60a6ee6", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -102,12 +102,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:07 GMT", - "etag": "\"0x8DA9F694396EC98\"", - "last-modified": "Mon, 26 Sep 2022 02:46:08 GMT", + "date": "Tue, 27 Sep 2022 03:01:10 GMT", + "etag": "\"0x8DAA0348811B4A5\"", + "last-modified": "Tue, 27 Sep 2022 03:01:10 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "f33aa0ba-f5e5-421f-61d3-35514d46d8dc", - "x-ms-request-id": "efa842c1-001f-002f-1152-d1df64000000", + "x-ms-client-request-id": "98d837bb-2268-465e-5f0d-dd46d60a6ee6", + "x-ms-request-id": "4c4b6ffb-201f-0028-631d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -116,7 +116,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "ab005b41-2432-4c3a-7f61-e413a866fe5e", + "x-ms-client-request-id": "3b879536-f06b-4e70-4d1f-fa955c686651", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -125,12 +125,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:08 GMT", + "date": "Tue, 27 Sep 2022 03:01:11 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "ab005b41-2432-4c3a-7f61-e413a866fe5e", + "x-ms-client-request-id": "3b879536-f06b-4e70-4d1f-fa955c686651", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339683639968", - "x-ms-request-id": "efa842f9-001f-002f-4952-d1df64000000", + "x-ms-deletion-id": "133087212712013186", + "x-ms-request-id": "4c4b7029-201f-0028-111d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_dir_deleted?recursive=false" @@ -138,7 +138,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "7c115f85-8848-4fa5-5f43-501b10d8b217", + "x-ms-client-request-id": "b1485ff3-9018-4e1d-7612-d7c6361391a2", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -147,12 +147,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:08 GMT", - "etag": "\"0x8DA9F6943FBB25C\"", - "last-modified": "Mon, 26 Sep 2022 02:46:08 GMT", + "date": "Tue, 27 Sep 2022 03:01:11 GMT", + "etag": "\"0x8DAA03488877376\"", + "last-modified": "Tue, 27 Sep 2022 03:01:11 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "7c115f85-8848-4fa5-5f43-501b10d8b217", - "x-ms-request-id": "efa84337-001f-002f-0752-d1df64000000", + "x-ms-client-request-id": "b1485ff3-9018-4e1d-7612-d7c6361391a2", + "x-ms-request-id": "4c4b704a-201f-0028-321d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -161,20 +161,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "678b1629-04fe-4a90-7f3d-dd8736383def", + "x-ms-client-request-id": "01922a3c-dfe2-444c-4ebe-35b4180305dd", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "listdeletedpaths_dir_deleted133086339683639968trueMon, 26 Sep 2022 02:46:08 GMTMon, 26 Sep 2022 02:46:08 GMTMon, 03 Oct 2022 02:46:08 GMT0x8DA9F694396EC98directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:08 GMT6listdeletedpaths_file_deleted133086339672719386trueMon, 26 Sep 2022 02:46:06 GMTMon, 26 Sep 2022 02:46:06 GMTMon, 03 Oct 2022 02:46:07 GMT0x8DA9F6942E67873file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:07 GMT6", + "BODY": "listdeletedpaths_dir_deleted133087212712013186trueTue, 27 Sep 2022 03:01:10 GMTTue, 27 Sep 2022 03:01:10 GMTTue, 04 Oct 2022 03:01:11 GMT0x8DAA0348811B4A5directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:11 GMT6listdeletedpaths_file_deleted133087212699969504trueTue, 27 Sep 2022 03:01:09 GMTTue, 27 Sep 2022 03:01:09 GMTTue, 04 Oct 2022 03:01:09 GMT0x8DAA03487668E60file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:09 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:08 GMT", + "date": "Tue, 27 Sep 2022 03:01:11 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "678b1629-04fe-4a90-7f3d-dd8736383def", - "x-ms-request-id": "be9715b0-a01e-0044-6652-d15890000000", + "x-ms-client-request-id": "01922a3c-dfe2-444c-4ebe-35b4180305dd", + "x-ms-request-id": "3803c98a-901e-0084-781d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&restype=container&showonly=deleted" @@ -182,20 +182,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "d9fc970d-db09-4afa-59e2-67488a1a3c10", + "x-ms-client-request-id": "a4a99895-6c61-4928-6900-ab38c0040236", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "1listdeletedpaths_dir_deleted133086339683639968trueMon, 26 Sep 2022 02:46:08 GMTMon, 26 Sep 2022 02:46:08 GMTMon, 03 Oct 2022 02:46:08 GMT0x8DA9F694396EC98directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:08 GMT62!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh", + "BODY": "1listdeletedpaths_dir_deleted133087212712013186trueTue, 27 Sep 2022 03:01:10 GMTTue, 27 Sep 2022 03:01:10 GMTTue, 04 Oct 2022 03:01:11 GMT0x8DAA0348811B4A5directory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:11 GMT62!384!MDAwMjQ0IVZCYjYrSnordTlTSjVQd0JHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1qRkVOalF4TUVKQ1F6VUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpkVU1ETTZNREU2TURrdU9UazJPVFV3TkZvV0FBQUEhMDAwMDI4ITIwMjItMDktMjdUMDM6MDE6MTIuMTU4MDU1Mloh", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "date": "Tue, 27 Sep 2022 03:01:11 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "d9fc970d-db09-4afa-59e2-67488a1a3c10", - "x-ms-request-id": "be9716b5-a01e-0044-1a52-d15890000000", + "x-ms-client-request-id": "a4a99895-6c61-4928-6900-ab38c0040236", + "x-ms-request-id": "3803c9fc-901e-0084-5c1d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&maxresults=1&restype=container&showonly=deleted" @@ -203,28 +203,28 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "e6d947cf-03a2-40d8-45dd-33b84985ca67", + "x-ms-client-request-id": "ee16b368-7738-415c-436f-f0c892a836d7", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "2!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh1listdeletedpaths_file_deleted133086339672719386trueMon, 26 Sep 2022 02:46:06 GMTMon, 26 Sep 2022 02:46:06 GMTMon, 03 Oct 2022 02:46:07 GMT0x8DA9F6942E67873file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:07 GMT6", + "BODY": "2!384!MDAwMjQ0IVZCYjYrSnordTlTSjVQd0JHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1qRkVOalF4TUVKQ1F6VUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpkVU1ETTZNREU2TURrdU9UazJPVFV3TkZvV0FBQUEhMDAwMDI4ITIwMjItMDktMjdUMDM6MDE6MTIuMTU4MDU1Mloh1listdeletedpaths_file_deleted133087212699969504trueTue, 27 Sep 2022 03:01:09 GMTTue, 27 Sep 2022 03:01:09 GMTTue, 04 Oct 2022 03:01:09 GMT0x8DAA03487668E60file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:09 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:09 GMT", + "date": "Tue, 27 Sep 2022 03:01:11 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "e6d947cf-03a2-40d8-45dd-33b84985ca67", - "x-ms-request-id": "be971796-a01e-0044-4952-d15890000000", + "x-ms-client-request-id": "ee16b368-7738-415c-436f-f0c892a836d7", + "x-ms-request-id": "3803ca64-901e-0084-391d-d2a0ae000000", "x-ms-version": "2021-04-10" }, - "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&marker=2!384!MDAwMjQ0IVZCYjR2YWVqcisrVHBxNEJHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1UVXlNVVk1TnpoQ09VUUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpaVU1ESTZORFk2TURjdU1qY3hPVE00TmxvV0FBQUEhMDAwMDI4ITIwMjItMDktMjZUMDI6NDY6MDkuMzI1MzU2OVoh&maxresults=1&restype=container&showonly=deleted" + "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&marker=2!384!MDAwMjQ0IVZCYjYrSnordTlTSjVQd0JHS2NCR0tFQkwzcGphR0Z1WjJSaGRHRnNZV3RsQVRBeFJEaENNRGd6TlVGR016VkdOak12SkhSeVlYTm9MMlJoZEdGc1lXdGxabWxzWlhONWMzUmxiV05zYVdWdWRIUmxjM1JzYVhOMFpHVnNaWFJsWkhCaGRHaHpBVEF4UkRoRU1qRkVOalF4TUVKQ1F6VUNMMnhwYzNSa1pXeGxkR1ZrY0dGMGFITmZabWxzWlY5a1pXeGxkR1ZrQVRJd01qSXRNRGt0TWpkVU1ETTZNREU2TURrdU9UazJPVFV3TkZvV0FBQUEhMDAwMDI4ITIwMjItMDktMjdUMDM6MDE6MTIuMTU4MDU1Mloh&maxresults=1&restype=container&showonly=deleted" }, { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "605b37e9-f77a-4c20-72ad-66b4f76acde6", + "x-ms-client-request-id": "b4b269ee-68df-4159-6b2f-dee9c01573ab", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -233,12 +233,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:09 GMT", - "etag": "\"0x8DA9F6944B11B15\"", - "last-modified": "Mon, 26 Sep 2022 02:46:09 GMT", + "date": "Tue, 27 Sep 2022 03:01:12 GMT", + "etag": "\"0x8DAA034893E6CF7\"", + "last-modified": "Tue, 27 Sep 2022 03:01:12 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "605b37e9-f77a-4c20-72ad-66b4f76acde6", - "x-ms-request-id": "efa84415-001f-002f-6252-d1df64000000", + "x-ms-client-request-id": "b4b269ee-68df-4159-6b2f-dee9c01573ab", + "x-ms-request-id": "4c4b7097-201f-0028-7f1d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -247,7 +247,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "8face8d2-62ae-4e5c-4dd9-cf74aaf0d676", + "x-ms-client-request-id": "6a1ff000-459b-4d1d-7692-e02752422968", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -256,12 +256,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:09 GMT", - "etag": "\"0x8DA9F6944E44615\"", - "last-modified": "Mon, 26 Sep 2022 02:46:10 GMT", + "date": "Tue, 27 Sep 2022 03:01:13 GMT", + "etag": "\"0x8DAA034896F65DB\"", + "last-modified": "Tue, 27 Sep 2022 03:01:13 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8face8d2-62ae-4e5c-4dd9-cf74aaf0d676", - "x-ms-request-id": "efa84458-001f-002f-2252-d1df64000000", + "x-ms-client-request-id": "6a1ff000-459b-4d1d-7692-e02752422968", + "x-ms-request-id": "4c4b70b7-201f-0028-1f1d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -270,7 +270,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "135bf5f2-9e7c-471f-6f6e-07d47a1f763c", + "x-ms-client-request-id": "46f874e5-552f-4866-564e-ad35c1f89ffb", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -279,12 +279,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:10 GMT", + "date": "Tue, 27 Sep 2022 03:01:13 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "135bf5f2-9e7c-471f-6f6e-07d47a1f763c", + "x-ms-client-request-id": "46f874e5-552f-4866-564e-ad35c1f89ffb", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339706103860", - "x-ms-request-id": "efa8449a-001f-002f-6352-d1df64000000", + "x-ms-deletion-id": "133087212735027045", + "x-ms-request-id": "4c4b70d2-201f-0028-3a1d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestlistdeletedpaths/listdeletedpaths_prefix/file" @@ -292,20 +292,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "9bae0a34-ab01-430d-6f8d-dd7537f288f8", + "x-ms-client-request-id": "fe187a16-e3e7-4992-5fd9-57cde493b940", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "listdeletedpaths_prefixlistdeletedpaths_prefix/file133086339706103860trueMon, 26 Sep 2022 02:46:10 GMTMon, 26 Sep 2022 02:46:10 GMTMon, 03 Oct 2022 02:46:10 GMT0x8DA9F6944E44615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:10 GMT6", + "BODY": "listdeletedpaths_prefixlistdeletedpaths_prefix/file133087212735027045trueTue, 27 Sep 2022 03:01:13 GMTTue, 27 Sep 2022 03:01:13 GMTTue, 04 Oct 2022 03:01:13 GMT0x8DAA034896F65DBfile0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:13 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:10 GMT", + "date": "Tue, 27 Sep 2022 03:01:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "9bae0a34-ab01-430d-6f8d-dd7537f288f8", - "x-ms-request-id": "be971be9-a01e-0044-7e52-d15890000000", + "x-ms-client-request-id": "fe187a16-e3e7-4992-5fd9-57cde493b940", + "x-ms-request-id": "3803cce8-901e-0084-031d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?comp=list&prefix=listdeletedpaths_prefix&restype=container&showonly=deleted" @@ -313,7 +313,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "dd33d50f-f5e5-4419-5d79-4b7ff37e0d33", + "x-ms-client-request-id": "449930df-a9cb-44a9-5ad9-59eb4cca1288", "x-ms-version": "2021-04-10" }, "Method": "DELETE", @@ -322,10 +322,10 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:13 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "dd33d50f-f5e5-4419-5d79-4b7ff37e0d33", - "x-ms-request-id": "be971ce1-a01e-0044-4352-d15890000000", + "x-ms-client-request-id": "449930df-a9cb-44a9-5ad9-59eb4cca1288", + "x-ms-request-id": "3803cd63-901e-0084-721d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestlistdeletedpaths?restype=container" diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json index 5c4d0f9a93..bdb126a06b 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeFileSystemClientTest.Undelete.json @@ -3,7 +3,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "3cad7b55-ff79-4bc0-4268-7c528fb19c6c", + "x-ms-client-request-id": "f268529f-3a61-4d97-7a8b-87c1bf7722d6", "x-ms-version": "2021-04-10" }, "Method": "PUT", @@ -12,12 +12,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:11 GMT", - "etag": "\"0x8DA9F6945AFD651\"", - "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:13 GMT", + "etag": "\"0x8DAA0348A4720C7\"", + "last-modified": "Tue, 27 Sep 2022 03:01:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "3cad7b55-ff79-4bc0-4268-7c528fb19c6c", - "x-ms-request-id": "be971e13-a01e-0044-4552-d15890000000", + "x-ms-client-request-id": "f268529f-3a61-4d97-7a8b-87c1bf7722d6", + "x-ms-request-id": "3803ce00-901e-0084-7b1d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?restype=container" @@ -25,7 +25,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "5cb27544-e997-4d95-711a-1d7a98da377a", + "x-ms-client-request-id": "3ca3565f-4f12-453a-449e-d412b76ecc28", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -34,12 +34,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:11 GMT", - "etag": "\"0x8DA9F6945E73C6B\"", - "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:14 GMT", + "etag": "\"0x8DAA0348A7A8ACF\"", + "last-modified": "Tue, 27 Sep 2022 03:01:14 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "5cb27544-e997-4d95-711a-1d7a98da377a", - "x-ms-request-id": "efa8456b-001f-002f-3252-d1df64000000", + "x-ms-client-request-id": "3ca3565f-4f12-453a-449e-d412b76ecc28", + "x-ms-request-id": "4c4b714d-201f-0028-331d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -48,7 +48,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "21683957-699c-4371-40a2-21512c38773c", + "x-ms-client-request-id": "80d7247b-af1e-4b67-5ae6-24dcbe1afdb8", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -57,12 +57,12 @@ "REASON_PHRASE": "Created", "STATUS_CODE": "201", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:11 GMT", - "etag": "\"0x8DA9F6946180615\"", - "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "date": "Tue, 27 Sep 2022 03:01:15 GMT", + "etag": "\"0x8DAA0348AAE3164\"", + "last-modified": "Tue, 27 Sep 2022 03:01:15 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "21683957-699c-4371-40a2-21512c38773c", - "x-ms-request-id": "efa845a2-001f-002f-6952-d1df64000000", + "x-ms-client-request-id": "80d7247b-af1e-4b67-5ae6-24dcbe1afdb8", + "x-ms-request-id": "4c4b7165-201f-0028-4b1d-d2b307000000", "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-06-08" }, @@ -71,7 +71,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "8733f350-c41f-4c22-5d1e-4c32c9e18803", + "x-ms-client-request-id": "6e0c849e-d03a-4470-7e93-230e9967aeb6", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -82,22 +82,22 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:12 GMT", - "etag": "\"0x8DA9F6945E73C6B\"", - "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:14 GMT", + "etag": "\"0x8DAA0348A7A8ACF\"", + "last-modified": "Tue, 27 Sep 2022 03:01:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "8733f350-c41f-4c22-5d1e-4c32c9e18803", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-client-request-id": "6e0c849e-d03a-4470-7e93-230e9967aeb6", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:14 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-hdi_isfolder": "true", "x-ms-owner": "$superuser", "x-ms-permissions": "rwxr-x---", - "x-ms-request-id": "be972126-a01e-0044-7152-d15890000000", + "x-ms-request-id": "3803cf55-901e-0084-1c1d-d2a0ae000000", "x-ms-resource-type": "directory", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -107,7 +107,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "71cef13d-1316-4c6f-44d0-5e0982b42421", + "x-ms-client-request-id": "c6d3db69-4932-4fbc-654b-d93773ce37ce", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -118,21 +118,21 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:12 GMT", - "etag": "\"0x8DA9F6946180615\"", - "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "date": "Tue, 27 Sep 2022 03:01:14 GMT", + "etag": "\"0x8DAA0348AAE3164\"", + "last-modified": "Tue, 27 Sep 2022 03:01:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "71cef13d-1316-4c6f-44d0-5e0982b42421", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-client-request-id": "c6d3db69-4932-4fbc-654b-d93773ce37ce", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:15 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-owner": "$superuser", "x-ms-permissions": "rw-r-----", - "x-ms-request-id": "be972234-a01e-0044-6152-d15890000000", + "x-ms-request-id": "3803cfc8-901e-0084-051d-d2a0ae000000", "x-ms-resource-type": "file", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -142,7 +142,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "8437c86a-db62-4f2d-550d-09b7da0ff15f", + "x-ms-client-request-id": "9cf7aead-77ab-44ce-5b4f-64f8425e8e07", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -151,12 +151,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:12 GMT", + "date": "Tue, 27 Sep 2022 03:01:16 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "8437c86a-db62-4f2d-550d-09b7da0ff15f", + "x-ms-client-request-id": "9cf7aead-77ab-44ce-5b4f-64f8425e8e07", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339731655099", - "x-ms-request-id": "efa84638-001f-002f-7f52-d1df64000000", + "x-ms-deletion-id": "133087212760750222", + "x-ms-request-id": "4c4b71b3-201f-0028-171d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?recursive=true" @@ -164,20 +164,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "7cb07678-579e-4ff6-776a-630c4c33d1dd", + "x-ms-client-request-id": "d96f0fc6-feb6-49b1-4a05-077bc9370ee0", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "undelete_dir133086339731655099trueMon, 26 Sep 2022 02:46:11 GMTMon, 26 Sep 2022 02:46:11 GMTMon, 03 Oct 2022 02:46:13 GMT0x8DA9F6945E73C6Bdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:13 GMT6", + "BODY": "undelete_dir133087212760750222trueTue, 27 Sep 2022 03:01:14 GMTTue, 27 Sep 2022 03:01:14 GMTTue, 04 Oct 2022 03:01:16 GMT0x8DAA0348A7A8ACFdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:16 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:13 GMT", + "date": "Tue, 27 Sep 2022 03:01:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "7cb07678-579e-4ff6-776a-630c4c33d1dd", - "x-ms-request-id": "be972595-a01e-0044-5852-d15890000000", + "x-ms-client-request-id": "d96f0fc6-feb6-49b1-4a05-077bc9370ee0", + "x-ms-request-id": "3803d1e4-901e-0084-591d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" @@ -185,7 +185,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "6a1bd4fd-0d48-4565-64b1-067fb49dbafd", + "x-ms-client-request-id": "f31e94c6-3605-4f8b-70c9-fb23b35f071a", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -194,11 +194,11 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:13 GMT", + "date": "Tue, 27 Sep 2022 03:01:16 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6a1bd4fd-0d48-4565-64b1-067fb49dbafd", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", - "x-ms-request-id": "be9726be-a01e-0044-5a52-d15890000000", + "x-ms-client-request-id": "f31e94c6-3605-4f8b-70c9-fb23b35f071a", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:14 GMT", + "x-ms-request-id": "3803d270-901e-0084-581d-d2a0ae000000", "x-ms-resource-type": "directory", "x-ms-version": "2021-06-08" }, @@ -207,7 +207,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "7d430631-477f-43bf-77da-8bd68ebd1e3c", + "x-ms-client-request-id": "a5210b6f-e947-4216-7312-c8c1e02da4ec", "x-ms-version": "2021-04-10" }, "Method": "GET", @@ -216,11 +216,11 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "date": "Tue, 27 Sep 2022 03:01:16 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "7d430631-477f-43bf-77da-8bd68ebd1e3c", - "x-ms-request-id": "be9727a9-a01e-0044-3352-d15890000000", + "x-ms-client-request-id": "a5210b6f-e947-4216-7312-c8c1e02da4ec", + "x-ms-request-id": "3803d370-901e-0084-3b1d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" @@ -228,7 +228,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "6b0a4f03-eb2a-4958-7501-63c82be232a5", + "x-ms-client-request-id": "7a2a53d1-5a47-44af-65d8-1f5c9ceb07b8", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -239,22 +239,22 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:14 GMT", - "etag": "\"0x8DA9F6945E73C6B\"", - "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:16 GMT", + "etag": "\"0x8DAA0348A7A8ACF\"", + "last-modified": "Tue, 27 Sep 2022 03:01:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "6b0a4f03-eb2a-4958-7501-63c82be232a5", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-client-request-id": "7a2a53d1-5a47-44af-65d8-1f5c9ceb07b8", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:14 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-hdi_isfolder": "true", "x-ms-owner": "$superuser", "x-ms-permissions": "rwxr-x---", - "x-ms-request-id": "be97286f-a01e-0044-6252-d15890000000", + "x-ms-request-id": "3803d427-901e-0084-6b1d-d2a0ae000000", "x-ms-resource-type": "directory", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -264,7 +264,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "e1689ab3-4c7d-4be1-4efe-6c04a8c189b1", + "x-ms-client-request-id": "6db9b566-c773-4f1c-623d-658776e8072e", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -275,21 +275,21 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:14 GMT", - "etag": "\"0x8DA9F6946180615\"", - "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "date": "Tue, 27 Sep 2022 03:01:17 GMT", + "etag": "\"0x8DAA0348AAE3164\"", + "last-modified": "Tue, 27 Sep 2022 03:01:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "e1689ab3-4c7d-4be1-4efe-6c04a8c189b1", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-client-request-id": "6db9b566-c773-4f1c-623d-658776e8072e", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:15 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-owner": "$superuser", "x-ms-permissions": "rw-r-----", - "x-ms-request-id": "be972904-a01e-0044-6352-d15890000000", + "x-ms-request-id": "3803d4c8-901e-0084-7d1d-d2a0ae000000", "x-ms-resource-type": "file", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -299,7 +299,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "fb78185e-df29-4510-6b27-b1d6b0a15f86", + "x-ms-client-request-id": "21dc66de-ddfe-448b-47ed-b27f94e8c077", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -308,12 +308,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:14 GMT", + "date": "Tue, 27 Sep 2022 03:01:18 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "fb78185e-df29-4510-6b27-b1d6b0a15f86", + "x-ms-client-request-id": "21dc66de-ddfe-448b-47ed-b27f94e8c077", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339751508187", - "x-ms-request-id": "efa8475f-001f-002f-0752-d1df64000000", + "x-ms-deletion-id": "133087212781678638", + "x-ms-request-id": "4c4b727f-201f-0028-5e1d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" @@ -321,7 +321,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "391fd26f-103b-4f27-4491-a77c0bbbf22e", + "x-ms-client-request-id": "37df0b10-09dd-4cd4-5a36-b96ba299910a", "x-ms-version": "2021-06-08" }, "Method": "DELETE", @@ -330,12 +330,12 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:15 GMT", + "date": "Tue, 27 Sep 2022 03:01:18 GMT", "server": "Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "391fd26f-103b-4f27-4491-a77c0bbbf22e", + "x-ms-client-request-id": "37df0b10-09dd-4cd4-5a36-b96ba299910a", "x-ms-delete-type-permanent": "false", - "x-ms-deletion-id": "133086339755164192", - "x-ms-request-id": "efa84775-001f-002f-1d52-d1df64000000", + "x-ms-deletion-id": "133087212785510990", + "x-ms-request-id": "4c4b72b1-201f-0028-101d-d2b307000000", "x-ms-version": "2021-06-08" }, "Url": "https://REDACTED.dfs.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir?recursive=false" @@ -343,20 +343,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "1b6224da-559c-4c02-76f2-e6de847c0fa2", + "x-ms-client-request-id": "2a834864-f79e-4b1a-6f9d-6e0d97aa73d2", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "undelete_dir133086339755164192trueMon, 26 Sep 2022 02:46:11 GMTMon, 26 Sep 2022 02:46:11 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6945E73C6Bdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6undelete_dir/sub_file133086339751508187trueMon, 26 Sep 2022 02:46:12 GMTMon, 26 Sep 2022 02:46:12 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6946180615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6", + "BODY": "undelete_dir133087212785510990trueTue, 27 Sep 2022 03:01:14 GMTTue, 27 Sep 2022 03:01:14 GMTTue, 04 Oct 2022 03:01:18 GMT0x8DAA0348A7A8ACFdirectory0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:18 GMT6undelete_dir/sub_file133087212781678638trueTue, 27 Sep 2022 03:01:15 GMTTue, 27 Sep 2022 03:01:15 GMTTue, 04 Oct 2022 03:01:18 GMT0x8DAA0348AAE3164file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:18 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:15 GMT", + "date": "Tue, 27 Sep 2022 03:01:18 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "1b6224da-559c-4c02-76f2-e6de847c0fa2", - "x-ms-request-id": "be972ba0-a01e-0044-3952-d15890000000", + "x-ms-client-request-id": "2a834864-f79e-4b1a-6f9d-6e0d97aa73d2", + "x-ms-request-id": "3803d788-901e-0084-101d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" @@ -364,7 +364,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "01e99efb-5042-460e-45b0-1f09fd816f85", + "x-ms-client-request-id": "e4026214-e9d2-4954-7e54-e044c02c50f4", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -373,11 +373,11 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:16 GMT", + "date": "Tue, 27 Sep 2022 03:01:18 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "01e99efb-5042-460e-45b0-1f09fd816f85", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", - "x-ms-request-id": "be972c47-a01e-0044-5452-d15890000000", + "x-ms-client-request-id": "e4026214-e9d2-4954-7e54-e044c02c50f4", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:14 GMT", + "x-ms-request-id": "3803d86d-901e-0084-671d-d2a0ae000000", "x-ms-resource-type": "directory", "x-ms-version": "2021-06-08" }, @@ -386,20 +386,20 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "a916660c-1ea8-4196-7aab-cd5c8b1a692b", + "x-ms-client-request-id": "1e70a5c5-5183-432f-7e26-4f833541d032", "x-ms-version": "2021-04-10" }, "Method": "GET", "Response": { - "BODY": "undelete_dir/sub_file133086339751508187trueMon, 26 Sep 2022 02:46:12 GMTMon, 26 Sep 2022 02:46:12 GMTMon, 03 Oct 2022 02:46:15 GMT0x8DA9F6946180615file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueMon, 26 Sep 2022 02:46:15 GMT6", + "BODY": "undelete_dir/sub_file133087212781678638trueTue, 27 Sep 2022 03:01:15 GMTTue, 27 Sep 2022 03:01:15 GMTTue, 04 Oct 2022 03:01:18 GMT0x8DAA0348AAE3164file0application/octet-streamAAAAAAAAAAA=BlockBlobHottruetrueTue, 27 Sep 2022 03:01:18 GMT6", "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:16 GMT", + "date": "Tue, 27 Sep 2022 03:01:18 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "a916660c-1ea8-4196-7aab-cd5c8b1a692b", - "x-ms-request-id": "be972d31-a01e-0044-2652-d15890000000", + "x-ms-client-request-id": "1e70a5c5-5183-432f-7e26-4f833541d032", + "x-ms-request-id": "3803d921-901e-0084-0d1d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" @@ -407,7 +407,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "6878aea9-1d3b-499f-63ae-5fd9cd7f7671", + "x-ms-client-request-id": "012ef39d-9e4b-418e-7d34-0a6ec5334788", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -418,22 +418,22 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:16 GMT", - "etag": "\"0x8DA9F6945E73C6B\"", - "last-modified": "Mon, 26 Sep 2022 02:46:11 GMT", + "date": "Tue, 27 Sep 2022 03:01:19 GMT", + "etag": "\"0x8DAA0348A7A8ACF\"", + "last-modified": "Tue, 27 Sep 2022 03:01:14 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "6878aea9-1d3b-499f-63ae-5fd9cd7f7671", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:11 GMT", + "x-ms-client-request-id": "012ef39d-9e4b-418e-7d34-0a6ec5334788", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:14 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-meta-hdi_isfolder": "true", "x-ms-owner": "$superuser", "x-ms-permissions": "rwxr-x---", - "x-ms-request-id": "be972de8-a01e-0044-4d52-d15890000000", + "x-ms-request-id": "3803d9c6-901e-0084-281d-d2a0ae000000", "x-ms-resource-type": "directory", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -443,7 +443,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "4b88d4c2-bdde-43a5-54f7-8c707838740b", + "x-ms-client-request-id": "061ab627-ac84-4754-78d7-b4e2b7d11f70", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -451,12 +451,12 @@ "BODY": "", "REASON_PHRASE": "The specified blob does not exist.", "STATUS_CODE": "404", - "date": "Mon, 26 Sep 2022 02:46:17 GMT", + "date": "Tue, 27 Sep 2022 03:01:19 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "4b88d4c2-bdde-43a5-54f7-8c707838740b", + "x-ms-client-request-id": "061ab627-ac84-4754-78d7-b4e2b7d11f70", "x-ms-error-code": "BlobNotFound", - "x-ms-request-id": "be972e8d-a01e-0044-5f52-d15890000000", + "x-ms-request-id": "3803da20-901e-0084-7c1d-d2a0ae000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete/undelete_dir/sub_file" @@ -464,7 +464,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "c13433c2-8de7-4780-5ed2-494949f17448", + "x-ms-client-request-id": "8655ee98-73bc-4597-63af-a1f5548ac3f9", "x-ms-version": "2021-06-08" }, "Method": "PUT", @@ -473,11 +473,11 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:18 GMT", + "date": "Tue, 27 Sep 2022 03:01:21 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "c13433c2-8de7-4780-5ed2-494949f17448", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", - "x-ms-request-id": "dbe8cfcf-501e-001d-6252-d1df13000000", + "x-ms-client-request-id": "8655ee98-73bc-4597-63af-a1f5548ac3f9", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:15 GMT", + "x-ms-request-id": "03af34b7-601e-0080-121d-d22da9000000", "x-ms-resource-type": "file", "x-ms-version": "2021-06-08" }, @@ -486,7 +486,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-files-datalake/12.4.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "893a7d50-e15e-4ee7-5dcd-e1fa0171de99", + "x-ms-client-request-id": "f8ccabc0-3e10-499c-4c2c-bce7860b0aae", "x-ms-version": "2021-04-10" }, "Method": "GET", @@ -495,11 +495,11 @@ "REASON_PHRASE": "OK", "STATUS_CODE": "200", "content-type": "application/xml", - "date": "Mon, 26 Sep 2022 02:46:18 GMT", + "date": "Tue, 27 Sep 2022 03:01:21 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "893a7d50-e15e-4ee7-5dcd-e1fa0171de99", - "x-ms-request-id": "dbe8d163-501e-001d-5652-d1df13000000", + "x-ms-client-request-id": "f8ccabc0-3e10-499c-4c2c-bce7860b0aae", + "x-ms-request-id": "03af374d-601e-0080-691d-d22da9000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?comp=list&restype=container&showonly=deleted" @@ -507,7 +507,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "73c87d75-1266-4ac5-74a5-e9f367b4871f", + "x-ms-client-request-id": "5455eddc-71a6-4548-4a9a-519a0e0f0723", "x-ms-version": "2021-04-10" }, "Method": "HEAD", @@ -518,21 +518,21 @@ "accept-ranges": "bytes", "content-length": "0", "content-type": "application/octet-stream", - "date": "Mon, 26 Sep 2022 02:46:19 GMT", - "etag": "\"0x8DA9F6946180615\"", - "last-modified": "Mon, 26 Sep 2022 02:46:12 GMT", + "date": "Tue, 27 Sep 2022 03:01:21 GMT", + "etag": "\"0x8DAA0348AAE3164\"", + "last-modified": "Tue, 27 Sep 2022 03:01:15 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-access-tier": "Hot", "x-ms-access-tier-inferred": "true", "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "73c87d75-1266-4ac5-74a5-e9f367b4871f", - "x-ms-creation-time": "Mon, 26 Sep 2022 02:46:12 GMT", + "x-ms-client-request-id": "5455eddc-71a6-4548-4a9a-519a0e0f0723", + "x-ms-creation-time": "Tue, 27 Sep 2022 03:01:15 GMT", "x-ms-group": "$superuser", "x-ms-lease-state": "available", "x-ms-lease-status": "unlocked", "x-ms-owner": "$superuser", "x-ms-permissions": "rw-r-----", - "x-ms-request-id": "dbe8d284-501e-001d-5952-d1df13000000", + "x-ms-request-id": "03af3852-601e-0080-451d-d22da9000000", "x-ms-resource-type": "file", "x-ms-server-encrypted": "true", "x-ms-version": "2021-04-10" @@ -542,7 +542,7 @@ { "Headers": { "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", - "x-ms-client-request-id": "e2656417-78d2-489f-4905-57332b9a21e8", + "x-ms-client-request-id": "77c75e1a-136c-4119-7de7-70a21e03e300", "x-ms-version": "2021-04-10" }, "Method": "DELETE", @@ -551,10 +551,10 @@ "REASON_PHRASE": "Accepted", "STATUS_CODE": "202", "content-length": "0", - "date": "Mon, 26 Sep 2022 02:46:19 GMT", + "date": "Tue, 27 Sep 2022 03:01:22 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e2656417-78d2-489f-4905-57332b9a21e8", - "x-ms-request-id": "dbe8d365-501e-001d-2852-d1df13000000", + "x-ms-client-request-id": "77c75e1a-136c-4119-7de7-70a21e03e300", + "x-ms-request-id": "03af390f-601e-0080-691d-d22da9000000", "x-ms-version": "2021-04-10" }, "Url": "https://REDACTED.blob.core.windows.net/datalakefilesystemclienttestundelete?restype=container" diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.GetProperties.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.GetProperties.json new file mode 100644 index 0000000000..fd3652f422 --- /dev/null +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.GetProperties.json @@ -0,0 +1,25 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "4ab022bd-238e-47ef-6d84-52a8364d6bf5", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsetrue7falsefalse2021-06-08", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Tue, 27 Sep 2022 03:01:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "4ab022bd-238e-47ef-6d84-52a8364d6bf5", + "x-ms-request-id": "03af39bd-601e-0080-031d-d22da9000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" + } + ] +} diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.SetProperties.json b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.SetProperties.json new file mode 100644 index 0000000000..2b273d75e3 --- /dev/null +++ b/sdk/storage/azure-storage-files-datalake/test/ut/recordings/DataLakeServiceClientTest.SetProperties.json @@ -0,0 +1,88 @@ +{ + "networkCallRecords": [ + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "c78bf5fa-f301-4939-6993-61a1345f6318", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsetrue7falsefalse2021-06-08", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Tue, 27 Sep 2022 03:01:22 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "c78bf5fa-f301-4939-6993-61a1345f6318", + "x-ms-request-id": "03af3a6a-601e-0080-161d-d22da9000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "37898e72-ed62-4cb8-63d8-1f2efd991379", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Tue, 27 Sep 2022 03:01:23 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "37898e72-ed62-4cb8-63d8-1f2efd991379", + "x-ms-request-id": "03af3b21-601e-0080-331d-d22da9000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" + }, + { + "Headers": { + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "90d05d28-d31a-4083-5684-5a9a119077ef", + "x-ms-version": "2021-04-10" + }, + "Method": "GET", + "Response": { + "BODY": "1.0truetruetruetrue31.0truetruetrue41.0truetruetrue4GET,PUThttp://www.example1.comx-ms-header1,x-ms-header2x-ms-header310DELETEhttp://www.example2.comx-ms-header1x-ms-header2,x-ms-header320true7falsetrueindex.html404.html2021-06-08", + "REASON_PHRASE": "OK", + "STATUS_CODE": "200", + "content-type": "application/xml", + "date": "Tue, 27 Sep 2022 03:01:33 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "90d05d28-d31a-4083-5684-5a9a119077ef", + "x-ms-request-id": "03af5887-601e-0080-551d-d22da9000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" + }, + { + "Headers": { + "content-type": "application/xml; charset=UTF-8", + "user-agent": "azsdk-cpp-storage-blobs/12.7.0-beta.1 (Windows 10 Enterprise 6.3 22000 22000.1.amd64fre.co_release.210604-1628)", + "x-ms-client-request-id": "efa1718f-4308-489a-6e79-306563b7d7c4", + "x-ms-version": "2021-04-10" + }, + "Method": "PUT", + "Response": { + "BODY": "", + "REASON_PHRASE": "Accepted", + "STATUS_CODE": "202", + "content-length": "0", + "date": "Tue, 27 Sep 2022 03:01:34 GMT", + "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", + "x-ms-client-request-id": "efa1718f-4308-489a-6e79-306563b7d7c4", + "x-ms-request-id": "03af5926-601e-0080-6b1d-d22da9000000", + "x-ms-version": "2021-04-10" + }, + "Url": "https://REDACTED.blob.core.windows.net?comp=properties&restype=service" + } + ] +} From 6dc2a4af242563feabb35a4da3dc79fbac00bd4c Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Tue, 27 Sep 2022 11:08:28 +0800 Subject: [PATCH 4/7] update comment --- .../storage/files/datalake/datalake_service_client.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp index 02737b49f9..1cb927ff3f 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_service_client.hpp @@ -113,9 +113,9 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { * @brief Sets properties for a storage account's Blob service endpoint, including * properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete * settings. You can also use this operation to set the default request version for all incoming - * requests to the Blob service that do not have a version specified. + * requests to the DataLake service that do not have a version specified. * - * @param properties The blob service properties. + * @param properties The DataLake service properties. * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. * @return A SetServicePropertiesResult on successfully setting the properties. @@ -129,12 +129,12 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { } /** - * @brief Gets the properties of a storage account's blob service, including properties + * @brief Gets the properties of a storage account's datalake service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @param options Optional parameters to execute this function. * @param context Context for cancelling long running operations. - * @return A BlobServiceProperties describing the service properties. + * @return A DataLakeServiceProperties describing the service properties. */ Azure::Response GetProperties( const GetServicePropertiesOptions& options = GetServicePropertiesOptions(), From 948fb85920884ab368c9bf52796cffa5973655a4 Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Tue, 27 Sep 2022 13:20:24 +0800 Subject: [PATCH 5/7] add deleteRetentionPolicy --- sdk/storage/test-resources.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/storage/test-resources.json b/sdk/storage/test-resources.json index b785415ec2..1e4c36bb03 100644 --- a/sdk/storage/test-resources.json +++ b/sdk/storage/test-resources.json @@ -207,6 +207,10 @@ "kind": "StorageV2", "properties": { "isHnsEnabled": true, + "deleteRetentionPolicy": { + "enabled": true, + "days": 7 + }, "cors": { "corsRules": [ { From ad3ccbbebb0debf40498f1f454f267ac9fddbb4f Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Tue, 27 Sep 2022 13:22:53 +0800 Subject: [PATCH 6/7] fix conversation --- .../inc/azure/storage/files/datalake/datalake_responses.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp index aac2c78112..01af149eb7 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_responses.hpp @@ -474,7 +474,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * The number of days left before the soft deleted path will be permanently deleted. */ - int64_t RemainingRetentionDays; + int64_t RemainingRetentionDays = int64_t(); }; // FileClient models: From 166ffc7dd3c012ac4056779419c733892ab71d84 Mon Sep 17 00:00:00 2001 From: Zhendong Chang Date: Thu, 29 Sep 2022 12:19:39 +0800 Subject: [PATCH 7/7] disable soft delete test --- .../test/ut/datalake_file_system_client_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp index e42bd5d39d..1f53a4b79a 100644 --- a/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/ut/datalake_file_system_client_test.cpp @@ -821,7 +821,7 @@ namespace Azure { namespace Storage { namespace Test { m_fileSystemClient->GetDirectoryClient(destinationDirectoryName).GetProperties()); } - TEST_F(DataLakeFileSystemClientTest, ListDeletedPaths) + TEST_F(DataLakeFileSystemClientTest, DISABLED_ListDeletedPaths) { const std::string deletedFilename = GetTestNameLowerCase() + "_file_deleted"; const std::string nonDeletedFilename = GetTestNameLowerCase() + "_file"; @@ -882,7 +882,7 @@ namespace Azure { namespace Storage { namespace Test { } } - TEST_F(DataLakeFileSystemClientTest, Undelete) + TEST_F(DataLakeFileSystemClientTest, DISABLED_Undelete) { const std::string directoryName = GetTestNameLowerCase() + "_dir"; const std::string subFileName = "sub_file";