]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cleanup
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Oct 2015 21:04:42 +0000 (14:04 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:26 +0000 (16:13 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rest_client.cc

index f45f345d3a1133ded51ed1bdd2d5d2ababa97581..d90969a691b38f0cbb8f25a63b46437325e43068 100644 (file)
@@ -722,68 +722,3 @@ public:
   }
 };
 
-#if 0
-struct RGWRESTRequestParams {
-  string resource;
-  list<pair<string, string> > *params;
-  map<string, string> *headers;
-
-  RGWRESTRequestParams() : params(NULL), headers(NULL) {}
-};
-
-
-class RGWRESTBufferReadRequest {
-  RGWRESTConn *conn;
-  RGWRESTRequestParams *params;
-  bufferlist bl;
-  StreamIntoBufferlist cb;
-  RGWRESTStreamReadRequest req;
-
-  list<pair<string, string> > http_params;
-  map<string, string> http_headers;
-public:
-  RGWRESTBufferReadRequest(RGWRESTConn *_conn,
-                          RGWRESTRequestParams *_params,
-                          RGWHTTPManager *mgr = NULL) : conn(_conn), params(_params), cb(bl) {
-    if (params->params) {
-      list<pair<string, string> >::iterator iter = params->params->begin();
-      for (; iter != params->params->end(); ++iter) {
-        http_params.push_back(*iter);
-      }
-    }
-    http_params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "region", conn->get_region()));
-
-    if (params->headers) {
-      for (map<string, string>::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<string, string> attrs;
-  return req.complete(etag, NULL, attrs);
-}
-
-
-#endif