diff options
Diffstat (limited to 'src/rgw/rgw_dencoder.cc')
-rw-r--r-- | src/rgw/rgw_dencoder.cc | 284 |
1 files changed, 0 insertions, 284 deletions
diff --git a/src/rgw/rgw_dencoder.cc b/src/rgw/rgw_dencoder.cc index 00015ff022c..1f4e3522788 100644 --- a/src/rgw/rgw_dencoder.cc +++ b/src/rgw/rgw_dencoder.cc @@ -20,15 +20,6 @@ void RGWObjManifestPart::generate_test_instances(std::list<RGWObjManifestPart*>& o.push_back(p); } -void RGWObjManifestPart::dump(Formatter *f) const -{ - f->open_object_section("loc"); - loc.dump(f); - f->close_section(); - f->dump_unsigned("loc_ofs", loc_ofs); - f->dump_unsigned("size", size); -} - void RGWObjManifest::generate_test_instances(std::list<RGWObjManifest*>& o) { RGWObjManifest *m = new RGWObjManifest; @@ -47,20 +38,6 @@ void RGWObjManifest::generate_test_instances(std::list<RGWObjManifest*>& o) o.push_back(new RGWObjManifest); } -void RGWObjManifest::dump(Formatter *f) const -{ - map<uint64_t, RGWObjManifestPart>::const_iterator iter = objs.begin(); - f->open_array_section("objs"); - for (; iter != objs.end(); ++iter) { - f->dump_unsigned("ofs", iter->first); - f->open_object_section("part"); - iter->second.dump(f); - f->close_section(); - } - f->close_section(); - f->dump_unsigned("obj_size", obj_size); -} - void rgw_log_entry::generate_test_instances(list<rgw_log_entry*>& o) { rgw_log_entry *e = new rgw_log_entry; @@ -83,28 +60,6 @@ void rgw_log_entry::generate_test_instances(list<rgw_log_entry*>& o) o.push_back(new rgw_log_entry); } -void rgw_log_entry::dump(Formatter *f) const -{ - f->dump_string("object_owner", object_owner); - f->dump_string("bucket_owner", bucket_owner); - f->dump_string("bucket", bucket); - f->dump_stream("time") << time; - f->dump_string("remote_addr", remote_addr); - f->dump_string("user", user); - f->dump_string("obj", obj); - f->dump_string("op", op); - f->dump_string("uri", uri); - f->dump_string("http_status", http_status); - f->dump_string("error_code", error_code); - f->dump_unsigned("bytes_sent", bytes_sent); - f->dump_unsigned("bytes_received", bytes_received); - f->dump_unsigned("obj_size", obj_size); - f->dump_stream("total_time") << total_time; - f->dump_string("user_agent", user_agent); - f->dump_string("referrer", referrer); - f->dump_string("bucket_id", bucket_id); -} - void rgw_intent_log_entry::generate_test_instances(list<rgw_intent_log_entry*>& o) { rgw_intent_log_entry *e = new rgw_intent_log_entry; @@ -115,16 +70,6 @@ void rgw_intent_log_entry::generate_test_instances(list<rgw_intent_log_entry*>& o.push_back(new rgw_intent_log_entry); } -void rgw_intent_log_entry::dump(Formatter *f) const -{ - f->open_object_section("obj"); - obj.dump(f); - f->close_section(); - f->dump_stream("op_time") << op_time; - f->dump_unsigned("intent", intent); -} - - void ACLPermission::generate_test_instances(list<ACLPermission*>& o) { ACLPermission *p = new ACLPermission; @@ -133,11 +78,6 @@ void ACLPermission::generate_test_instances(list<ACLPermission*>& o) o.push_back(new ACLPermission); } -void ACLPermission::dump(Formatter *f) const -{ - f->dump_int("flags", flags); -} - void ACLGranteeType::generate_test_instances(list<ACLGranteeType*>& o) { ACLGranteeType *t = new ACLGranteeType; @@ -146,11 +86,6 @@ void ACLGranteeType::generate_test_instances(list<ACLGranteeType*>& o) o.push_back(new ACLGranteeType); } -void ACLGranteeType::dump(Formatter *f) const -{ - f->dump_unsigned("type", type); -} - /* the following is copied here from rgw_acl_s3.cc, to avoid having to have excessive linking with everything it needs */ @@ -189,23 +124,6 @@ void ACLGrant::generate_test_instances(list<ACLGrant*>& o) o.push_back(new ACLGrant); } -void ACLGrant::dump(Formatter *f) const -{ - f->open_object_section("type"); - type.dump(f); - f->close_section(); - - f->dump_string("id", id); - f->dump_string("email", email); - - f->open_object_section("permission"); - permission.dump(f); - f->close_section(); - - f->dump_string("name", name); - f->dump_int("group", (int)group); -} - void RGWAccessControlList::generate_test_instances(list<RGWAccessControlList*>& o) { RGWAccessControlList *acl = new RGWAccessControlList(NULL); @@ -224,41 +142,6 @@ void RGWAccessControlList::generate_test_instances(list<RGWAccessControlList*>& o.push_back(new RGWAccessControlList(NULL)); } -void RGWAccessControlList::dump(Formatter *f) const -{ - map<string, int>::const_iterator acl_user_iter = acl_user_map.begin(); - f->open_array_section("acl_user_map"); - for (; acl_user_iter != acl_user_map.end(); ++acl_user_iter) { - f->open_object_section("entry"); - f->dump_string("user", acl_user_iter->first); - f->dump_int("acl", acl_user_iter->second); - f->close_section(); - } - f->close_section(); - - map<uint32_t, int>::const_iterator acl_group_iter = acl_group_map.begin(); - f->open_array_section("acl_group_map"); - for (; acl_group_iter != acl_group_map.end(); ++acl_group_iter) { - f->open_object_section("entry"); - f->dump_unsigned("group", acl_group_iter->first); - f->dump_int("acl", acl_group_iter->second); - f->close_section(); - } - f->close_section(); - - multimap<string, ACLGrant>::const_iterator giter = grant_map.begin(); - f->open_array_section("grant_map"); - for (; giter != grant_map.end(); ++giter) { - f->open_object_section("entry"); - f->dump_string("id", giter->first); - f->open_object_section("grant"); - giter->second.dump(f); - f->close_section(); - f->close_section(); - } - f->close_section(); -} - void ACLOwner::generate_test_instances(list<ACLOwner*>& o) { ACLOwner *owner = new ACLOwner; @@ -268,12 +151,6 @@ void ACLOwner::generate_test_instances(list<ACLOwner*>& o) o.push_back(new ACLOwner); } -void ACLOwner::dump(Formatter *f) const -{ - f->dump_string("id", id); - f->dump_string("display_name", display_name); -} - void RGWAccessControlPolicy::generate_test_instances(list<RGWAccessControlPolicy*>& o) { list<RGWAccessControlList *> acl_list; @@ -300,17 +177,6 @@ void RGWAccessControlPolicy::generate_test_instances(list<RGWAccessControlPolicy } -void RGWAccessControlPolicy::dump(Formatter *f) const -{ - f->open_object_section("acl"); - acl.dump(f); - f->close_section(); - f->open_object_section("owner"); - owner.dump(f); - f->close_section(); -} - - void ObjectMetaInfo::generate_test_instances(list<ObjectMetaInfo*>& o) { ObjectMetaInfo *m = new ObjectMetaInfo; @@ -319,12 +185,6 @@ void ObjectMetaInfo::generate_test_instances(list<ObjectMetaInfo*>& o) o.push_back(new ObjectMetaInfo); } -void ObjectMetaInfo::dump(Formatter *f) const -{ - f->dump_unsigned("size", size); - f->dump_stream("mtime") << mtime; -} - void ObjectCacheInfo::generate_test_instances(list<ObjectCacheInfo*>& o) { ObjectCacheInfo *i = new ObjectCacheInfo; @@ -345,56 +205,11 @@ void ObjectCacheInfo::generate_test_instances(list<ObjectCacheInfo*>& o) o.push_back(new ObjectCacheInfo); } -void ObjectCacheInfo::dump(Formatter *f) const -{ - f->dump_int("status", status); - f->dump_unsigned("flags", flags); - f->open_object_section("data"); - f->dump_unsigned("length", data.length()); - f->close_section(); - - map<string, bufferlist>::const_iterator iter = xattrs.begin(); - f->open_array_section("xattrs"); - for (; iter != xattrs.end(); ++iter) { - f->dump_string("name", iter->first); - f->open_object_section("value"); - f->dump_unsigned("length", iter->second.length()); - f->close_section(); - } - f->close_section(); - - f->open_array_section("rm_xattrs"); - for (iter = rm_xattrs.begin(); iter != rm_xattrs.end(); ++iter) { - f->dump_string("name", iter->first); - f->open_object_section("value"); - f->dump_unsigned("length", iter->second.length()); - f->close_section(); - } - f->close_section(); - f->open_object_section("meta"); - meta.dump(f); - f->close_section(); - -} - void RGWCacheNotifyInfo::generate_test_instances(list<RGWCacheNotifyInfo*>& o) { o.push_back(new RGWCacheNotifyInfo); } -void RGWCacheNotifyInfo::dump(Formatter *f) const -{ - f->dump_unsigned("op", op); - f->open_object_section("obj"); - obj.dump(f); - f->close_section(); - f->open_object_section("obj_info"); - obj_info.dump(f); - f->close_section(); - f->dump_unsigned("ofs", ofs); - f->dump_string("ns", ns); -} - void RGWAccessKey::generate_test_instances(list<RGWAccessKey*>& o) { RGWAccessKey *k = new RGWAccessKey; @@ -405,13 +220,6 @@ void RGWAccessKey::generate_test_instances(list<RGWAccessKey*>& o) o.push_back(new RGWAccessKey); } -void RGWAccessKey::dump(Formatter *f) const -{ - f->dump_string("id", id); - f->dump_string("key", key); - f->dump_string("subuser", subuser); -} - void RGWSubUser::generate_test_instances(list<RGWSubUser*>& o) { RGWSubUser *u = new RGWSubUser; @@ -421,12 +229,6 @@ void RGWSubUser::generate_test_instances(list<RGWSubUser*>& o) o.push_back(new RGWSubUser); } -void RGWSubUser::dump(Formatter *f) const -{ - f->dump_string("name", name); - f->dump_unsigned("perm_mask", perm_mask); -} - void RGWUserInfo::generate_test_instances(list<RGWUserInfo*>& o) { RGWUserInfo *i = new RGWUserInfo; @@ -450,45 +252,6 @@ void RGWUserInfo::generate_test_instances(list<RGWUserInfo*>& o) o.push_back(new RGWUserInfo); } -void RGWUserInfo::dump(Formatter *f) const -{ - f->dump_unsigned("auid", auid); - f->dump_string("user_id", user_id); - f->dump_string("display_name", display_name); - f->dump_string("user_email", user_email); - - map<string, RGWAccessKey>::const_iterator aiter = access_keys.begin(); - f->open_array_section("access_keys"); - for (; aiter != access_keys.end(); ++aiter) { - f->open_object_section("entry"); - f->dump_string("uid", aiter->first); - f->open_object_section("access_key"); - aiter->second.dump(f); - f->close_section(); - f->close_section(); - } - - aiter = swift_keys.begin(); - for (; aiter != swift_keys.end(); ++aiter) { - f->open_object_section("entry"); - f->dump_string("subuser", aiter->first); - f->open_object_section("key"); - aiter->second.dump(f); - f->close_section(); - f->close_section(); - } - map<string, RGWSubUser>::const_iterator siter = subusers.begin(); - for (; siter != subusers.end(); ++siter) { - f->open_object_section("entry"); - f->dump_string("id", siter->first); - f->open_object_section("subuser"); - siter->second.dump(f); - f->close_section(); - f->close_section(); - } - f->dump_int("suspended", (int)suspended); -} - void rgw_bucket::generate_test_instances(list<rgw_bucket*>& o) { rgw_bucket *b = new rgw_bucket("name", "pool", "marker", "123"); @@ -496,14 +259,6 @@ void rgw_bucket::generate_test_instances(list<rgw_bucket*>& o) o.push_back(new rgw_bucket); } -void rgw_bucket::dump(Formatter *f) const -{ - f->dump_string("name", name); - f->dump_string("pool", pool); - f->dump_string("marker", marker); - f->dump_string("bucket_id", bucket_id); -} - void RGWBucketInfo::generate_test_instances(list<RGWBucketInfo*>& o) { RGWBucketInfo *i = new RGWBucketInfo; @@ -514,15 +269,6 @@ void RGWBucketInfo::generate_test_instances(list<RGWBucketInfo*>& o) o.push_back(new RGWBucketInfo); } -void RGWBucketInfo::dump(Formatter *f) const -{ - f->open_object_section("bucket"); - bucket.dump(f); - f->close_section(); - f->dump_string("owner", owner); - f->dump_unsigned("flags", flags); -} - void RGWBucketEnt::generate_test_instances(list<RGWBucketEnt*>& o) { RGWBucketEnt *e = new RGWBucketEnt; @@ -534,17 +280,6 @@ void RGWBucketEnt::generate_test_instances(list<RGWBucketEnt*>& o) o.push_back(new RGWBucketEnt); } -void RGWBucketEnt::dump(Formatter *f) const -{ - f->open_object_section("bucket"); - bucket.dump(f); - f->close_section(); - f->dump_unsigned("size", size); - f->dump_unsigned("size_rounded", size_rounded); - f->dump_stream("mtime") << mtime; - f->dump_unsigned("count", count); -} - void RGWUploadPartInfo::generate_test_instances(list<RGWUploadPartInfo*>& o) { RGWUploadPartInfo *i = new RGWUploadPartInfo; @@ -555,14 +290,6 @@ void RGWUploadPartInfo::generate_test_instances(list<RGWUploadPartInfo*>& o) o.push_back(new RGWUploadPartInfo); } -void RGWUploadPartInfo::dump(Formatter *f) const -{ - f->dump_unsigned("num", num); - f->dump_unsigned("size", size); - f->dump_string("etag", etag); - f->dump_stream("modified") << modified; -} - void rgw_obj::generate_test_instances(list<rgw_obj*>& o) { rgw_bucket b = rgw_bucket("bucket", "pool", "marker", "10"); @@ -571,14 +298,3 @@ void rgw_obj::generate_test_instances(list<rgw_obj*>& o) o.push_back(new rgw_obj); } -void rgw_obj::dump(Formatter *f) const -{ - f->open_object_section("bucket"); - bucket.dump(f); - f->close_section(); - f->dump_string("key", key); - f->dump_string("ns", ns); - f->dump_string("object", object); -} - - |