From e03e7b2cdc242cd386446b80d5c1d9271868fff5 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 23 Jan 2024 09:47:58 -0500 Subject: [PATCH] rgw/sal: remove load_account_role_by_name() Signed-off-by: Casey Bodley --- src/rgw/driver/rados/rgw_sal_rados.cc | 20 -------------------- src/rgw/driver/rados/rgw_sal_rados.h | 5 ----- src/rgw/rgw_sal.h | 6 ------ src/rgw/rgw_sal_dbstore.cc | 9 --------- src/rgw/rgw_sal_dbstore.h | 5 ----- src/rgw/rgw_sal_filter.cc | 9 --------- src/rgw/rgw_sal_filter.h | 5 ----- 7 files changed, 59 deletions(-) diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc index b809a32c71633..4aeb4b797740a 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.cc +++ b/src/rgw/driver/rados/rgw_sal_rados.cc @@ -1200,26 +1200,6 @@ int RadosStore::load_owner_by_email(const DoutPrefixProvider* dpp, return 0; } -int RadosStore::load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view rolename, - std::unique_ptr* role) -{ - RGWRoleInfo info; - info.account_id = account_id; - info.name = rolename; - auto p = get_role(info); - int r = p->get(dpp, y); - if (r < 0) { - ldpp_dout(dpp, 20) << "failed to load account role " << rolename - << ": " << cpp_strerror(r) << dendl; - return r; - } - *role = std::move(p); - return 0; -} - int RadosStore::count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, diff --git a/src/rgw/driver/rados/rgw_sal_rados.h b/src/rgw/driver/rados/rgw_sal_rados.h index 759bfad54ced2..edd977fcb3384 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.h +++ b/src/rgw/driver/rados/rgw_sal_rados.h @@ -196,11 +196,6 @@ class RadosStore : public StoreDriver { std::string_view email, rgw_owner& owner) override; - int load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) override; int count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h index 01d06205f1651..fd0bb5bdade91 100644 --- a/src/rgw/rgw_sal.h +++ b/src/rgw/rgw_sal.h @@ -358,12 +358,6 @@ class Driver { std::string_view email, rgw_owner& owner) = 0; - /** Load an account's role by name. */ - virtual int load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) = 0; /** Count the number of roles belonging to the given account. */ virtual int count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, diff --git a/src/rgw/rgw_sal_dbstore.cc b/src/rgw/rgw_sal_dbstore.cc index e2873fb71badc..d10b1652c4312 100644 --- a/src/rgw/rgw_sal_dbstore.cc +++ b/src/rgw/rgw_sal_dbstore.cc @@ -1620,15 +1620,6 @@ namespace rgw::sal { return 0; } - int DBStore::load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) - { - return -ENOTSUP; - } - int DBStore::count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, diff --git a/src/rgw/rgw_sal_dbstore.h b/src/rgw/rgw_sal_dbstore.h index bc037688eb6b6..4df5a55b975d2 100644 --- a/src/rgw/rgw_sal_dbstore.h +++ b/src/rgw/rgw_sal_dbstore.h @@ -795,11 +795,6 @@ public: std::string_view email, rgw_owner& owner) override; - int load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) override; int count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, diff --git a/src/rgw/rgw_sal_filter.cc b/src/rgw/rgw_sal_filter.cc index ddcde348821f3..0485ad96a12be 100644 --- a/src/rgw/rgw_sal_filter.cc +++ b/src/rgw/rgw_sal_filter.cc @@ -243,15 +243,6 @@ int FilterDriver::load_owner_by_email(const DoutPrefixProvider* dpp, return next->load_owner_by_email(dpp, y, email, owner); } -int FilterDriver::load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) -{ - return next->load_account_role_by_name(dpp, y, account_id, name, role); -} - int FilterDriver::count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, diff --git a/src/rgw/rgw_sal_filter.h b/src/rgw/rgw_sal_filter.h index fde1a4dda9511..39bb1af10f756 100644 --- a/src/rgw/rgw_sal_filter.h +++ b/src/rgw/rgw_sal_filter.h @@ -206,11 +206,6 @@ public: optional_yield y, std::string_view email, rgw_owner& owner) override; - int load_account_role_by_name(const DoutPrefixProvider* dpp, - optional_yield y, - std::string_view account_id, - std::string_view name, - std::unique_ptr* role) override; int count_account_roles(const DoutPrefixProvider* dpp, optional_yield y, std::string_view account_id, -- 2.39.5