From: Sage Weil Date: Tue, 11 Jul 2017 20:25:42 +0000 (-0400) Subject: mgr/PyModules: add 'pg_status' dump X-Git-Tag: v13.0.1~987^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=85b5b80906d00e098d4b1af1354c60a357022dd2;p=ceph.git mgr/PyModules: add 'pg_status' dump This is summary info, same as what's in 'ceph status'. Signed-off-by: Sage Weil --- diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index d8b7b01cc627..2ba4d628f43b 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -254,6 +254,14 @@ PyObject *PyModules::get_python(const std::string &what) } ); return f.get(); + } else if (what == "pg_status") { + PyFormatter f; + cluster_state.with_pgmap( + [&f](const PGMap &pg_map) { + pg_map.print_summary(&f, nullptr); + } + ); + return f.get(); } else if (what == "df") { PyFormatter f;