]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_manager: add get_pool_dump to return the json pool dump
authorLoic Dachary <ldachary@redhat.com>
Wed, 19 Nov 2014 17:10:38 +0000 (18:10 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 19 Nov 2014 22:19:13 +0000 (23:19 +0100)
Get the part of ceph osd dump specific to the pool given in argument.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
tasks/ceph_manager.py

index 9b450ec7218cbed3a853db7c3e661026eac4ed40..506ec593a9e238234fc8e093b8f3e4c7d6aebf07 100644 (file)
@@ -782,6 +782,16 @@ class CephManager:
                         command=args))
                 time.sleep(5)
 
+    def get_pool_dump(self, pool):
+        """
+        get the osd dump part of a pool 
+        """
+        osd_dump = self.get_osd_dump_json()
+        for i in osd_dump['pools']:
+            if i['pool_name'] == pool:
+                return i
+        assert False
+
     def set_config(self, osdnum, **argdict):
         """
         :param osdnum: osd number