From bcb7664a1f80c80b0df917ee348ac8f5a93bed85 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Wed, 21 Feb 2018 16:07:57 +0000 Subject: [PATCH] mgr/dashboard_v2: get rbd pool list using CephService Signed-off-by: Ricardo Dias --- src/pybind/mgr/dashboard_v2/controllers/dashboard.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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() -- 2.47.3