From: Pere Diaz Bou Date: Wed, 26 Jul 2023 07:52:54 +0000 (+0200) Subject: mgr/dashboard: rbd type status X-Git-Tag: v19.0.0~736^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb71d276985b5ef8972ee2b18bc18d7c2da839c8;p=ceph.git mgr/dashboard: rbd type status Fixes: https://tracker.ceph.com/issues/62172 Signed-off-by: Pere Diaz Bou --- diff --git a/src/pybind/mgr/dashboard/controllers/rbd.py b/src/pybind/mgr/dashboard/controllers/rbd.py index d48d284ed2b8..f803ab1a18ae 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd.py +++ b/src/pybind/mgr/dashboard/controllers/rbd.py @@ -6,6 +6,7 @@ import logging import math from datetime import datetime from functools import partial +from typing import Any, Dict import cherrypy import rbd @@ -203,7 +204,7 @@ class RbdStatus(BaseController): @Endpoint() @ReadPermission def status(self): - status = {'available': True, 'message': None} + status: Dict[str, Any] = {'available': True, 'message': None} if not CephService.get_pool_list('rbd'): status['available'] = False status['message'] = 'No Block Pool is available in the cluster. Please click ' \ diff --git a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py index e8250d4add8b..5e082b701102 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py @@ -5,7 +5,7 @@ import logging import re from enum import IntEnum from functools import partial -from typing import NamedTuple, Optional, no_type_check +from typing import Any, Dict, NamedTuple, Optional, no_type_check import cherrypy import rbd @@ -642,7 +642,7 @@ class RbdMirroringStatus(BaseController): @Endpoint() @ReadPermission def status(self): - status = {'available': True, 'message': None} + status: Dict[str, Any] = {'available': True, 'message': None} orch_status = OrchClient.instance().status() # if the orch is not available we can't create the service