mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
common/options: fix dump()
By convention dump() does not include the containing object section. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
86a6cf778c
commit
49a5e775aa
@ -480,13 +480,13 @@ void CephContext::do_command(std::string_view command, const cmdmap_t& cmdmap,
|
||||
msg << "Setting not found: '" << key << "'";
|
||||
f->dump_string("error", msg.str());
|
||||
} else {
|
||||
i->second.dump(f);
|
||||
f->dump_object("option", i->second);
|
||||
}
|
||||
} else {
|
||||
// Output all
|
||||
f->open_array_section("options");
|
||||
for (const auto &option : ceph_options) {
|
||||
option.dump(f);
|
||||
f->dump_object("option", option);
|
||||
}
|
||||
f->close_section();
|
||||
}
|
||||
|
@ -159,7 +159,6 @@ int Option::parse_value(
|
||||
|
||||
void Option::dump(Formatter *f) const
|
||||
{
|
||||
f->open_object_section("option");
|
||||
f->dump_string("name", name);
|
||||
|
||||
f->dump_string("type", type_to_str(type));
|
||||
@ -200,8 +199,6 @@ void Option::dump(Formatter *f) const
|
||||
|
||||
dump_value("min", min, f);
|
||||
dump_value("max", max, f);
|
||||
|
||||
f->close_section();
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream& out, const Option::value_t& v)
|
||||
|
Loading…
Reference in New Issue
Block a user