]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/PyModules: add 'pg_dump' get
authorSage Weil <sage@redhat.com>
Thu, 27 Jul 2017 14:06:45 +0000 (10:06 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 20:45:46 +0000 (16:45 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/PyModules.cc

index 2ba4d628f43b00e6fb050ad017de1958636d5103..d78640d44a0bb672eb9bdefd48462504419bcdfb 100644 (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;