From: Casey Bodley Date: Thu, 18 Aug 2022 20:41:49 +0000 (-0400) Subject: rgw: remove RGWOp_ZoneGroupMap_Get from /admin/config API X-Git-Tag: v18.0.0~167^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bc11400f15594b76cb309933973a47266932e697;p=ceph-ci.git rgw: remove RGWOp_ZoneGroupMap_Get from /admin/config API Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_config.cc b/src/rgw/rgw_rest_config.cc index db8eab4cc72..dec8655c00a 100644 --- a/src/rgw/rgw_rest_config.cc +++ b/src/rgw/rgw_rest_config.cc @@ -32,34 +32,6 @@ using namespace std; -void RGWOp_ZoneGroupMap_Get::execute(optional_yield y) { - op_ret = zonegroup_map.read(this, g_ceph_context, static_cast(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(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; } diff --git a/src/rgw/rgw_rest_config.h b/src/rgw/rgw_rest_config.h index ac1cde433d1..81717cc0d80 100644 --- a/src/rgw/rgw_rest_config.h +++ b/src/rgw/rgw_rest_config.h @@ -19,30 +19,6 @@ #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: