From: Pere Diaz Bou Date: Fri, 17 Jun 2022 11:57:53 +0000 (+0200) Subject: mgr/dashboard: more linting X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cd29a3d4cfe6e32673c63f1e44f2bdf92a2fd9a7;p=ceph.git mgr/dashboard: more linting Signed-off-by: Pere Diaz Bou (cherry picked from commit 27f40514ebc87a05144989be9aa1abb700f49566) (cherry picked from commit e42e70ff7fb04aec88654dfa4a36b611d46929dd) Resolves: rhbz#2125432 --- diff --git a/src/pybind/mgr/dashboard/controllers/rbd.py b/src/pybind/mgr/dashboard/controllers/rbd.py index 2f3b74bfcfe93..ea77e32c80ccf 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@ -4,10 +4,10 @@ import logging import math -import cherrypy from datetime import datetime from functools import partial +import cherrypy import rbd from .. import mgr @@ -84,7 +84,6 @@ class Rbd(RESTController): else: pools = [p['pool_name'] for p in CephService.get_pool_list('rbd')] - result = [] images, num_total_images = RbdService.rbd_pool_list(pools, offset=offset, limit=limit) cherrypy.response.headers['X-Total-Count'] = num_total_images pool_result = {} @@ -93,7 +92,7 @@ class Rbd(RESTController): if pool not in pool_result: pool_result[pool] = {'value': [], 'pool_name': image['pool']} pool_result[pool]['value'].append(image) - + images[i]['configuration'] = RbdConfiguration( pool, image['namespace'], image['name']).list() return list(pool_result.values())