]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: rbd type status 52647/head
authorPere Diaz Bou <pere-altea@hotmail.com>
Wed, 26 Jul 2023 07:52:54 +0000 (09:52 +0200)
committerPere Diaz Bou <pere-altea@hotmail.com>
Wed, 26 Jul 2023 07:55:12 +0000 (09:55 +0200)
Fixes: https://tracker.ceph.com/issues/62172
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
src/pybind/mgr/dashboard/controllers/rbd.py
src/pybind/mgr/dashboard/controllers/rbd_mirroring.py

index d48d284ed2b834e13ca4a79117469d61a7d33555..f803ab1a18ae5bae153c98eea80d95c73a13cd71 100644 (file)
@@ -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 ' \
index e8250d4add8b273cba5eca42dcfbed2a1a565022..5e082b701102e2a38973a68ad82bdb72bc988c7c 100644 (file)
@@ -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