From 66041ae8111058d14cdda1a8c91ef53eac661e41 Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Thu, 15 Oct 2015 10:36:21 +0200 Subject: [PATCH] rgw: --rgw-zone and --rgw-zonegroup use names not id Signed-off-by: Orit Wasserman --- src/rgw/rgw_rados.cc | 8 ++++---- src/rgw/rgw_rados.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index c6e36dd698db8..51a053ce33237 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -217,7 +217,7 @@ const string& RGWZoneGroup::get_names_oid_prefix() return zonegroup_names_oid_prefix; } -const string& RGWZoneGroup::get_predefined_id() { +const string& RGWZoneGroup::get_predefined_name() { return cct->_conf->rgw_zonegroup; } @@ -280,7 +280,7 @@ int RGWSystemMetaObj::init(CephContext *_cct, RGWRados *_store, bool setup_obj, if (id.empty()) { int r; if (name.empty()) { - id = get_predefined_id(); + name = get_predefined_name(); if (id.empty()) { r = use_default(old_format); if (r == -ENOENT) { @@ -566,7 +566,7 @@ int RGWSystemMetaObj::store_info(bool exclusive) } -const string& RGWRealm::get_predefined_id() { +const string& RGWRealm::get_predefined_name() { return cct->_conf->rgw_realm; } @@ -1024,7 +1024,7 @@ const string& RGWZoneParams::get_info_oid_prefix(bool old_format) return zone_info_oid_prefix; } -const string& RGWZoneParams::get_predefined_id() { +const string& RGWZoneParams::get_predefined_name() { return cct->_conf->rgw_zone; } diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 21c4a6d0d1f72..70f554878f8cf 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -799,7 +799,7 @@ public: virtual const string& get_default_oid(bool old_format = false) = 0; virtual const string& get_names_oid_prefix() = 0; virtual const string& get_info_oid_prefix(bool old_format = false) = 0; - virtual const string& get_predefined_id() = 0; + virtual const string& get_predefined_name() = 0; void dump(Formatter *f) const; void decode_json(JSONObj *obj); @@ -867,7 +867,7 @@ struct RGWZoneParams : RGWSystemMetaObj { const string& get_default_oid(bool old_format = false); const string& get_names_oid_prefix(); const string& get_info_oid_prefix(bool old_format = false); - const string& get_predefined_id(); + const string& get_predefined_name(); int init(CephContext *_cct, RGWRados *_store, bool setup_obj = true, bool old_format = false); @@ -1132,7 +1132,7 @@ struct RGWZoneGroup : public RGWSystemMetaObj { const string& get_default_oid(bool old_region_format = false); const string& get_info_oid_prefix(bool old_region_format = false); const string& get_names_oid_prefix(); - const string& get_predefined_id(); + const string& get_predefined_name(); void dump(Formatter *f) const; void decode_json(JSONObj *obj); @@ -1295,7 +1295,7 @@ public: const string& get_default_oid(bool old_format = false); const string& get_names_oid_prefix(); const string& get_info_oid_prefix(bool old_format = false); - const string& get_predefined_id(); + const string& get_predefined_name(); void dump(Formatter *f) const; void decode_json(JSONObj *obj); -- 2.39.5