mgr/dashboard: rbd type status

Fixes: https://tracker.ceph.com/issues/62172
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
This commit is contained in:
Pere Diaz Bou 2023-07-26 09:52:54 +02:00
parent 38dea7dc21
commit bb71d27698
2 changed files with 4 additions and 3 deletions

View 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 ' \

View 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