From: Sage Weil Date: Tue, 11 Jul 2017 20:25:42 +0000 (-0400) Subject: mgr/PyModules: add 'pg_status' dump X-Git-Tag: v12.2.2~61^2~106 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=68d411cf7b934c724f1f8ebeaa7148daebd79599;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 (cherry picked from commit 85b5b80906d00e098d4b1af1354c60a357022dd2) --- diff --git a/src/mgr/PyModules.cc b/src/mgr/PyModules.cc index 6b3b50e599c..ef3ba72fe65 100644 --- a/src/mgr/PyModules.cc +++ b/src/mgr/PyModules.cc @@ -264,6 +264,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;