Skip to content

Commit

Permalink
Storage/STG94 features (#5667)
Browse files Browse the repository at this point in the history
* update to stable (#5541)

* Storage/ Merge main to unblock pipeline failure (#5561)

* Sync eng/common directory with azure-sdk-tools for PR 8110 (#5540)

* Show review link in logs and set DevOps project name based on the pipeline run

* Handle the failures when package work item is unassigned (#5551)

Co-authored-by: Praveen Kuttappan <prmarott@microsoft.com>

* Revert win2022 image back to latest and add msvc version mitigation (#5539)

* Revert win2022 image back to latest
* Workaround fix for MSVC SxS issue

* Fix Policheck step indention (#5553)

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Sync .github/workflows directory with azure-sdk-tools for PR 8131 (#5555)

* Update to azure/login@v2

* Remove the unnecessary setting of enable-AzPSSession. We don't need it.

---------

Co-authored-by: James Suplizio <jasupliz@microsoft.com>

* Update sorting algorithm used in storage shared-key signing (#5547)

* Remove Windows upgrade of cmake (windows image now uses working version of cmake) (#5558)

* Revert "Update sorting algorithm used in storage shared-key signing (#5547)" (#5560)

This reverts commit b6e04fd.

---------

Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Praveen Kuttappan <prmarott@microsoft.com>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
Co-authored-by: JinmingHu <jinmhu@microsoft.com>

* Storage/STG94 Snapshot management support via REST for NFS shares (#5543)

* add nfs support (#5267)

* add test recordinhg

* Storage/STG94 GetAccountInfo() for container and blob (#5550)

* add getaccountinfo

* update record

* Storage/STG94 Add Queues bearer challenge test case (#5556)

* Add test for queue bearer challenge

* update test case

* update var name

* update test case

* fix clang format

* Update sorting algorithm used in storage shared-key signing (#5611)

* Storage/Stg94 Support for authorization ExtendedErrorDetail (#5633)

* Support for authorization ExtendedErrorDetail

* fix clang format

* fix build error

* make tests live only

* Update change log

* remove additional changes

* update changelog

* update error detail liveonly

* Update live test

---------

Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Praveen Kuttappan <prmarott@microsoft.com>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
Co-authored-by: JinmingHu <jinmhu@microsoft.com>
  • Loading branch information
7 people authored May 28, 2024
1 parent 72e8b78 commit ffbf094
Show file tree
Hide file tree
Showing 40 changed files with 927 additions and 233 deletions.
2 changes: 1 addition & 1 deletion sdk/storage/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "cpp",
"TagPrefix": "cpp/storage",
"Tag": "cpp/storage_fc81ec148a"
"Tag": "cpp/storage_604485c00a"
}
8 changes: 3 additions & 5 deletions sdk/storage/azure-storage-blobs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Bumped up API version to `2024-08-04`.
- Added `BlobContainerClient::GetAccountInfo()` and `BlobClient::GetAccountInfo` APIs.
- Added more detailed messaging for authorization failure cases.

## 12.11.0 (2024-05-07)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,17 @@ namespace Azure { namespace Storage { namespace Blobs {
const SetBlobLegalHoldOptions& options = SetBlobLegalHoldOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

/**
* @brief Returns the sku name and account kind for the specified account.
*
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return AccountInfo describing the account.
*/
Azure::Response<Models::AccountInfo> GetAccountInfo(
const GetAccountInfoOptions& options = GetAccountInfoOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

protected:
/** @brief Blob Url */
Azure::Core::Url m_blobUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,17 @@ namespace Azure { namespace Storage { namespace Blobs {
const SubmitBlobBatchOptions& options = SubmitBlobBatchOptions(),
const Core::Context& context = Core::Context()) const;

/**
* @brief Returns the sku name and account kind for the specified account.
*
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return AccountInfo describing the account.
*/
Azure::Response<Models::AccountInfo> GetAccountInfo(
const GetAccountInfoOptions& options = GetAccountInfoOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

private:
Azure::Core::Url m_blobContainerUrl;
std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> m_pipeline;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Azure { namespace Storage { namespace Blobs {
/**
* The version used for the operations to Azure storage services.
*/
constexpr static const char* ApiVersion = "2023-11-03";
constexpr static const char* ApiVersion = "2024-08-04";
} // namespace _detail
namespace Models {
/**
Expand Down Expand Up @@ -655,25 +655,6 @@ namespace Azure { namespace Storage { namespace Blobs {
private:
std::string m_value;
};
/**
* @brief Response type for #Azure::Storage::Blobs::BlobServiceClient::GetAccountInfo.
*/
struct AccountInfo final
{
/**
* Identifies the sku name of the account.
*/
Models::SkuName SkuName;
/**
* Identifies the account kind.
*/
Models::AccountKind AccountKind;
/**
* Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace
* enabled.
*/
bool IsHierarchicalNamespaceEnabled = bool();
};
/**
* @brief Blob info from a Filter Blobs API call.
*/
Expand Down Expand Up @@ -2400,6 +2381,25 @@ namespace Azure { namespace Storage { namespace Blobs {
struct SetBlobAccessTierResult final
{
};
/**
* @brief Response type for #Azure::Storage::Blobs::BlobServiceClient::GetAccountInfo.
*/
struct AccountInfo final
{
/**
* Identifies the sku name of the account.
*/
Models::SkuName SkuName;
/**
* Identifies the account kind.
*/
Models::AccountKind AccountKind;
/**
* Version 2019-07-07 and newer. Indicates if the account has a hierarchical namespace
* enabled.
*/
bool IsHierarchicalNamespaceEnabled = bool();
};
namespace _detail {
/**
* @brief Required. The type of the provided query expression.
Expand Down Expand Up @@ -3664,6 +3664,14 @@ namespace Azure { namespace Storage { namespace Blobs {
const Core::Url& url,
const ListBlobContainerBlobsByHierarchyOptions& options,
const Core::Context& context);
struct GetBlobContainerAccountInfoOptions final
{
};
static Response<Models::AccountInfo> GetAccountInfo(
Core::Http::_internal::HttpPipeline& pipeline,
const Core::Url& url,
const GetBlobContainerAccountInfoOptions& options,
const Core::Context& context);
};
class BlobClient final {
public:
Expand Down Expand Up @@ -3986,6 +3994,14 @@ namespace Azure { namespace Storage { namespace Blobs {
const Core::Url& url,
const SetBlobTierOptions& options,
const Core::Context& context);
struct GetBlobAccountInfoOptions final
{
};
static Response<Models::AccountInfo> GetAccountInfo(
Core::Http::_internal::HttpPipeline& pipeline,
const Core::Url& url,
const GetBlobAccountInfoOptions& options,
const Core::Context& context);
struct QueryBlobOptions final
{
Models::_detail::QueryRequest QueryRequest;
Expand Down
10 changes: 10 additions & 0 deletions sdk/storage/azure-storage-blobs/src/blob_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,4 +896,14 @@ namespace Azure { namespace Storage { namespace Blobs {
return _detail::BlobClient::SetLegalHold(*m_pipeline, m_blobUrl, protocolLayerOptions, context);
}

Azure::Response<Models::AccountInfo> BlobClient::GetAccountInfo(
const GetAccountInfoOptions& options,
const Azure::Core::Context& context) const
{
(void)options;
_detail::BlobClient::GetBlobAccountInfoOptions protocolLayerOptions;
return _detail::BlobClient::GetAccountInfo(
*m_pipeline, m_blobUrl, protocolLayerOptions, _internal::WithReplicaStatus(context));
}

}}} // namespace Azure::Storage::Blobs
13 changes: 13 additions & 0 deletions sdk/storage/azure-storage-blobs/src/blob_container_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,4 +516,17 @@ namespace Azure { namespace Storage { namespace Blobs {
return Azure::Response<Models::SubmitBlobBatchResult>(
Models::SubmitBlobBatchResult(), std::move(response.RawResponse));
}

Azure::Response<Models::AccountInfo> BlobContainerClient::GetAccountInfo(
const GetAccountInfoOptions& options,
const Azure::Core::Context& context) const
{
(void)options;
_detail::BlobContainerClient::GetBlobContainerAccountInfoOptions protocolLayerOptions;
return _detail::BlobContainerClient::GetAccountInfo(
*m_pipeline,
m_blobContainerUrl,
protocolLayerOptions,
_internal::WithReplicaStatus(context));
}
}}} // namespace Azure::Storage::Blobs
Loading

0 comments on commit ffbf094

Please sign in to comment.