* acceptable in bucket names and thus qualified buckets cannot conflict
* with the legacy or S3 buckets.
*/
-void rgw_make_bucket_entry_name(const string& tenant_name, const string& bucket_name, string& bucket_entry) {
- if (bucket_name.empty()) {
- bucket_entry.clear();
- } else if (tenant_name.empty()) {
- bucket_entry = bucket_name;
- } else {
- bucket_entry = tenant_name + "/" + bucket_name;
- }
-}
-
-string rgw_make_bucket_entry_name(const string& tenant_name, const string& bucket_name) {
- string bucket_entry;
+std::string rgw_make_bucket_entry_name(const std::string& tenant_name,
+ const std::string& bucket_name) {
+ std::string bucket_entry;
if (bucket_name.empty()) {
bucket_entry.clear();
extern int rgw_bucket_sync_user_stats(RGWRados *store, const rgw_user& user_id, const RGWBucketInfo& bucket_info);
extern int rgw_bucket_sync_user_stats(RGWRados *store, const string& tenant_name, const string& bucket_name);
-extern void rgw_make_bucket_entry_name(const string& tenant_name,
- const string& bucket_name,
- string& bucket_entry);
-extern string rgw_make_bucket_entry_name(const string& tenant_name,
- const string& bucket_name);
+extern std::string rgw_make_bucket_entry_name(const std::string& tenant_name,
+ const std::string& bucket_name);
+static inline void rgw_make_bucket_entry_name(const string& tenant_name,
+ const string& bucket_name,
+ std::string& bucket_entry) {
+ bucket_entry = rgw_make_bucket_entry_name(tenant_name, bucket_name);
+}
+
extern void rgw_parse_url_bucket(const string& bucket,
const string& auth_tenant,
string &tenant_name, string &bucket_name);