From 41bbe95a593df4ffa1aba8ecc5885adad7438331 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 29 Oct 2015 14:04:42 -0700 Subject: [PATCH] rgw: cleanup Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_rest_client.cc | 65 -------------------------------------- 1 file changed, 65 deletions(-) diff --git a/src/rgw/rgw_rest_client.cc b/src/rgw/rgw_rest_client.cc index f45f345d3a113..d90969a691b38 100644 --- a/src/rgw/rgw_rest_client.cc +++ b/src/rgw/rgw_rest_client.cc @@ -722,68 +722,3 @@ public: } }; -#if 0 -struct RGWRESTRequestParams { - string resource; - list > *params; - map *headers; - - RGWRESTRequestParams() : params(NULL), headers(NULL) {} -}; - - -class RGWRESTBufferReadRequest { - RGWRESTConn *conn; - RGWRESTRequestParams *params; - bufferlist bl; - StreamIntoBufferlist cb; - RGWRESTStreamReadRequest req; - - list > http_params; - map http_headers; -public: - RGWRESTBufferReadRequest(RGWRESTConn *_conn, - RGWRESTRequestParams *_params, - RGWHTTPManager *mgr = NULL) : conn(_conn), params(_params), cb(bl) { - if (params->params) { - list >::iterator iter = params->params->begin(); - for (; iter != params->params->end(); ++iter) { - http_params.push_back(*iter); - } - } - http_params.push_back(pair(RGW_SYS_PARAM_PREFIX "region", conn->get_region())); - - if (params->headers) { - for (map::iterator iter = params->headers->begin(); - iter != params->headers->end(); ++iter) { - http_headers[iter->first] = iter->second; - } - } - } - - - int get(); -}; - -int RGWRESTBufferReadRequest::get() -{ - string url; - int ret = conn->get_url(url); - if (ret < 0) - return ret; - - req.init(cct, url, &cb, NULL, &http_params); - - ret = req.get_resource(key, http_headers, resource, mgr); - if (ret < 0) { - ldout(cct, 0) << __func__ << ": get() resource=" << resource << " returned ret=" << ret << dendl; - return ret; - } - - string etag; - map attrs; - return req.complete(etag, NULL, attrs); -} - - -#endif -- 2.39.5