]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: --rgw-zone and --rgw-zonegroup use names not id
authorOrit Wasserman <owasserm@redhat.com>
Thu, 15 Oct 2015 08:36:21 +0000 (10:36 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:13 +0000 (16:13 -0800)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index c6e36dd698db841d144c728601d51b4e1860fb05..51a053ce33237d33ebff7f8bfac2f029cb93b2f7 100644 (file)
@@ -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;
 }
 
index 21c4a6d0d1f72bff541f61ad2e1d36aabd8e2d5d..70f554878f8cf2dfa3507e36a34425bfa62aa501 100644 (file)
@@ -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);