diff options
author | Casey Bodley <cbodley@redhat.com> | 2023-11-19 19:07:20 +0100 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2024-04-10 19:09:14 +0200 |
commit | b56fc946eac20d982cd0743305a630948d5b12d6 (patch) | |
tree | 304404e93edce32d8968bd746771f5ca7cbec756 /src/cls/user/cls_user_client.h | |
parent | cmake: move WITH_RADOSGW checks up to test/CMakeLists.txt (diff) | |
download | ceph-b56fc946eac20d982cd0743305a630948d5b12d6.tar.xz ceph-b56fc946eac20d982cd0743305a630948d5b12d6.zip |
cls/user: add interfaces to index user account resources
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/cls/user/cls_user_client.h')
-rw-r--r-- | src/cls/user/cls_user_client.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/cls/user/cls_user_client.h b/src/cls/user/cls_user_client.h index 03d975c59cb..a1120f86400 100644 --- a/src/cls/user/cls_user_client.h +++ b/src/cls/user/cls_user_client.h @@ -33,4 +33,31 @@ void cls_user_get_header(librados::ObjectReadOperation& op, cls_user_header *hea int cls_user_get_header_async(librados::IoCtx& io_ctx, std::string& oid, RGWGetUserHeader_CB *ctx); void cls_user_reset_stats(librados::ObjectWriteOperation& op); +// Account resources + +/// Add or overwrite an entry to the account's list of resources. Returns +/// -EUSERS (Too many users) if the resource count would exceed the given limit. +void cls_user_account_resource_add(librados::ObjectWriteOperation& op, + const cls_user_account_resource& entry, + bool exclusive, uint32_t limit); + +/// Look up an account resource by case-insensitive name. +void cls_user_account_resource_get(librados::ObjectReadOperation& op, + std::string_view name, + cls_user_account_resource& entry, + int* pret); + +/// Remove an account resources by case-insensitive name. +void cls_user_account_resource_rm(librados::ObjectWriteOperation& op, + std::string_view name); + +/// List the resources linked to an account. +void cls_user_account_resource_list(librados::ObjectReadOperation& op, + std::string_view marker, + std::string_view path_prefix, + uint32_t max_entries, + std::vector<cls_user_account_resource>& entries, + bool* truncated, std::string* next_marker, + int* pret); + #endif |