]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/user/cls_user_ops.h
import 15.2.5
[ceph.git] / ceph / src / cls / user / cls_user_ops.h
index fa4b1f31b67b848d2e100aad25f32b9de28c2df8..b64c9aebfe39e0604e52d097688efcd496f818f9 100644 (file)
@@ -156,6 +156,69 @@ struct cls_user_reset_stats_op {
 };
 WRITE_CLASS_ENCODER(cls_user_reset_stats_op);
 
+struct cls_user_reset_stats2_op {
+  ceph::real_time time;
+  std::string marker;
+  cls_user_stats acc_stats;
+
+  cls_user_reset_stats2_op() {}
+
+  void encode(ceph::buffer::list& bl) const {
+    ENCODE_START(1, 1, bl);
+    encode(time, bl);
+    encode(marker, bl);
+    encode(acc_stats, bl);
+    ENCODE_FINISH(bl);
+  }
+
+  void decode(ceph::buffer::list::const_iterator& bl) {
+    DECODE_START(1, bl);
+    decode(time, bl);
+    decode(marker, bl);
+    decode(acc_stats, bl);
+    DECODE_FINISH(bl);
+  }
+
+  void dump(ceph::Formatter *f) const;
+  static void generate_test_instances(std::list<cls_user_reset_stats2_op*>& ls);
+};
+WRITE_CLASS_ENCODER(cls_user_reset_stats2_op);
+
+struct cls_user_reset_stats2_ret {
+  std::string marker;
+  cls_user_stats acc_stats; /* 0-initialized */
+  bool truncated;
+
+  cls_user_reset_stats2_ret()
+    : truncated(false) {}
+
+  void update_call(cls_user_reset_stats2_op& call) {
+    call.marker = marker;
+    call.acc_stats = acc_stats;
+  }
+
+  void encode(ceph::buffer::list& bl) const {
+    ENCODE_START(1, 1, bl);
+    encode(marker, bl);
+    encode(acc_stats, bl);
+    encode(truncated, bl);
+    ENCODE_FINISH(bl);
+  }
+
+  void decode(ceph::buffer::list::const_iterator& bl) {
+    DECODE_START(1, bl);
+    decode(marker, bl);
+    decode(acc_stats, bl);
+    decode(truncated, bl);
+    DECODE_FINISH(bl);
+  }
+
+  void dump(ceph::Formatter *f) const;
+  static void generate_test_instances(
+    std::list<cls_user_reset_stats2_ret*>& ls);
+};
+WRITE_CLASS_ENCODER(cls_user_reset_stats2_ret);
+
 struct cls_user_get_header_ret {
   cls_user_header header;