From 6fb5e7b243eac7930ea58f91b7560e2e3f589b8e Mon Sep 17 00:00:00 2001 From: yuliyang Date: Mon, 12 Nov 2018 20:54:38 +0800 Subject: [PATCH] ceph-dencoder: add RGWRealm support. Signed-off-by: yuliyang --- src/rgw/rgw_dencoder.cc | 14 ++++++++++++++ src/rgw/rgw_zone.h | 2 ++ src/tools/ceph-dencoder/types.h | 2 ++ 3 files changed, 18 insertions(+) diff --git a/src/rgw/rgw_dencoder.cc b/src/rgw/rgw_dencoder.cc index c5e7d73e788b..91078c15db17 100644 --- a/src/rgw/rgw_dencoder.cc +++ b/src/rgw/rgw_dencoder.cc @@ -456,6 +456,20 @@ void RGWZone::generate_test_instances(list &o) o.push_back(new RGWZone); } +void RGWRealm::generate_test_instances(list &o) +{ + RGWRealm *z = new RGWRealm; + o.push_back(z); + o.push_back(new RGWRealm); +} + +void RGWPeriod::generate_test_instances(list &o) +{ + RGWPeriod *z = new RGWPeriod; + o.push_back(z); + o.push_back(new RGWPeriod); +} + void RGWZoneParams::generate_test_instances(list &o) { o.push_back(new RGWZoneParams); diff --git a/src/rgw/rgw_zone.h b/src/rgw/rgw_zone.h index 81a79ae01658..f982915382ce 100644 --- a/src/rgw/rgw_zone.h +++ b/src/rgw/rgw_zone.h @@ -773,6 +773,7 @@ public: void dump(Formatter *f) const; void decode_json(JSONObj *obj); + static void generate_test_instances(list& o); const std::string& get_current_period() const { return current_period; @@ -971,6 +972,7 @@ public: } void dump(Formatter *f) const; void decode_json(JSONObj *obj); + static void generate_test_instances(list& o); static std::string get_staging_id(const std::string& realm_id) { return realm_id + ":staging"; diff --git a/src/tools/ceph-dencoder/types.h b/src/tools/ceph-dencoder/types.h index 31770de3a5bb..8bff4e05251b 100644 --- a/src/tools/ceph-dencoder/types.h +++ b/src/tools/ceph-dencoder/types.h @@ -346,6 +346,8 @@ TYPE(RGWObjManifest) TYPE(RGWZoneParams) TYPE(RGWZone) TYPE(RGWZoneGroup) +TYPE(RGWRealm) +TYPE(RGWPeriod) #include "rgw/rgw_acl.h" TYPE(ACLPermission) -- 2.47.3