mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
Merge pull request #52647 from rhcs-dashboard/rbd-typing
mgr/dashboard: rbd type status Reviewed-by: Nizamudeen A <nia@redhat.com>
This commit is contained in:
commit
e2d71466fa
@ -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 ' \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user