]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/sal: remove ZoneGroup::get_endpoint()
authorCasey Bodley <cbodley@redhat.com>
Tue, 3 Oct 2023 18:13:24 +0000 (14:13 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 7 Nov 2023 17:18:17 +0000 (12:18 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/daos/rgw_sal_daos.cc
src/rgw/driver/daos/rgw_sal_daos.h
src/rgw/driver/motr/rgw_sal_motr.cc
src/rgw/driver/motr/rgw_sal_motr.h
src/rgw/driver/rados/rgw_sal_rados.cc
src/rgw/driver/rados/rgw_sal_rados.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_dbstore.cc
src/rgw/rgw_sal_dbstore.h
src/rgw/rgw_sal_filter.h

index a6aacf024b3157e8f758346420283d70408a01b4..8be268fe17ccad94c626e947767f8ea809277de2 100644 (file)
@@ -800,19 +800,6 @@ int DaosStore::initialize(CephContext* cct, const DoutPrefixProvider* dpp) {
   return ret;
 }
 
-const std::string& DaosZoneGroup::get_endpoint() const {
-  if (!group.endpoints.empty()) {
-    return group.endpoints.front();
-  } else {
-    // use zonegroup's master zone endpoints
-    auto z = group.zones.find(group.master_zone);
-    if (z != group.zones.end() && !z->second.endpoints.empty()) {
-      return z->second.endpoints.front();
-    }
-  }
-  return empty;
-}
-
 bool DaosZoneGroup::placement_target_exists(std::string& target) const {
   return !!group.placement_targets.count(target);
 }
index 72d3bdb6cfbe1708e4a9ed7bb105a38c096d8240..4d5e6c831079de05bab6be463d60c19e790798eb 100644 (file)
@@ -402,8 +402,6 @@ class DaosZoneGroup : public StoreZoneGroup {
   virtual int equals(const std::string& other_zonegroup) const override {
     return group.equals(other_zonegroup);
   };
-  /** Get the endpoint from zonegroup, or from master zone if not set */
-  virtual const std::string& get_endpoint() const override;
   virtual bool placement_target_exists(std::string& target) const override;
   virtual bool is_master_zonegroup() const override {
     return group.is_master_zonegroup();
index b53516bb0653cf3218435772ab1ad7c01660e39b..d6a5eb1bc3ed79892d92752233776b13c7f12289 100644 (file)
@@ -1047,20 +1047,6 @@ void MotrStore::finalize(void)
   m0_client_fini(this->instance, true);
 }
 
-const std::string& MotrZoneGroup::get_endpoint() const
-{
-  if (!group.endpoints.empty()) {
-      return group.endpoints.front();
-  } else {
-    // use zonegroup's master zone endpoints
-    auto z = group.zones.find(group.master_zone);
-    if (z != group.zones.end() && !z->second.endpoints.empty()) {
-      return z->second.endpoints.front();
-    }
-  }
-  return empty;
-}
-
 bool MotrZoneGroup::placement_target_exists(std::string& target) const
 {
   return !!group.placement_targets.count(target);
index 7935462ac3f0daa9332f91044ae2f3c29f5acb23..66ca8314fc0bc3a3bfc09f4ef47db1ebe9471456 100644 (file)
@@ -440,8 +440,6 @@ public:
   virtual int equals(const std::string& other_zonegroup) const override {
     return group.equals(other_zonegroup);
   };
-  /** Get the endpoint from zonegroup, or from master zone if not set */
-  virtual const std::string& get_endpoint() const override;
   virtual bool placement_target_exists(std::string& target) const override;
   virtual bool is_master_zonegroup() const override {
     return group.is_master_zonegroup();
index fd8964e83ba15204bffd0e77940a8bcbf4be3620..68b6d998eca4d3147eeec314fcc5dafc1edc227c 100644 (file)
@@ -2980,20 +2980,6 @@ int RadosMultipartWriter::complete(size_t accounted_size, const std::string& eta
                            if_match, if_nomatch, user_data, zones_trace, canceled, rctx);
 }
 
-const std::string& RadosZoneGroup::get_endpoint() const
-{
-  if (!group.endpoints.empty()) {
-      return group.endpoints.front();
-  } else {
-    // use zonegroup's master zone endpoints
-    auto z = group.zones.find(group.master_zone);
-    if (z != group.zones.end() && !z->second.endpoints.empty()) {
-      return z->second.endpoints.front();
-    }
-  }
-  return empty;
-}
-
 bool RadosZoneGroup::placement_target_exists(std::string& target) const
 {
   return !!group.placement_targets.count(target);
index c8fa876260bfafd3371d8e33267ab337fe547437..c46ba8e68f0bcbb1ef05d4e9db6cf5d998e744bd 100644 (file)
@@ -55,8 +55,6 @@ public:
   virtual int equals(const std::string& other_zonegroup) const override {
     return group.equals(other_zonegroup);
   };
-  /** Get the endpoint from zonegroup, or from master zone if not set */
-  virtual const std::string& get_endpoint() const override;
   virtual bool placement_target_exists(std::string& target) const override;
   virtual bool is_master_zonegroup() const override {
     return group.is_master_zonegroup();
index d449535c3986f70fd4d4fd20fa4e07c445065c01..a4b0219dd41122bdc71c1c5f8958dd28c8bf7cfc 100644 (file)
@@ -1431,8 +1431,6 @@ public:
   virtual const std::string& get_name() const = 0;
   /** Determine if two zonegroups are the same */
   virtual int equals(const std::string& other_zonegroup) const = 0;
-  /** Get the endpoint from zonegroup, or from master zone if not set */
-  virtual const std::string& get_endpoint() const = 0;
   /** Check if a placement target (by name) exists in this zonegroup */
   virtual bool placement_target_exists(std::string& target) const = 0;
   /** Check if this is the master zonegroup */
index c8046a65a00dafa00d888e8dd79ba21374a06a23..47fa0f06ba750753795168b64c87b7ea2bbafd65 100644 (file)
@@ -428,19 +428,6 @@ namespace rgw::sal {
       dbsm->destroyAllHandles();
   }
 
-  const std::string&  DBZoneGroup::get_endpoint() const {
-    if (!group->endpoints.empty()) {
-      return group->endpoints.front();
-    } else {
-      // use zonegroup's master zone endpoints
-      auto z = group->zones.find(group->master_zone);
-      if (z != group->zones.end() && !z->second.endpoints.empty()) {
-       return z->second.endpoints.front();
-      }
-    }
-    return empty;
-  }
-
   bool DBZoneGroup::placement_target_exists(std::string& target) const {
     return !!group->placement_targets.count(target);
   }
index 83f3ff965782542184bc928156f030a88ecfa503..7ab98f6286b4b969a777044a51dec1ae81f382d7 100644 (file)
@@ -239,8 +239,6 @@ protected:
     virtual int equals(const std::string& other_zonegroup) const override {
       return group->equals(other_zonegroup);
     };
-    /** Get the endpoint from zonegroup, or from master zone if not set */
-    virtual const std::string& get_endpoint() const override;
     virtual bool placement_target_exists(std::string& target) const override;
     virtual bool is_master_zonegroup() const override {
       return group->is_master_zonegroup();
index 1711723bdd263b4a1dc4765e2570efca9caaa22f..aec8cd64c2ca7bdfecb4769de53145ff09aef5e1 100644 (file)
@@ -50,8 +50,6 @@ public:
     { return next->get_name(); }
   virtual int equals(const std::string& other_zonegroup) const override
     { return next->equals(other_zonegroup); }
-  virtual const std::string& get_endpoint() const override
-    { return next->get_endpoint(); }
   virtual bool placement_target_exists(std::string& target) const override
     { return next->placement_target_exists(target); }
   virtual bool is_master_zonegroup() const override