This keeps the implementation of storage seperate from the RGWRole class. Also
drop the get_roles_by_path_prefix static function as this is currently
implemented in the backend and can be directly accessed from role ctl classes.
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
});
}
+int RGWRoleCtl::list_roles_by_path_prefix(const std::string& path_prefix,
+ const std::string& tenant,
+ std::vector<rgw::sal::RGWRole>& roles,
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
+{
+ return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
+ return svc.role->list_roles_by_path_prefix(op->ctx(),
+ path_prefix,
+ tenant,
+ roles,
+ y,
+ dpp);
+ });
+}
+
RGWRoleMetadataHandler::RGWRoleMetadataHandler(RGWSI_Role *role_svc)
{
base_init(role_svc->ctx(), role_svc->get_be_handler());
optional_yield y,
const DoutPrefixProvider *dpp,
const RemoveParams& params = {});
+
+ int list_roles_by_path_prefix(const std::string& path_prefix,
+ const std::string& tenant,
+ std::vector<rgw::sal::RGWRole>& roles,
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
};
#endif /* CEPH_RGW_ROLE_H */