From f8189c64da3cb6caa57db399bc9947fdbe7e130e Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Tue, 13 Oct 2020 14:42:42 +0200 Subject: [PATCH] rgw: role: modify store_name & path Signed-off-by: Abhishek Lekshmanan --- src/rgw/rgw_role.cc | 23 +++++++++++++++++++++++ src/rgw/rgw_role.h | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_role.cc b/src/rgw/rgw_role.cc index 35161e2bcac..1de0d46bac0 100644 --- a/src/rgw/rgw_role.cc +++ b/src/rgw/rgw_role.cc @@ -44,6 +44,29 @@ int RGWRole::store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_ set_exclusive(exclusive)); } +int RGWRole::store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y) +{ + return role_ctl->store_name(id, + name, + tenant, + y, + dpp, + RGWRoleCtl::PutParams(). + set_exclusive(exclusive) + ); +} + +int RGWRole::store_path(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y) +{ + return role_ctl->store_path(id, + path, + tenant, + y, + dpp, + RGWRoleCtl::PutParams(). + set_exclusive(exclusive)); +} + int RGWRole::get(const DoutPrefixProvider *dpp, optional_yield y) { int ret = read_name(dpp, y); diff --git a/src/rgw/rgw_role.h b/src/rgw/rgw_role.h index 0332159ab56..0369305aee3 100644 --- a/src/rgw/rgw_role.h +++ b/src/rgw/rgw_role.h @@ -49,8 +49,8 @@ protected: public: virtual int store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y); - virtual int store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y) = 0; - virtual int store_path(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y) = 0; + virtual int store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y); + virtual int store_path(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y); virtual int read_id(const DoutPrefixProvider *dpp, const std::string& role_name, const std::string& tenant, std::string& role_id, optional_yield y) = 0; virtual int read_name(const DoutPrefixProvider *dpp, optional_yield y) = 0; virtual int read_info(const DoutPrefixProvider *dpp, optional_yield y) = 0; -- 2.39.5