mgr/PyModules: add 'pg_dump' get

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-07-27 10:06:45 -04:00
parent 85b5b80906
commit bfb9286f42

View File

@ -262,7 +262,14 @@ PyObject *PyModules::get_python(const std::string &what)
}
);
return f.get();
} else if (what == "pg_dump") {
PyFormatter f;
cluster_state.with_pgmap(
[&f](const PGMap &pg_map) {
pg_map.dump(&f);
}
);
return f.get();
} else if (what == "df") {
PyFormatter f;