diff --git a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md index c4f180328..0b280d6e4 100644 --- a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md @@ -2,6 +2,9 @@ ## 12.0.0-beta.7 (Unreleased) +### Breaking Changes + +- Removed `GetDfsUri` in all clients since they are currently implementation details. ## 12.0.0-beta.6 (2020-01-14) diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp index 3377ad135..5c2f70d74 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_directory_client.hpp @@ -88,14 +88,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ std::string GetUri() const { return m_blobClient.GetUrl(); } - /** - * @brief Gets the directory's primary uri endpoint. This is the endpoint used for dfs - * endpoint only operations - * - * @return The directory's primary uri endpoint. - */ - std::string GetDfsUri() const { return m_dfsUri.GetAbsoluteUrl(); } - /** * @brief Create a directory. By default, the destination is overwritten and * if the destination already exists and has a lease the lease is broken. diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp index d11dd93dd..1ee48a522 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp @@ -75,14 +75,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ std::string GetUri() const { return m_blockBlobClient.GetUrl(); } - /** - * @brief Gets the file's primary uri endpoint. This is the endpoint used for dfs - * endpoint only operations - * - * @return The file's primary uri endpoint. - */ - std::string GetDfsUri() const { return m_dfsUri.GetAbsoluteUrl(); } - /** * @brief Uploads data to be appended to a file. Data can only be appended to a file. * @param content The data to be appended. 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 91f12a5f8..b178ec14c 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 @@ -97,14 +97,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ std::string GetUri() const { return m_blobContainerClient.GetUrl(); } - /** - * @brief Gets the filesystem's primary uri endpoint. This is the endpoint used for dfs - * endpoint only operations - * - * @return The filesystem's primary uri endpoint. - */ - std::string GetDfsUri() const { return m_dfsUri.GetAbsoluteUrl(); } - /** * @brief Creates the file system. * @param options Optional parameters to create this file system. diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp index 04946cb05..433528b27 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_path_client.hpp @@ -76,14 +76,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ std::string GetUri() const { return m_blobClient.GetUrl(); } - /** - * @brief Gets the path's primary uri endpoint. This is the endpoint used for dfs - * endpoint only operations - * - * @return The path's primary uri endpoint. - */ - std::string GetDfsUri() const { return m_dfsUri.GetAbsoluteUrl(); } - /** * @brief Creates a file or directory. By default, the destination is overwritten and * if the destination already exists and has a lease the lease is broken. 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 a92297bb4..06d93f4b5 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 @@ -78,14 +78,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { */ std::string GetUri() const { return m_blobServiceClient.GetUrl(); } - /** - * @brief Gets the datalake service's primary uri endpoint. This is the endpoint used for dfs - * endpoint only operations - * - * @return The datalake service's primary uri endpoint. - */ - std::string GetDfsUri() const { return m_dfsUri.GetAbsoluteUrl(); } - /** * @brief List the file systems from the service. * @param options Optional parameters to list the file systems. diff --git a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp index 2d1f22e75..f6dbe7c51 100644 --- a/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp +++ b/sdk/storage/azure-storage-files-datalake/test/datalake_sas_test.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "datalake_file_system_client_test.hpp" @@ -51,10 +52,10 @@ namespace Azure { namespace Storage { namespace Test { directory1Client0.Create(); directory2Client0.Create(); - auto serviceUri = serviceClient0.GetDfsUri(); - auto filesystemUri = filesystemClient0.GetDfsUri(); - auto directory1Uri = directory1Client0.GetDfsUri(); - auto directory2Uri = directory2Client0.GetDfsUri(); + auto serviceUri = Files::DataLake::Details::GetDfsUriFromUri(serviceClient0.GetUri()); + auto filesystemUri = Files::DataLake::Details::GetDfsUriFromUri(filesystemClient0.GetUri()); + auto directory1Uri = Files::DataLake::Details::GetDfsUriFromUri(directory1Client0.GetUri()); + auto directory2Uri = Files::DataLake::Details::GetDfsUriFromUri(directory2Client0.GetUri()); auto fileUri = fileClient0.GetUri(); auto serviceClient1 = Files::DataLake::DataLakeServiceClient( @@ -123,7 +124,8 @@ namespace Azure { namespace Storage { namespace Test { std::string newFilename = RandomString(); auto newFileClient0 = directory2Client0.GetFileClient(newFilename); newFileClient0.Create(); - auto fileClient = Files::DataLake::DataLakeFileClient(newFileClient0.GetDfsUri() + sas); + auto fileClient = Files::DataLake::DataLakeFileClient( + Files::DataLake::Details::GetDfsUriFromUri(newFileClient0.GetUri()) + sas); EXPECT_NO_THROW(fileClient.Rename(directory1Name + "/" + directory2Name + "/" + fileName)); };