]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s/OPENSTACK/SWIFT/g
authorYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 2 Sep 2011 21:36:54 +0000 (14:36 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 2 Sep 2011 21:37:10 +0000 (14:37 -0700)
src/rgw/rgw_common.h
src/rgw/rgw_op.cc
src/rgw/rgw_os_auth.cc
src/rgw/rgw_rest.cc
src/rgw/rgw_user.cc
src/rgw/rgw_user.h

index 038fa92760138c9c420a22febe1e3847412384e1..2834337d84b2352fb4183cb7017a6b42186e9ca2 100644 (file)
@@ -67,8 +67,8 @@ extern string rgw_obj_category_none;
 #define RGW_FORMAT_XML          1
 #define RGW_FORMAT_JSON         2
 
-#define RGW_REST_OPENSTACK      0x1
-#define RGW_REST_OPENSTACK_AUTH 0x2
+#define RGW_REST_SWIFT          0x1
+#define RGW_REST_SWIFT_AUTH     0x2
 
 #define RGW_SUSPENDED_USER_AUID (uint64_t)-2
 
index 86457ff9633cea30894e3e8fceaa6a107433aee8..302bb4769544fabcdbaa6b1a36c6a63bd5766ed2 100644 (file)
@@ -332,7 +332,7 @@ int RGWListBuckets::verify_permission()
 
 void RGWListBuckets::execute()
 {
-  ret = rgw_read_user_buckets(s->user.user_id, buckets, !!(s->prot_flags & RGW_REST_OPENSTACK));
+  ret = rgw_read_user_buckets(s->user.user_id, buckets, !!(s->prot_flags & RGW_REST_SWIFT));
   if (ret < 0) {
     /* hmm.. something wrong here.. the user was authenticated, so it
        should exist, just try to recreate */
@@ -412,7 +412,7 @@ void RGWListBucket::execute()
   }
   url_decode(s->args.get("delimiter"), delimiter);
 
-  if (s->prot_flags & RGW_REST_OPENSTACK) {
+  if (s->prot_flags & RGW_REST_SWIFT) {
     string path_args;
     url_decode(s->args.get("path"), path_args);
     if (!path_args.empty()) {
@@ -426,7 +426,7 @@ void RGWListBucket::execute()
   }
 
   ret = rgwstore->list_objects(s->user.user_id, s->bucket, max, prefix, delimiter, marker, objs, common_prefixes,
-                               !!(s->prot_flags & RGW_REST_OPENSTACK), no_ns, &is_truncated, NULL);
+                               !!(s->prot_flags & RGW_REST_SWIFT), no_ns, &is_truncated, NULL);
 
 done:
   send_response();
@@ -1467,7 +1467,7 @@ void RGWListBucketMultiparts::execute()
   if (ret < 0)
     goto done;
 
-  if (s->prot_flags & RGW_REST_OPENSTACK) {
+  if (s->prot_flags & RGW_REST_SWIFT) {
     string path_args;
     url_decode(s->args.get("path"), path_args);
     if (!path_args.empty()) {
@@ -1481,7 +1481,7 @@ void RGWListBucketMultiparts::execute()
   }
   marker_meta = marker.get_meta();
   ret = rgwstore->list_objects(s->user.user_id, s->bucket, max_uploads, prefix, delimiter, marker_meta, objs, common_prefixes,
-                               !!(s->prot_flags & RGW_REST_OPENSTACK), mp_ns, &is_truncated, &mp_filter);
+                               !!(s->prot_flags & RGW_REST_SWIFT), mp_ns, &is_truncated, &mp_filter);
   if (objs.size()) {
     vector<RGWObjEnt>::iterator iter;
     RGWMultipartUploadEntry entry;
index c5556aa6dcc9ab7d8dd5ea8655e8a2791215e7b7..29c1e48b0e2f07677045ba2ea32261ffe4d33b3f 100644 (file)
@@ -125,15 +125,15 @@ void RGW_OS_Auth_Get::execute()
 
   const char *key = s->env->get("HTTP_X_AUTH_KEY");
   const char *user = s->env->get("HTTP_X_AUTH_USER");
-  const char *url_prefix = s->env->get("RGW_OPENSTACK_URL_PREFIX");
-  const char *os_url = s->env->get("RGW_OPENSTACK_URL");
+  const char *url_prefix = s->env->get("RGW_SWIFT_URL_PREFIX");
+  const char *os_url = s->env->get("RGW_SWIFT_URL");
 
   string user_str = user;
   RGWUserInfo info;
   bufferlist bl;
 
   if (!os_url || !url_prefix) {
-    RGW_LOG(0) << "server is misconfigured, missing RGW_OPENSTACK_URL_PREFIX or RGW_OPENSTACK_URL" << dendl;
+    RGW_LOG(0) << "server is misconfigured, missing RGW_SWIFT_URL_PREFIX or RGW_SWIFT_URL" << dendl;
     ret = -EINVAL;
     goto done;
   }
index b177a568636ef1c522ab26725d27e6e4be7a792a..b694f15356de1ae4c0fa4c58b11b0e8e97bae49c 100644 (file)
@@ -98,7 +98,7 @@ void dump_content_length(struct req_state *s, size_t len)
 
 void dump_etag(struct req_state *s, const char *etag)
 {
-  if (s->prot_flags & RGW_REST_OPENSTACK)
+  if (s->prot_flags & RGW_REST_SWIFT)
     CGI_PRINTF(s,"etag: %s\n", etag);
   else
     CGI_PRINTF(s,"ETag: \"%s\"\n", etag);
@@ -429,13 +429,13 @@ void init_entities_from_header(struct req_state *s)
 
   pos = req.find('/');
   if (pos >= 0) {
-    const char *openstack_url_prefix = s->env->get("RGW_OPENSTACK_URL_PREFIX");
+    const char *openstack_url_prefix = s->env->get("RGW_SWIFT_URL_PREFIX");
     bool cut_url = (openstack_url_prefix != NULL);
     if (!openstack_url_prefix)
       openstack_url_prefix = "v1";
     first = req.substr(0, pos);
     if (first.compare(openstack_url_prefix) == 0) {
-      s->prot_flags |= RGW_REST_OPENSTACK;
+      s->prot_flags |= RGW_REST_SWIFT;
       if (cut_url) {
         next_tok(req, first, '/');
       }
@@ -444,7 +444,7 @@ void init_entities_from_header(struct req_state *s)
     first = req;
   }
 
-  if (s->prot_flags & RGW_REST_OPENSTACK) {
+  if (s->prot_flags & RGW_REST_SWIFT) {
     s->format = 0;
     delete s->formatter;
     s->formatter = new RGWFormatter_Plain;
@@ -460,7 +460,7 @@ void init_entities_from_header(struct req_state *s)
     }
   }
 
-  if (s->prot_flags & RGW_REST_OPENSTACK) {
+  if (s->prot_flags & RGW_REST_SWIFT) {
     string ver;
     string auth_key;
 
@@ -496,7 +496,7 @@ void init_entities_from_header(struct req_state *s)
   }
 
   if (strcmp(s->bucket_name, "auth") == 0)
-    s->prot_flags |= RGW_REST_OPENSTACK_AUTH;
+    s->prot_flags |= RGW_REST_SWIFT_AUTH;
 
   if (pos >= 0) {
     string encoded_obj_str = req.substr(pos+1);
@@ -828,9 +828,9 @@ RGWHandler *RGWRESTMgr::get_handler(struct req_state *s, FCGX_Request *fcgx,
 
   *init_error = RGWHandler_REST::preprocess(s, fcgx);
 
-  if (s->prot_flags & RGW_REST_OPENSTACK)
+  if (s->prot_flags & RGW_REST_SWIFT)
     handler = m_os_handler;
-  else if (s->prot_flags & RGW_REST_OPENSTACK_AUTH)
+  else if (s->prot_flags & RGW_REST_SWIFT_AUTH)
     handler = m_os_auth_handler;
   else
     handler = m_s3_handler;
index 14336aca59c2191dae81d1e923c4a55b28a051bc..2d96fb3bba5361a3bed89a98d35f51a4121562a6 100644 (file)
@@ -15,7 +15,7 @@ using namespace std;
 
 static rgw_bucket ui_key_bucket(USER_INFO_POOL_NAME);
 static rgw_bucket ui_email_bucket(USER_INFO_EMAIL_POOL_NAME);
-static rgw_bucket ui_openstack_bucket(USER_INFO_OPENSTACK_POOL_NAME);
+static rgw_bucket ui_openstack_bucket(USER_INFO_SWIFT_POOL_NAME);
 static rgw_bucket ui_uid_bucket(USER_INFO_UID_POOL_NAME);
 
 static rgw_bucket pi_pool_bucket(POOL_INFO_POOL_NAME);
index c87ec8cf27776b5735f4735e9ba5be729313e68a..b9885196a5058c412ea211324558c1ab3c611d04 100644 (file)
@@ -11,7 +11,7 @@ using namespace std;
 
 #define USER_INFO_POOL_NAME ".users"
 #define USER_INFO_EMAIL_POOL_NAME ".users.email"
-#define USER_INFO_OPENSTACK_POOL_NAME ".users.openstack"
+#define USER_INFO_SWIFT_POOL_NAME ".users.openstack"
 #define USER_INFO_UID_POOL_NAME ".users.uid"
 #define RGW_USER_ANON_ID "anonymous"