From: Ricardo Dias Date: Wed, 21 Feb 2018 16:07:57 +0000 (+0000) Subject: mgr/dashboard_v2: get rbd pool list using CephService X-Git-Tag: v13.0.2~84^2~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcb7664a1f80c80b0df917ee348ac8f5a93bed85;p=ceph.git mgr/dashboard_v2: get rbd pool list using CephService Signed-off-by: Ricardo Dias --- diff --git a/src/pybind/mgr/dashboard_v2/controllers/dashboard.py b/src/pybind/mgr/dashboard_v2/controllers/dashboard.py index 1ec3bd0d79c2..21637f4f9786 100644 --- a/src/pybind/mgr/dashboard_v2/controllers/dashboard.py +++ b/src/pybind/mgr/dashboard_v2/controllers/dashboard.py @@ -9,6 +9,7 @@ import time import cherrypy from mgr_module import CommandResult +from ..services.ceph_service import CephService from ..tools import ApiController, AuthRequired, BaseController, NotificationQueue, ViewCache @@ -56,10 +57,7 @@ class Dashboard(BaseController): @ViewCache() def _rbd_pool_ls(self): - osd_map = self.mgr.get("osd_map") - rbd_pools = [pool['pool_name'] for pool in osd_map['pools'] if - 'rbd' in pool.get('application_metadata', {})] - return rbd_pools + return [pool['pool_name'] for pool in CephService.get_pool_list('rbd')] @cherrypy.expose @cherrypy.tools.json_out()