]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: also dump custom meta entries
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 22 Mar 2017 00:44:56 +0000 (17:44 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 30 May 2017 20:24:41 +0000 (13:24 -0700)
when doing metadata search

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync_module_es_rest.cc

index f0f2ec65c71bdb61e0e23fba01595edc397df612..458e0630265de56de1e9d709a9b8d8776fef760a 100644 (file)
@@ -210,6 +210,14 @@ public:
       dump_time(s, "LastModified", &e.meta.mtime);
       s->formatter->dump_format("ETag", "\"%s\"", e.meta.etag.c_str());
       dump_owner(s, e.owner.get_id(), e.owner.get_display_name());
+      s->formatter->open_array_section("CustomMetadata");
+      for (auto& m : e.meta.custom_str) {
+        s->formatter->open_object_section("Entry");
+        s->formatter->dump_string("Name", m.first.c_str());
+        s->formatter->dump_string("Value", m.second);
+        s->formatter->close_section();
+      }
+      s->formatter->close_section();
       s->formatter->close_section();
       rgw_flush_formatter(s, s->formatter);
     };