New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: add support for the prefix parameter in account listing of Swift API #12047
Conversation
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
… API. Fixes: http://tracker.ceph.com/issues/17931 Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
No regression in Tempest. S3 isn't affected by the PR. |
…jStore_SWIFT. Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
@yehudasa: refactored the dependency on Tempest is still fine with this PR. |
@rzarzynski I still see use of g_conf there |
@yehudasa: have you meant the occurrences of |
@rzarzynski no, it's ok now, not sure what happened before. |
s->formatter->open_object_section("container"); | ||
s->formatter->dump_string("name", obj.bucket.name); | ||
if (need_stats) { | ||
s->formatter->dump_int("count", obj.count); | ||
s->formatter->dump_int("bytes", obj.size); | ||
} | ||
s->formatter->close_section(); | ||
if (!g_conf->rgw_swift_enforce_content_length) { | ||
if (! g_conf->rgw_swift_enforce_content_length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rzarzynski actually, see this one ^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rzarzynski oh, nevermind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -177,7 +177,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_data(RGWUserBuckets& buckets) | |||
return; | |||
|
|||
for (iter = m.begin(); iter != m.end(); ++iter) { | |||
RGWBucketEnt obj = iter->second; | |||
const RGWBucketEnt& obj = iter->second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
* in applying the filter earlier as we really need to go through all | ||
* entries regardless of it (the headers like X-Account-Container-Count | ||
* aren't affected by specifying prefix). */ | ||
const std::map<std::string, RGWBucketEnt>& m = buckets.get_buckets(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -146,7 +146,7 @@ void RGWListBuckets_ObjStore_SWIFT::send_response_begin(bool has_buckets) | |||
set_req_state_err(s, op_ret); | |||
} | |||
|
|||
if (!g_conf->rgw_swift_enforce_content_length) { | |||
if (! s->cct->_conf->rgw_swift_enforce_content_length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Fixes: http://tracker.ceph.com/issues/17931