]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-dencoder: add RGWPeriodLatestEpochInfo support. 30613/head
authoryuliyang <yuliyang@cmss.chinamobile.com>
Fri, 27 Sep 2019 07:39:15 +0000 (15:39 +0800)
committeryuliyang <yuliyang@cmss.chinamobile.com>
Sat, 28 Sep 2019 23:06:16 +0000 (07:06 +0800)
Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
src/rgw/rgw_dencoder.cc
src/rgw/rgw_zone.h
src/tools/ceph-dencoder/rgw_types.h

index 64ad1c21ffe8277a443e9913b9a194bf8656c5b5..612d6d1e8b701a0584a72cd7d84e95b849f4da94 100644 (file)
@@ -477,6 +477,13 @@ void RGWPeriod::generate_test_instances(list<RGWPeriod*> &o)
   o.push_back(new RGWPeriod);
 }
 
+void RGWPeriodLatestEpochInfo::generate_test_instances(list<RGWPeriodLatestEpochInfo*> &o)
+{
+  RGWPeriodLatestEpochInfo *z = new RGWPeriodLatestEpochInfo;
+  o.push_back(z);
+  o.push_back(new RGWPeriodLatestEpochInfo);
+}
+
 void RGWZoneParams::generate_test_instances(list<RGWZoneParams*> &o)
 {
   o.push_back(new RGWZoneParams);
index 64ceb87965b2f7cfd7c4d6ef331ba660b5b19c0e..9ce902040b3bde645800d439561328f3930f6740 100644 (file)
@@ -958,7 +958,7 @@ public:
 WRITE_CLASS_ENCODER(RGWRealm)
 
 struct RGWPeriodLatestEpochInfo {
-  epoch_t epoch;
+  epoch_t epoch = 0;
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -974,6 +974,7 @@ struct RGWPeriodLatestEpochInfo {
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
+  static void generate_test_instances(list<RGWPeriodLatestEpochInfo*>& o);
 };
 WRITE_CLASS_ENCODER(RGWPeriodLatestEpochInfo)
 
index 2116eb0b1c61bf5764348ecbc464bc6972e16fa2..bd1443ddf13352c53e77206469f8a04f54d25ea0 100644 (file)
@@ -12,6 +12,7 @@ TYPE(RGWZone)
 TYPE(RGWZoneGroup)
 TYPE(RGWRealm)
 TYPE(RGWPeriod)
+TYPE(RGWPeriodLatestEpochInfo)
 
 #include "rgw/rgw_acl.h"
 TYPE(ACLPermission)