]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: clean up 'fs status' command
authorJohn Spray <john.spray@redhat.com>
Sun, 25 Jun 2017 21:42:40 +0000 (17:42 -0400)
committerJohn Spray <john.spray@redhat.com>
Tue, 27 Jun 2017 10:53:33 +0000 (06:53 -0400)
Handle the `fs` argument.

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/fsstatus/module.py

index 2d29b873d78ccab5d1338ee8f3d12746ed4e82c2..22f1902404c666a67b00c7309baa56bb22d17ed5 100644 (file)
@@ -106,10 +106,15 @@ class Module(MgrModule):
     def handle_fs_status(self, cmd):
         output = ""
 
+        fs_filter = cmd.get('fs', None)
+
         mds_versions = defaultdict(list)
 
         fsmap = self.get("fs_map")
         for filesystem in fsmap['filesystems']:
+            if fs_filter and filesystem['mdsmap']['fs_name'] != fs_filter:
+                continue
+
             rank_table = PrettyTable(
                 ("Rank", "State", "MDS", "Activity", "dns", "inos"),
                 hrules=prettytable.FRAME