summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-02-22 15:04:37 -0800
committerYehuda Sadeh <yehuda@inktank.com>2013-03-07 11:38:06 -0800
commit6483275c5678db10d055371227be795cdc63db38 (patch)
tree8a552041b5ed9228fafe52b7829adb3c7046aa3c
parent7c681649f36efdf9073d537d784ae7db6d7037ec (diff)
downloadceph-6483275c5678db10d055371227be795cdc63db38.tar.gz
rgw: set attrs on various list bucket xml results (swift)wip-4247-bobtail
Fixes: #4247 The list buckets operation was missing some attrs on the different xml result entities. This fixes it. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> (cherry picked from commit 2b2704180a12153dc692dd0902515101502a85ba)
-rw-r--r--src/rgw/rgw_rest_swift.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc
index 34a73633f9a..40712e28164 100644
--- a/src/rgw/rgw_rest_swift.cc
+++ b/src/rgw/rgw_rest_swift.cc
@@ -112,7 +112,7 @@ void RGWListBucket_ObjStore_SWIFT::send_response()
dump_start(s);
- s->formatter->open_array_section("container");
+ s->formatter->open_array_section_with_attrs("container", FormatterAttrs("name", s->bucket.name.c_str(), NULL));
while (iter != objs.end() || pref_iter != common_prefixes.end()) {
bool do_pref = false;
@@ -158,15 +158,15 @@ void RGWListBucket_ObjStore_SWIFT::send_response()
if (name.compare(delimiter) == 0)
goto next;
- s->formatter->open_object_section("subdir");
+ s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));
/* swift is a bit inconsistent here */
switch (s->format) {
case RGW_FORMAT_XML:
- s->formatter->dump_string("name", pref_iter->first);
+ s->formatter->dump_string("name", name);
break;
default:
- s->formatter->dump_string("subdir", pref_iter->first);
+ s->formatter->dump_string("subdir", name);
}
s->formatter->close_section();
}