#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
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 */
}
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()) {
}
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();
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()) {
}
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;
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;
}
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);
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, '/');
}
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;
}
}
- if (s->prot_flags & RGW_REST_OPENSTACK) {
+ if (s->prot_flags & RGW_REST_SWIFT) {
string ver;
string auth_key;
}
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);
*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;
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);
#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"