]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: get_predefined_name should get the ceph context
authorOrit Wasserman <owasserm@redhat.com>
Mon, 19 Oct 2015 08:31:35 +0000 (10:31 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:15 +0000 (16:13 -0800)
so it can be called before object init

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 139f4fefc562d2688f847291616d69ff4f7d9aaf..26406fe2320bdbd8eafaf279af3a8e0fee477fab 100644 (file)
@@ -219,7 +219,7 @@ const string& RGWZoneGroup::get_names_oid_prefix()
   return zonegroup_names_oid_prefix;
 }
 
-const string& RGWZoneGroup::get_predefined_name() {
+const string& RGWZoneGroup::get_predefined_name(CephContext *cct) {
   return cct->_conf->rgw_zonegroup;
 }
 
@@ -324,7 +324,7 @@ int RGWSystemMetaObj::init(CephContext *_cct, RGWRados *_store, bool setup_obj,
   if (id.empty()) {
     int r;
     if (name.empty()) {
-      name = get_predefined_name();
+      name = get_predefined_name(cct);
       if (id.empty()) {
        r = use_default(old_format);
        if (r < 0) {
@@ -632,7 +632,7 @@ int RGWSystemMetaObj::write(bool exclusive)
 }
 
 
-const string& RGWRealm::get_predefined_name() {
+const string& RGWRealm::get_predefined_name(CephContext *cct) {
   return cct->_conf->rgw_realm;
 }
 
@@ -1138,7 +1138,7 @@ const string& RGWZoneParams::get_info_oid_prefix(bool old_format)
   return zone_info_oid_prefix;
 }
 
-const string& RGWZoneParams::get_predefined_name() {
+const string& RGWZoneParams::get_predefined_name(CephContext *cct) {
   return cct->_conf->rgw_zone;
 }
 
index 085d74db4dfc9e85a9cfe25632ddeadb1c70fbf3..46ddd3e61ad8ff79109b19e859bd388e5c551c61 100644 (file)
@@ -798,7 +798,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_name() = 0;
+  virtual const string& get_predefined_name(CephContext *cct) = 0;
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
@@ -866,7 +866,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_name();
+  const string& get_predefined_name(CephContext *cct);
 
   int init(CephContext *_cct, RGWRados *_store, bool setup_obj = true,
           bool old_format = false);
@@ -1135,7 +1135,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_name();
+  const string& get_predefined_name(CephContext *cct);
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
@@ -1327,7 +1327,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_name();
+  const string& get_predefined_name(CephContext *cct);
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);