From: Sage Weil Date: Thu, 27 Jul 2017 14:06:45 +0000 (-0400) Subject: mgr/PyModules: add 'pg_dump' get X-Git-Tag: v13.0.1~987^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfb9286f4212947183c46543d609b664ea13b489;p=ceph.git mgr/PyModules: add 'pg_dump' get Signed-off-by: Sage Weil --- diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index 2ba4d628f43b..d78640d44a0b 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -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;