]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/cephfs/filesystem.py
update sources to 12.2.7
[ceph.git] / ceph / qa / tasks / cephfs / filesystem.py
index 6cc1ea55889d78d2d8c176d7ba9c6bb8df19ca60..b3950441990866a76458a78e9dfc9a20a4068a32 100644 (file)
@@ -714,7 +714,17 @@ class Filesystem(MDSCluster):
 
         return result
 
-    def get_rank_names(self):
+    def get_rank(self, rank=0, status=None):
+        if status is None:
+            status = self.getinfo()
+        return status.get_rank(self.id, rank)
+
+    def get_ranks(self, status=None):
+        if status is None:
+            status = self.getinfo()
+        return status.get_ranks(self.id)
+
+    def get_rank_names(self, status=None):
         """
         Return MDS daemon names of those daemons holding a rank,
         sorted by rank.  This includes e.g. up:replay/reconnect
@@ -838,6 +848,10 @@ class Filesystem(MDSCluster):
 
         return self.json_asok(command, 'mds', mds_id)
 
+    def rank_asok(self, command, rank=0):
+        info = self.get_rank(rank=rank)
+        return self.json_asok(command, 'mds', info['name'])
+
     def read_cache(self, path, depth=None):
         cmd = ["dump", "tree", path]
         if depth is not None: