summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2011-09-02 14:36:54 -0700
committerYehuda Sadeh <yehuda@hq.newdream.net>2011-09-02 14:37:10 -0700
commit969c67aa4c7a9c5c9d01c63fecd3897a97b50058 (patch)
tree7a24289d9f8624658a1a84f954c828937d35d2f4
parent2982f6768c1f3be0bba6771c95aca7099de9f8e4 (diff)
downloadceph-969c67aa4c7a9c5c9d01c63fecd3897a97b50058.tar.gz
rgw: s/OPENSTACK/SWIFT/g
-rw-r--r--src/rgw/rgw_common.h4
-rw-r--r--src/rgw/rgw_op.cc10
-rw-r--r--src/rgw/rgw_os_auth.cc6
-rw-r--r--src/rgw/rgw_rest.cc16
-rw-r--r--src/rgw/rgw_user.cc2
-rw-r--r--src/rgw/rgw_user.h2
6 files changed, 20 insertions, 20 deletions
diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h
index 038fa927601..2834337d84b 100644
--- a/src/rgw/rgw_common.h
+++ b/src/rgw/rgw_common.h
@@ -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
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 86457ff9633..302bb476954 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -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;
diff --git a/src/rgw/rgw_os_auth.cc b/src/rgw/rgw_os_auth.cc
index c5556aa6dcc..29c1e48b0e2 100644
--- a/src/rgw/rgw_os_auth.cc
+++ b/src/rgw/rgw_os_auth.cc
@@ -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;
}
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc
index b177a568636..b694f15356d 100644
--- a/src/rgw/rgw_rest.cc
+++ b/src/rgw/rgw_rest.cc
@@ -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;
diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc
index 14336aca59c..2d96fb3bba5 100644
--- a/src/rgw/rgw_user.cc
+++ b/src/rgw/rgw_user.cc
@@ -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);
diff --git a/src/rgw/rgw_user.h b/src/rgw/rgw_user.h
index c87ec8cf277..b9885196a50 100644
--- a/src/rgw/rgw_user.h
+++ b/src/rgw/rgw_user.h
@@ -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"