]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: remove RGWOp_ZoneGroupMap_Get from /admin/config API
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Aug 2022 20:41:49 +0000 (16:41 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 22 Aug 2022 21:50:09 +0000 (17:50 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_config.cc
src/rgw/rgw_rest_config.h

index db8eab4cc72a5e6ee823f43c61b7e38c2317f669..dec8655c00a50ee03df70c7e6b6f5b44c048d80d 100644 (file)
 
 using namespace std;
 
-void RGWOp_ZoneGroupMap_Get::execute(optional_yield y) {
-  op_ret = zonegroup_map.read(this, g_ceph_context, static_cast<rgw::sal::RadosStore*>(store)->svc()->sysobj, y);
-  if (op_ret < 0) {
-    ldpp_dout(this, 5) << "failed to read zone_group map" << dendl;
-  }
-}
-
-void RGWOp_ZoneGroupMap_Get::send_response() {
-  set_req_state_err(s, op_ret);
-  dump_errno(s);
-  end_header(s);
-
-  if (op_ret < 0)
-    return;
-
-  if (old_format) {
-    RGWRegionMap region_map;
-    region_map.regions = zonegroup_map.zonegroups;
-    region_map.master_region = zonegroup_map.master_zonegroup;
-    region_map.quota.bucket_quota = zonegroup_map.quota.bucket_quota;
-    region_map.quota.user_quota = zonegroup_map.quota.user_quota;
-    encode_json("region-map", region_map, s->formatter);
-  } else {
-    encode_json("zonegroup-map", zonegroup_map, s->formatter);
-  }
-  flusher.flush();
-}
-
 void RGWOp_ZoneConfig_Get::send_response() {
   const RGWZoneParams& zone_params = static_cast<rgw::sal::RadosStore*>(store)->svc()->zone->get_zone_params();
 
@@ -78,11 +50,8 @@ RGWOp* RGWHandler_Config::op_get() {
   bool exists;
   string type = s->info.args.get("type", &exists);
 
-  if (type.compare("zonegroup-map") == 0) {
-    return new RGWOp_ZoneGroupMap_Get(false);
-  } else if (type.compare("zone") == 0) {
+  if (type.compare("zone") == 0) {
     return new RGWOp_ZoneConfig_Get();
-  } else {
-    return new RGWOp_ZoneGroupMap_Get(true);
   }
+  return nullptr;
 }
index ac1cde433d17d316731d2855c357ab765bea8170..81717cc0d80e250d126eca1690012bf9acd9efc0 100644 (file)
 #include "rgw_rest.h"
 #include "rgw_zone.h"
 
-class RGWOp_ZoneGroupMap_Get : public RGWRESTOp {
-  RGWZoneGroupMap zonegroup_map;
-  bool old_format;
-public:
-  explicit RGWOp_ZoneGroupMap_Get(bool _old_format):old_format(_old_format) {}
-  ~RGWOp_ZoneGroupMap_Get() override {}
-
-  int check_caps(const RGWUserCaps& caps) override {
-    return caps.check_cap("zone", RGW_CAP_READ);
-  }
-  int verify_permission(optional_yield) override {
-    return check_caps(s->user->get_caps());
-  }
-  void execute(optional_yield y) override;
-  void send_response() override;
-  const char* name() const override {
-    if (old_format) {
-      return "get_region_map";
-    } else {
-      return "get_zonegroup_map";
-    }
-  }
-};
-
 class RGWOp_ZoneConfig_Get : public RGWRESTOp {
   RGWZoneParams zone_params;
 public: