]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd: add object section for every trash image
authorsongweibin <song.weibin@zte.com.cn>
Fri, 13 Apr 2018 00:39:31 +0000 (08:39 +0800)
committersongweibin <song.weibin@zte.com.cn>
Fri, 13 Apr 2018 00:40:50 +0000 (08:40 +0800)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
src/tools/rbd/action/Trash.cc

index a6fccbd99db17e772c3de69e2c9e4ab0347c23a2..bb97cab5e8adb745c2cc54ac7b1705da19abdeb6 100644 (file)
@@ -209,8 +209,10 @@ int do_list(librbd::RBD &rbd, librados::IoCtx& io_ctx, bool long_flag,
     }
     for (const auto& entry : trash_entries) {
        if (f) {
+         f->open_object_section("image");
          f->dump_string("id", entry.id);
          f->dump_string("name", entry.name);
+         f->close_section();
        } else {
          std::cout << entry.id << " " << entry.name << std::endl;
        }