MCPcopy Create free account
hub / github.com/ceph/ceph / encode_formatted

Method encode_formatted

src/auth/KeyRing.cc:138–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void KeyRing::encode_formatted(string label, Formatter *f, bufferlist& bl)
139{
140 f->open_array_section(label.c_str());
141 for (const auto &[ename, eauth] : keys) {
142 f->open_object_section("auth_entities");
143 f->dump_string("entity", ename.to_str().c_str());
144 f->dump_string("key", stringify(eauth.key));
145 if (!eauth.pending_key.empty()) {
146 f->dump_string("pending_key", stringify(eauth.pending_key));
147 }
148 f->open_object_section("caps");
149 for (auto& [sys, capsbl] : eauth.caps) {
150 auto dataiter = capsbl.cbegin();
151 string caps;
152 ceph::decode(caps, dataiter);
153 f->dump_string(sys.c_str(), caps);
154 }
155 f->close_section(); /* caps */
156 f->close_section(); /* auth_entities */
157 }
158 f->close_section(); /* auth_dump */
159 f->flush(bl);
160}
161
162void KeyRing::decode(bufferlist::const_iterator& bli)
163{

Callers

nothing calls this directly

Calls 11

stringifyFunction · 0.85
decodeFunction · 0.70
open_array_sectionMethod · 0.45
c_strMethod · 0.45
open_object_sectionMethod · 0.45
dump_stringMethod · 0.45
to_strMethod · 0.45
emptyMethod · 0.45
cbeginMethod · 0.45
close_sectionMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected