From: John Spray Date: Sun, 25 Jun 2017 21:42:40 +0000 (-0400) Subject: pybind/mgr: clean up 'fs status' command X-Git-Tag: ses5-milestone8~1^2~17^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aca6c9aec58d13f17c882a1f715b880a97d79c3c;p=ceph.git pybind/mgr: clean up 'fs status' command Handle the `fs` argument. Signed-off-by: John Spray --- diff --git a/src/pybind/mgr/fsstatus/module.py b/src/pybind/mgr/fsstatus/module.py index 2d29b873d78..22f1902404c 100644 --- a/src/pybind/mgr/fsstatus/module.py +++ b/src/pybind/mgr/fsstatus/module.py @@ -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