]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: rgw: add objexp_hint_entry types to ceph-dencoder 27780/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 22 Jul 2019 14:41:44 +0000 (16:41 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Mon, 22 Jul 2019 15:41:11 +0000 (17:41 +0200)
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_dencoder.cc
src/rgw/rgw_json_enc.cc
src/rgw/rgw_rados.h
src/tools/ceph-dencoder/rgw_types.h

index 91078c15db17581fd26b577cc5c889c3e672a870..41216fe91b27e643e423f4b1046a017e53433c96 100644 (file)
@@ -562,3 +562,14 @@ void rgw_data_sync_status::generate_test_instances(list<rgw_data_sync_status*>&
 {
   o.push_back(new rgw_data_sync_status);
 }
+
+void objexp_hint_entry::generate_test_instances(list<objexp_hint_entry*>& o)
+{
+  auto it = new objexp_hint_entry;
+  it->tenant = "tenant1";
+  it->bucket_name = "bucket1";
+  it->bucket_id = "1234";
+  it->obj_key = rgw_obj_key("obj");
+  o.push_back(it);
+  o.push_back(new objexp_hint_entry);
+}
index 046f9294949caa60270e9f6864f93c335e7ffd99..6b4756cda9054d7bfb95e68b3f38b75ee787fc9f 100644 (file)
@@ -1748,3 +1748,15 @@ void RGWCompressionInfo::dump(Formatter *f) const
   f->dump_unsigned("orig_size", orig_size);
   ::encode_json("blocks", blocks, f);
 }
+
+void objexp_hint_entry::dump(Formatter *f) const
+{
+  f->open_object_section("objexp_hint_entry");
+  encode_json("tenant", tenant, f);
+  encode_json("bucket_name", bucket_name, f);
+  encode_json("bucket_id", bucket_id, f);
+  encode_json("rgw_obj_key", obj_key, f);
+  utime_t ut(exp_time);
+  encode_json("exp_time", ut, f);
+  f->close_section();
+}
index 235dfab0a0954cb4fed2d02fa03836a0b3fdf73b..1318199e0f1f031f2e20e397f0097e423c5348ab 100644 (file)
@@ -1023,6 +1023,9 @@ struct objexp_hint_entry {
     }
     DECODE_FINISH(bl);
   }
+
+  void dump(Formatter *f) const;
+  static void generate_test_instances(list<objexp_hint_entry*>& o);
 };
 WRITE_CLASS_ENCODER(objexp_hint_entry)
 
index 6d1b2b785af69ac68ce9f6a4b32bc44829194549..f916e66711acc86fc6180ddb882943539455fa5f 100644 (file)
@@ -4,6 +4,7 @@
 TYPE(RGWOLHInfo)
 TYPE(RGWObjManifestPart)
 TYPE(RGWObjManifest)
+TYPE(objexp_hint_entry)
 
 #include "rgw/rgw_zone.h"
 TYPE(RGWZoneParams)