new field IsHnsEnabled in AccountInfo (#1068)
This commit is contained in:
parent
72a6ea98a9
commit
222967cc89
@ -5,6 +5,7 @@
|
||||
### New Features
|
||||
|
||||
* `CreateIfNotExists` and `DeleteIfExists` for blob containers and blobs.
|
||||
* Add `IsHierarchicalNamespaceEnabled` in `GetAccountInfoResult`.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
||||
@ -683,6 +683,7 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
{
|
||||
Blobs::Models::SkuName SkuName = Blobs::Models::SkuName::Unknown;
|
||||
Blobs::Models::AccountKind AccountKind = Blobs::Models::AccountKind::Unknown;
|
||||
bool IsHierarchicalNamespaceEnabled = false;
|
||||
}; // struct GetAccountInfoResult
|
||||
|
||||
struct GetBlobContainerAccessPolicyResult
|
||||
@ -1946,6 +1947,8 @@ namespace Azure { namespace Storage { namespace Blobs {
|
||||
response.SkuName = SkuNameFromString(httpResponse.GetHeaders().at("x-ms-sku-name"));
|
||||
response.AccountKind
|
||||
= AccountKindFromString(httpResponse.GetHeaders().at("x-ms-account-kind"));
|
||||
response.IsHierarchicalNamespaceEnabled
|
||||
= httpResponse.GetHeaders().at("x-ms-is-hns-enabled") == "true";
|
||||
return Azure::Core::Response<GetAccountInfoResult>(
|
||||
std::move(response), std::move(pHttpResponse));
|
||||
}
|
||||
|
||||
@ -319,6 +319,12 @@ namespace Azure { namespace Storage { namespace Test {
|
||||
auto accountInfo = *m_blobServiceClient.GetAccountInfo();
|
||||
EXPECT_NE(accountInfo.SkuName, Blobs::Models::SkuName::Unknown);
|
||||
EXPECT_NE(accountInfo.AccountKind, Blobs::Models::AccountKind::Unknown);
|
||||
EXPECT_FALSE(accountInfo.IsHierarchicalNamespaceEnabled);
|
||||
|
||||
auto dataLakeServiceClient
|
||||
= Blobs::BlobServiceClient::CreateFromConnectionString(AdlsGen2ConnectionString());
|
||||
accountInfo = *dataLakeServiceClient.GetAccountInfo();
|
||||
EXPECT_TRUE(accountInfo.IsHierarchicalNamespaceEnabled);
|
||||
}
|
||||
|
||||
TEST_F(BlobServiceClientTest, Statistics)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user