]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/PyModules: add 'pg_status' dump
authorSage Weil <sage@redhat.com>
Tue, 11 Jul 2017 20:25:42 +0000 (16:25 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 20:45:46 +0000 (16:45 -0400)
This is summary info, same as what's in 'ceph status'.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/PyModules.cc

index d8b7b01cc6278dbdcea73f760931d157bf12a6d2..2ba4d628f43b00e6fb050ad017de1958636d5103 100644 (file)
@@ -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;