From: Loic Dachary Date: Wed, 19 Nov 2014 17:10:38 +0000 (+0100) Subject: ceph_manager: add get_pool_dump to return the json pool dump X-Git-Tag: v0.94.10~27^2^2~233^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5fc42b98ab22a9b2edad4336677270b11a42d776;p=ceph.git ceph_manager: add get_pool_dump to return the json pool dump Get the part of ceph osd dump specific to the pool given in argument. Signed-off-by: Loic Dachary --- diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 9b450ec7218cb..506ec593a9e23 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -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